younifyd
Menu

Get Rule Promotion Usages

Get Rule Promotion Usages

GET/v2/rule-promotions/{promotionID}/usages

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get Rule Promotion Usages action (under Promotions Builder).
  3. Fill in the fields below, then reference the result from later steps as {{getRulePromotionUsages.response.data}}.

Request

Path parameters

promotionIDstringrequired

The unique identifier of the rule promotion.

Query parameters

filterstring

Filter attributes to refine the usage records. Supported attributes: - `id`: Filter by usage ID. - `code`: Filter by promotion code. - `used_on`: Filter by usage date with operators `gt`, `ge`, `le`, `lt`.

page[limit]integer

The number of records per page.

page[offset]integer

The number of records to offset the results by.

Headers

Authorizationstring (Bearer)required

The Bearer token required to get access to the API.

Response

Returns 200 with an object. Read it in later steps with {{getRulePromotionUsages.response.data.<field>}}.

dataarray<object>
idstring

The unique identifier of the usage record.

order_idstring | null

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_onstring (date-time)

The timestamp when the promotion was applied.

customer_idstring | null

The customer identifier who used the promotion, if applicable.

account_idstring | null

The account identifier associated with the promotion usage, if applicable.

customer_emailstring | null

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

metaobject1 fields
updated_bystring

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

anonymizedboolean

Indicates whether the usage record has been anonymized.

linksobject
currentstring (uri)

URL for the current page of results

firststring (uri)

URL for the first page of results

laststring (uri)

URL for the last page of results

nextstring (uri)

URL for the next page of results

prevstring (uri)

URL for the previous page of results

metaobject
pageobject4 fields
resultsobject2 fields
json
{
  "data": [
    {
      "id": "string",
      "order_id": "string",
      "code_id": "string",
      "code": "string",
      "times_used": 0,
      "used_on": "2025-01-01T00:00:00Z",
      "customer_id": "string",
      "account_id": "string",
      "customer_email": "string",
      "meta": {
        "timestamps": {
          "updated_at": "2025-01-01T00:00:00Z"
        }
      },
      "updated_by": "string",
      "anonymized": false
    }
  ],
  "links": {
    "current": "string",
    "first": "string",
    "last": "string",
    "next": "string",
    "prev": "string"
  },
  "meta": {
    "page": {
      "current": 0,
      "limit": 0,
      "offset": 0,
      "total": 0
    },
    "results": {
      "total": 0,
      "total_method": "string"
    }
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.