flex_promotions

Create a flex promotion

Changed on

Create a flex promotion

post/flex_promotions

Request

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

Request body

Example request

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

Response

The created flex promotion object

Changes