Download OpenAPI specification:Download
fabric e-commerce Offers APIs allow you to to set up and manage stock keeping unit (SKU) prices. Its wide range of coupon and promotion features let you design deals ranging from single-use, customer-specific coupons to site-wide promotions.
Enables you to create one or many prices in accordance with how many items are present in the itemIds array.
A JSON object that contains price information.
Successfully creates price.
Client Error
Server Error
{- "priceListId": 100000,
- "itemIds": [
- [
- 1000011218
]
], - "itemSkus": [
- "1234XYZ"
], - "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:47.234Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "minQuantity": 2,
- "price": 500
}
]
}
]
}
{- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
Retrieves paginated list of prices for all items
Successfully retrieves price details.
Client error
Server error
{- "query": {
- "limit": 10,
- "count": 40,
- "page": 1
}, - "prices": [
- {
- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
]
}
Enables you to get price details based on price ID
required | object (XSiteContext) The |
Successfully retrieves price details.
Client error
Server error
{- "query": {
- "limit": 10,
- "count": 40,
- "page": 1
}, - "prices": [
- {
- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
]
}
Deletes a price in the service by item identifier or its SKU.
Returns the deleted price
Client error
Server error
{- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": true,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": true
}
Enables you to get offer price of items based on the item Ids.
required | object (XSiteContext) The |
Successfully retrieves an array cotaining all the prices for items based on items identifiers.
Client Error
Server Error
{- "itemIds": [
- 1000000038
], - "priceListId": 100000
}
[- {
- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
]
Enables you to get prices for all items.
required | object (XSiteContext) The |
required | Array of objects non-empty Items |
Successfully gets prices for items.
Client Error
Server Error
{- "items": [
- {
- "itemId": 1000000038,
- "quantity": 10,
- "priceListId": 100000
}
]
}
[- {
- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 371922,
- "offers": [
- {
- "kind": 12,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": 1000,
- "cost": 800,
- "currency": "USD"
}, - "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
]
Enables you to add or update prices, in bulk. This API is secured by x-api-key.
Array of Items
Successful
Client error
Server error
[- {
- "priceListId": 100000,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offers": [
- {
- "kind": 0,
- "channel": 12,
- "startDate": "2021-12-30T02:05:47.234Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "range": [
- {
- "minQuantity": 2,
- "price": 500
}
], - "price": {
- "base": 2000,
- "sale": "",
- "cost": "",
- "currency": "USD"
}
}
]
}
]
[- {
- "_id": "616e011037a3810008cfb256",
- "priceListId": 100000,
- "isSoftDeleted": false,
- "itemId": 1000011218,
- "itemSku": "1234XYZ",
- "offerId": 381933,
- "offers": [
- {
- "kind": 0,
- "channel": 12,
- "startDate": "2021-12-30T02:05:00.000Z",
- "endDate": "2099-12-31T00:00:00.000Z",
- "price": {
- "base": 2000,
- "sale": null,
- "cost": "",
- "currency": "USD"
}, - "offerCode": 123786,
- "range": [
- {
- "_id": "616e143828d0b800086dd84a",
- "minQuantity": 2,
- "price": 500
}
]
}
], - "createdAt": "2021-10-18T23:19:44.852Z",
- "updatedAt": "2021-10-19T00:40:30.341Z",
- "job": false
}
]
Enables you to validate a cart's promotions - coupon codes and implicit promotions - for specified item IDs.
required | object (XSiteContext) The |
A JSON object containing information to apply eligible promotions to cart items.
Successful
Client Error
Promo is Expired
Server Error
{- "isLoggedIn": false,
- "userId": "5e2cfb9b45570b000864c4b5",
- "promoCodes": [
- "300DOFF"
], - "items": [
- {
- "lineItemId": 1,
- "sku": "SKU0001",
- "itemId": 1000000119,
- "group": [
- "5e2cfb9b45570b000863c4b5"
], - "quantity": 3,
- "price": {
- "base": 1000,
- "sale": 0,
- "currency": "USD"
}
}
]
}
{- "isSuccess": true,
- "items": [
- {
- "lineItemId": 1,
- "sku": "SKU0001",
- "itemId": 1000000119,
- "group": [
- "5e2cfb9b45570b000863c4b5"
], - "quantity": 3,
- "price": {
- "sale": 1000,
- "cost": 0,
- "currency": "USD",
- "base": 5000,
- "kind": "Promotion",
- "discount": 0
}, - "discount": [
- {
- "_id": "5f9be340dde1cd0008f96035",
- "unit": "AMOUNT_OFF",
- "value": 300,
- "ON": {
- "kind": "SKU",
- "value": null
}, - "id": "5f9be340dde1cd0008f96035",
- "promoId": "5f9be340dde1cd0008f96034",
- "promoCode": "300DOFF",
- "promoTitle": "SKU 300 D off all skus",
- "type": "COUPON"
}
], - "discountQuantity": 3,
- "discountAmount": 5070
}
], - "appliedDiscounts": [
- {
- "promoId": "5faaac2dd49ffe00071e4f8d",
- "promoTitle": "inclsion promo 99 P off ",
- "type": "PROMOTION-SKU"
}
], - "discounts": [
- {
- "_id": "5faaac2dd49ffe00071e4f8e",
- "unit": "%OFF",
- "value": 99,
- "ON": {
- "kind": "SKU",
- "value": null
}, - "id": "5faaac2dd49ffe00071e4f8e",
- "type": "PROMOTION-SKU",
- "promoId": "5faaac2dd49ffe00071e4f8d",
- "promoTitle": "inclsion promo 99 P off."
}
]
}
Enables you to retrieve all the active promotions, in a paginated response.
required | object (XSiteContext) The |
Successfully gets list of all active promotions.
Client error
Server error
{- "query": {
- "limit": 10,
- "offset": 0,
- "count": 66
}, - "promos": [
- {
- "_id": "abcdefg1ee7ce20123456789",
- "promoId": 100013,
- "promoCodes": [ ],
- "promoCount": 0,
- "state": "SCHEDULED",
- "isImplicit": true,
- "title": "CREATE PROMO",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-25T14:15:22Z",
- "isExclusive": true,
- "eligiblePriceList": [
- 10000056
], - "updatedAt": "2019-08-20T14:15:22Z"
}
]
}
Retrieves details of a specific promotion based on the specified promotion ID.
required | object (XSiteContext) The |
Successfull
Client error
Server error
{- "_id": "5ff58d31358319306ac05349",
- "promoCodes": [
- "updatePromoCode"
], - "state": "ACTIVE",
- "isImplicit": false,
- "isExclusive": false,
- "title": "HURRY",
- "startDate": "2020-12-03T09:30:00.965Z",
- "endDate": "2020-12-03T18:30:00.000Z",
- "type": "PRODUCT",
- "promo": [
- {
- "condition": [
- "5fc8aedcdf91700008c62917"
], - "discount": [
- {
- "_id": "5f9be340dde1cd0008f96035",
- "unit": "AMOUNT_OFF",
- "value": 300,
- "ON": {
- "kind": "SKU",
- "value": null
}, - "id": "5f9be340dde1cd0008f96035",
- "promoId": "5f9be340dde1cd0008f96034",
- "promoCode": "300DOFF",
- "promoTitle": "SKU 300 D off all skus",
- "type": "COUPON"
}
], - "targetProducts": [
- {
- "kind": "SKU",
- "value": "*",
- "operator": "IN"
}
]
}
], - "extra": { },
- "limits": {
- "_id": "603eae614b40770007494683",
- "kind": "PER_USER",
- "value": 4,
- "id": "603eae614b40770007494683"
}, - "promoId": 1422,
- "termsAndConditions": {
- "_id": "5fc8ad76969f071ff85221e4",
- "title": "Entering a Coupon",
- "description": "Each coupon is identified by a code and has different rewards. The claimant can decide the reward desired during the booking phase whilst being bound by the conditions linked to the redemption of the coupon."
}, - "createdAt": "2021-01-06T10:13:05.169Z",
- "updatedAt": "2021-01-06T10:36:41.038Z",
- "__v": 0
}
Login endpoint generates an authorization token for local users that they can use to log into fabric copilot application.
Note: A local user is someone who has an active account with fabric Inc
Generates an authorization token using which you can access fabric APIs. Ensure that you provide valid credentials to get an authorization token.
required | object The x-site-context is a JSON object that must contain date, and channel attributes. eg - {"date":"2020-12-12T08:00:00.000Z","channel":12} |
OK
Bad Request
Internal Server Error
{- "accountId": 4781348886,
- "username": "john@fabric.inc",
- "password": "joHn@123456789!"
}
{- "_id": "60c3a2c476f9c21239d836ca",
- "account": {
- "accountId": 8739392294
}, - "roles": [
- "Admin"
], - "permissions": [
- "read:user"
], - "refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0....",
- "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0...."
}