Skip to main content

Get a Promotion History

GET 

https://useast.api.elasticpath.com/v2/promotions/:promotionID/history

Use this endpoint to retrieve a promotion history.

Request

Path Parameters

    promotionID stringrequired

    The ID of the promotion.

Header Parameters

    Authorization Bearerrequired

    The Bearer token required to get access to the API.

Responses

Response Headers
    Schema
      data object[]
    • Array [
    • 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]

      typestringrequired

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

      iduuidrequired
      namestringrequired

      Specifies a name for the promotion.

      descriptionstringrequired

      Specifies a description for the promotion.

      promotion_typestringrequired

      Specifies the type of the promotion.

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

      enabledbooleanrequired

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

      automaticbooleanrequired

      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.

      startstringrequired

      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.

      endstringrequired

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

      min_cart_valueobject

      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_cartnumber

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

      schema objectrequired
      target_catalogsstring[]

      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 [
    • amountintegerrequired

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

      currencystringrequired

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

    • ]
    • conditions object
      or object[]
    • Array [
    • and object[]
    • Array [
    • oneOf
      attribute object
      templatestring

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

      fieldstring

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

      typestring

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

      valuestring

      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
      currentstring

      Always the current page.

      firststring

      Always the first page.

      laststring

      If there is only one page, it returns null.

      nextstring

      If there is only one page, it returns null.

      prevstring

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

      meta object
      page object
      currentinteger

      The current page.

      limitinteger

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

      offsetinteger

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

      totalinteger

      The total page count.

      results object
      totalinteger

      The total number of results.

    Authorization: http

    name: bearerAuthtype: httpscheme: bearer
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/promotions/:promotionID/history");
    request.Headers.Add("Accept", "application/json");
    request.Headers.Add("Authorization", "Bearer <token>");
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    Request Collapse all
    Base URL
    https://useast.api.elasticpath.com
    Auth
    Parameters
    — pathrequired
    — headerrequired
    ResponseClear

    Click the Send API Request button above and see the response here!

    We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.