POST
/
promotions
/
search
curl --request POST \
  --url https://api.fabric.inc/v3/promotions/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "startCursor": "H796HJHGANLSADS",
  "size": 10,
  "sort": "+updatedAt",
  "filters": [
    {
      "field": "name",
      "value": "Summer",
      "operator": "EQUAL"
    }
  ]
}'
{
  "query": {
    "size": 10,
    "nextCursor": "H796HJHGANLSADS"
  },
  "data": [
    {
      "id": "6380e7ecb419a30009865fad",
      "name": "Black Friday Promotion",
      "status": "SCHEDULED",
      "startAt": "2019-08-24T14:15:22Z",
      "endAt": "2019-08-25T14:15:22Z",
      "type": "PRODUCT",
      "createdAt": "2019-08-20T14:15:22Z",
      "updatedAt": "2019-08-20T14:15:22Z",
      "level": 3,
      "isStackable": true,
      "isAlwaysApplied": true,
      "additionalAttributes": [
        {
          "key": "type",
          "value": "Birthday",
          "attributeId": 100000
        }
      ],
      "promotionMessages": [
        {
          "title": "Buy 1 get 1 free",
          "message": "Offer valid at participating stores through September 5, 2023.",
          "pages": [
            "PDP",
            "Cart"
          ],
          "locales": [
            "en-CA",
            "fr-CA"
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-channel-id
string
required

The sales channel ID.

x-client-id
string

The platform where the request is made.

x-fabric-request-id
string

A unique request ID.

Body

application/json
startCursor
string

Specifies the record number from which the search will start, effectively skipping all records before this point.

size
number
default: 10

The maximum number of records per page.

sort
enum<string>

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.

Available options:
+updatedAt,
+name,
+startAt,
+endAt,
+level,
-updatedAt,
-name,
-startAt,
-endAt,
-level
filters
object[]

Response

200 - application/json
query
object

The pagination details.

data
object[]

The response of the search request.