order_amount_promotion_rules

Create an order amount promotion rule

Changed on

Create an order amount promotion rule

post/order_amount_promotion_rules

Request

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

Request body

Example request

{
  "data": {
    "attributes": {
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      },
      "order_amount_cents": 1000,
      "use_subtotal": true
    },
    "relationships": {
      "promotion": {
        "data": {
          "id": "XAyRWNUzyN",
          "attributes": {
            "name": "Personal promotion",
            "type": "percentage_discount_promotions",
            "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,
            "total_usage_count": 2,
            "active": true,
            "status": "pending",
            "weight": 112,
            "coupons_count": 2,
            "disabled_at": "2018-01-01T12:00:00.000Z",
            "created_at": "2018-01-01T12:00:00.000Z",
            "updated_at": "2018-01-01T12:00:00.000Z",
            "reference": "ANY-EXTERNAL-REFEFERNCE",
            "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
            "metadata": {
              "foo": "bar"
            },
            "percentage": 10
          },
          "relationships": {
            "market": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "promotion_rules": {
              "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"
              }
            },
            "coupons": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "attachments": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "events": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "tags": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "event_stores": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            },
            "skus": {
              "data": {
                "id": "XAyRWNUzyN"
              }
            }
          }
        }
      }
    }
  }
}

Response

The created order amount promotion rule object

Changes

    • breaking

      added the new required request property ///

    • breaking

      request property //////// was restricted to a list of enum values

    • breaking

      request property //////// was restricted to a list of enum values

    • breaking

      request property //////// was restricted to a list of enum values

    • breaking

      request property //////// was restricted to a list of enum values

    • breaking

      request property //////// was restricted to a list of enum values

    • breaking

      request property //////// was restricted to a list of enum values

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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 //////////

    • 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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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 ///////// 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 ///////// 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 ///////// 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 ///////// 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 ///////// 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 ///////// 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 ///////// 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 optional

    • info

      the request property /////// became optional

    • info

      the request property /////// became optional

    • info

      the request property /////// became optional

    • info

      the request property /////// became optional

    • info

      the request property /////// became optional

    • info

      the request property default value external_promotions was removed

    • info

      the request property default value fixed_amount_promotions was removed

    • info

      the request property default value fixed_price_promotions was removed

    • info

      the request property default value free_gift_promotions was removed

    • info

      the request property default value free_shipping_promotions was removed

    • info

      the request property default value order_amount_promotion_rules was removed

    • info

      the request property default value percentage_discount_promotions was removed

    • info

      added the new external_promotions enum value to the request property ////////

    • info

      added the new fixed_amount_promotions enum value to the request property ////////

    • info

      added the new fixed_price_promotions enum value to the request property ////////

    • info

      added the new free_gift_promotions enum value to the request property ////////

    • info

      added the new free_shipping_promotions enum value to the request property ////////

    • info

      added the new order_amount_promotion_rules enum value to the request property /

    • info

      added the new percentage_discount_promotions enum value to the request property ////////

    • info

      added to the // request property oneOf list

    • info

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