Get all coupons
Get a paginated list of coupons.
Request
- Base URLhttps://api.fabric.inc/v3
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The maximum number of records per page.
The number of records to skip before returning records. For example, with an offset of 20 and limit of 10, you will get records from 21 to 30.
The criteria to sort the results. Use the format {sort order}{field name}, where - refers to a descending order and + refers to an ascending order.
Keyword to filter coupons
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.
A unique identifier obtained from Copilot for the System app in the fabric ecosystem, essential for OpenID Connect authentication flows.
A unique request ID.
Response
OK
Example response
{
"query": {
"size": 10,
"offset": 10,
"count": 50
},
"data": [
{
"id": "6380e7ecb419a30009865fad",
"name": "Christmas 2022 coupons",
"status": "SCHEDULED",
"startAt": "2022-08-24T14:15:22Z",
"endAt": "2019-08-25T14:15:22Z",
"type": "PRODUCT",
"couponCodesCount": 100,
"createdAt": "2019-08-20T14:15:22Z",
"updatedAt": "2019-08-20T14:15:22Z",
"level": 3,
"stackingType": "STACKABLE",
"singleMultiUse": "MULTI_USE",
"couponCodes": [
"SUMMER1000001"
],
"promotionMessages": [
{
"title": "Buy 2 get 1 free",
"message": "Offer valid at participating stores through September 5, 2023.",
"pages": [
"PDP",
"Cart"
],
"locales": [
"en-CA",
"fr-CA"
]
}
],
"additionalAttributes": [
{
"name": "type",
"values": "Birthday",
"attributeId": 100000
}
]
}
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.