Skip to main content

Get all Promotions

GET 

/v2/promotions

Returns all promotions.

note

You can use pagination with this resource. For more information, see pagination.

Filtering

The following operators and attributes are available when filtering on this endpoint. See Supported Filtering Characters.

Use code filter to search codes within promotions.

AttributeTypeOperatorExample
codestringeqeq(code,some_code)

For filtering advanced promotion usages, pass the EP-Public-Search-Type=cm_search header. Advanced search filtering is only applicable when the promotion code is consumed and the promotion is not deleted.

AttributeTypeOperatorExample
promo_idstringeqeq(promo_id, 69c63c9d-8ccf-44b1-8e98-1e7feebfb581)
promo_namestringeq, likeeq(promo_name,cart percent discount)
promo_typestringeqeq(promo_type,fixed_discount)
promo_statusstringeqeq(promo_status,Running)
promo_checkoutsstringeq,gt, ge, lt, leeq(promo_checkouts,2)
promo_skus_prod_idsstringeq, likeeq(promo_skus_prod_ids, sku1)
promo_start_datestringeq, gt, gr, lt, leeq(promo_start_date,2023-01-01)
promo_end_datestringeq, gt, gr, lt, leeq(promo_end_date,2050-06-15)
code_idstringeqeq(promo_id,2ea0cd1d-43a9-441b-b03f-3cab84aaee0c):eq(code_id,14b55e6c-3f80-436e-a90a-4de5f0e36240)
code_codestringeq, likeeq(code_code,cart_fixed_10)
code_usedstringeq, gt, gr, lt, leeq(code_used,2)
code_created_datestringeq, gt, gr, lt, leeq(code_created_date,2023-11-15)
order_idstringeq, likeeq(order_id,ccb13673-627c-4976-88da-f77c542b528f)
order_customer_emailstringeq, likelike(order_customer_email,andy*)
order_created_datestringeq, gt, gr,lt, lele(order_created_date,2023-11-15)

Request

Query Parameters

    page[offset] string

    The number of records to offset the results by.

    page[limit] string

    The number of records per page.

Header Parameters

    Authorization Bearerrequired

    The Bearer token required to get access to the API.

Responses

Response Headers
    Schema
      data object[]
    • Array [
    • oneOf
      type stringrequired

      Specifies the type of the resource. The type of resource for promotions is promotion.

      id uuidrequired
      name stringrequired

      Specifies a name for the promotion.

      description stringrequired

      Specifies a description for the promotion.

      promotion_type stringrequired

      Possible values: [fixed_discount, percent_discount, item_fixed_discount, item_percent_discount, x_for_y, x_for_amount, bundle_fixed_discount, bundle_gift]

      Specifies the type of the promotion.

      enabled booleanrequired

      Specifies whether the promotion is enabled. The options are true or false, and the default setting is false.

      automatic booleanrequired

      Specifies whether the promotion is applied automatically to the cart or a code is required to apply the promotion. The default setting is to false. When this value is set to true, a code is autogenerated. If this value is set to false, you must create the code manually. For more information about creating codes, see the Create Promotion Codes section.

      start stringrequired

      Specifies the start date and time of the promotion or the start date of the promotion. You can provide a specific time in the HH:MM format.

      end stringrequired

      Specifies the end date and time of the promotion or the end date of the promotion.

      min_cart_value object

      Specifies an array of currency-value objects, min_cart_value[].currency and min_cart_value[].amount, that provides the minimum cart value required for the promotion to apply. You can add one or several value specifications in different currencies. Do not use max_discount_value for Cart Fixed Discount promotion and Item Fixed Discount promotion. If max_discount_value is greater than the fixed_discount value, the fixed_discount value is applied; otherwise the max_discount value is applied.

      max_applications_per_cart number

      Specifies the maximum number of application of a promotion per cart.

      schema objectrequired
      target_catalogs string[]

      Specifies the unique identifiers of the catalogs to be applied for this promotion. If you do not set this parameter, promotion will be applied to all catalogs.

      currencies object[]required
    • Array [
    • amount integerrequired

      Specifies the fixed discount amount to be applied to the cart. For example, $10 off the total amount in the cart.

      currency stringrequired

      Specifies a three-letter currency code. For example, USD.

    • ]
    • conditions object
      or object[]
    • Array [
    • and object[]
    • Array [
    • oneOf
      attribute object
      template string

      Specifies the name of the template slug to be excluded from a promotion.

      field string

      Specifies the unique slug identifier for the field excluded from a promotion.

      type string

      Specifies the type of the field, such as string, integer, boolean, float, or date.

      value string

      Specifies the value of the field that was specified in the attributes.field. For example, you can specify any color in the value if you indicate color in the attributes.field.

    • ]
    • ]
    • ]
    • links object
      current string

      Always the current page.

      first string

      Always the first page.

      last string

      If there is only one page, it returns null.

      next string

      If there is only one page, it returns null.

      prev string

      If the user is on the first page, it returns null.

      meta object
      page object
      current integer

      The current page.

      limit integer

      The maximum number of records per page for this response. You can set this value up to 100.

      offset integer

      The current offset by number of records, not pages. Offset is zero-based.

      total integer

      The total page count.

      results object
      total integer

      The total number of results.

    Loading...