buy_x_pay_y_promotions

Create a buy x pay y promotion

Changed on

Create a buy x pay y promotion

post/buy_x_pay_y_promotions

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/buy_x_pay_y_promotions
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "name": "Personal promotion",
      "currency_code": "EUR",
      "exclusive": true,
      "priority": 2,
      "starts_at": "2018-01-01T12:00:00.000Z",
      "expires_at": "2018-01-02T12:00:00.000Z",
      "total_usage_limit": 5,
      "_disable": true,
      "_enable": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      },
      "x": 3,
      "y": 2,
      "cheapest_free": true
    },
    "relationships": {
      "market": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "sku_list": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created buy x pay y promotion object

Changes

    • warning

      removed the request property //

    • warning

      removed the request property //

    • warning

      removed the request property //

    • warning

      removed the request property //

    • info

      endpoint added