Skip to main content
GET
/
vendor
/
promotions
List Promotions
curl --request GET \
  --url https://api.example.com/vendor/promotions \
  --header 'Authorization: Bearer <token>'
{
  "promotions": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "code": "<string>",
      "is_automatic": true,
      "type": "<string>",
      "application_method": {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "value": 123,
        "max_quantity": "<string>",
        "apply_to_quantity": "<string>",
        "buy_rules_min_quantity": "<string>",
        "type": "<string>",
        "target_type": "<string>",
        "allocation": "<string>",
        "target_rules": [
          {
            "id": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "description": "<string>",
            "attribute": "<string>",
            "operator": "<string>",
            "values": [
              {
                "value": "<string>"
              }
            ]
          }
        ]
      },
      "rules": [
        {
          "id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "description": "<string>",
          "attribute": "<string>",
          "operator": "<string>",
          "values": [
            {
              "value": "<string>"
            }
          ]
        }
      ]
    }
  ],
  "count": 123,
  "offset": 123,
  "limit": 123
}

Authorizations

Authorization
string
header
required

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

Query Parameters

q
string

Search term to filter promotions by searchable fields.

id

Filter by promotion ID(s).

code

Filter by promotion code(s).

campaign_id

Filter by campaign ID(s).

status

Filter by promotion status.

Available options:
draft,
active,
inactive
is_automatic
boolean

Filter by whether the promotion is automatic.

type

Filter by promotion type.

Available options:
standard,
buyget
created_at
object

Filter by creation date using operator map (e.g., $gt, $lt, $gte, $lte).

updated_at
object

Filter by update date using operator map (e.g., $gt, $lt, $gte, $lte).

offset
number

The number of items to skip before starting to collect the result set.

limit
number

The number of items to return.

order
string

The field to sort by and in which order (e.g., "created_at" for ascending, "-created_at" for descending).

fields
string

Comma-separated fields to include in the response.

Response

200 - application/json

OK

promotions
Promotion · object[]
count
integer

The total number of items available

offset
integer

The number of items skipped before these items

limit
integer

The number of items per page