flex_promotions

Update a flex promotion

Changed on

Update a flex promotion

patch/flex_promotions/{flexPromotionId}

Request

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

Path parameters

flexPromotionIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "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": {
      "coupon_codes_promotion_rule": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The updated flex promotion object

Changes