free_gift_promotions

Update a free gift promotion

Changed on

Update a free gift promotion

patch/free_gift_promotions/{freeGiftPromotionId}

Request

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

Path parameters

freeGiftPromotionIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "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"
      },
      "max_quantity": 3
    },
    "relationships": {
      "market": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "order_amount_promotion_rule": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "sku_list_promotion_rule": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "coupon_codes_promotion_rule": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "custom_promotion_rule": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "sku_list": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The updated free gift promotion object

Changes

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property //

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property default value free_gift_promotions was removed

    • info

      added the new free_gift_promotions enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status