Search for coupons
Use this endpoint to search for coupons based on filter conditions.
Request
- Base URLhttps://api.fabric.inc/v3
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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.
Request body
Example request
{
"size": 10,
"offset": 10,
"filters": [
{
"field": "name",
"value": "Summer",
"operator": "EQUAL"
}
]
}Response
OK
Example response
{
"query": {
"size": 10,
"offset": 10,
"count": 50
},
"data": [
{
"id": "abcdefg1ee7ce20123456789",
"couponCodes": [
"SUMMER100",
"SUMMER20"
],
"status": "SCHEDULED",
"name": "CREATE PROMO",
"startAt": "2019-08-24T14:15:22Z",
"endAt": "2019-08-25T14:15:22Z",
"updatedAt": "2019-08-20T14:15:22Z",
"singleMultiUse": "MULTI_USE",
"type": "PRODUCT",
"level": 1,
"stackingType": "STACKABLE",
"isStackable": true,
"additionalAttributes": [
{
"name": "type",
"values": "Birthday",
"attributeId": 100000
}
],
"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"
]
}
],
"proximityMessages": {
"threshold": 1,
"localizedMessages": [
{
"locales": [
"en-CA"
],
"message": "Buy some more to get the discount!"
}
]
}
}
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.