Skip to main content

Get Rule Promotion Code Usages

GET 

https://useast.api.elasticpath.com/v2/rule-promotions/:promotionID/codes/:code/usages

Retrieves a list of usage records for a specific Rule Promotion code.

  • Provides insights into how many times a specific code was used.
  • Can be filtered and paginated to refine results.
  • Useful for tracking the performance of individual promotion codes.

Request

Path Parameters

    promotionID stringrequired

    The unique identifier of the rule promotion.

    code stringrequired

    The specific promotion code for which to retrieve usage records.

Query Parameters

    filter string

    Filter attributes to refine the results. Supported attributes:

    • id: Filter by usage ID.
    • used_on: Filter by date with operators gt, ge, le, lt.
    Example: gt(used_on,2024-02-01T00:00:00Z)
    page[limit] integer

    The number of records per page.

    Example: 10
    page[offset] integer

    The number of records to offset the results by.

    Example: 0

Header Parameters

    Authorization Bearerrequired

    The Bearer token required to get access to the API.

Responses

Successful response

Schema
    data object[]
  • Array [
  • idstring

    The unique identifier of the usage record.

    order_idstringnullable

    The associated order ID, if applicable.

    code_idstring

    The unique identifier of the promotion code.

    codestring

    The promotion code used.

    times_usedinteger

    The number of times the promotion code has been used.

    used_ondate-time

    The timestamp when the promotion was applied.

    customer_idstringnullable

    The customer identifier who used the promotion, if applicable.

    customer_emailstringnullable

    The email of the customer who used the promotion, if applicable.

    meta object
    timestamps object
    updated_atdate-time

    The timestamp when the usage record was last updated.

    updated_bystring

    Identifier of the user or system that last updated the record.

    anonymizedboolean

    Indicates whether the usage record has been anonymized.

  • ]
  • meta object
    pagination object
    totalinteger

    Total number of available records.

    limitinteger

    Number of records returned per page.

    offsetinteger

    Number of records skipped.

    currentinteger

    Current page number.

Authorization: http

name: BearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/rule-promotions/:promotionID/codes/:code/usages");
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
— pathrequired
— headerrequired
— query
— query
— query
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.