Apply rewards to an order

The apply endpoint is used to apply promotions to an order in an e-commerce system. A successful call to this endpoint will;

  1. qualify any currently applied promotions in the order to ensure they still apply

  2. validate and apply the coupon code sent with the request, if any

  3. and apply any automatic promotions that the order qualifies for.

The promotion combination rules that you have configured on your account will decide if and how multiple promotions are applied to an order.

All successfully applied promotions will be returned in the appliedPromotions property of the Order object in the response. This is a combination of successfully applied automatic promotions and any coupon code or promotion that you specified in the request.

You should always pass back the array of applied promotions in the Order object with subsequent requests to the apply endpoint so that the applied promotions can be checked against the updated cart or order to ensure they still meet the qualification rules of the promotion.

See the guide on Reward Application for more information.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
order
object
required

A representation of a customer order

string
string | null

A unique reference for linking a unique coupon code to a customer. This can be any attribute as long as it's unique to the customer e.g. an email address.

customer
object
string | null

This parameter could be based on your different e-commerce applications, brands, regions or a combination of both. Important for segmenting your promotions and accounts or enforcing qualification rules.

string | null

An identifier for the customer journey for linking a customer's checkout session to the promotion engine events. This is also required for preventing a unique code from being used in multiple simultaneous checkout sessions. See more on Validation Locking.

You can use your own value, such as the checkout session identifier, for this parameter or let let Uniqodo generate one for you. If this parameter is not present in the request then a new one will be generated and returned in the response. You should store the journey ID value (typically with the customer's checkout session) and pass it back with subsequent requests until the checkout session ends.

string

A two-letter ISO 639-1 language code. This is required for error message translations. See https://iso639-3.sil.org/code_tables/639/data?title=&field_iso639_cd_st_mmbrshp_639_1_tid=255291.

string

The ID of the Promotion. This can be found as the Long ID on the promotion details page

metadata
object

This field allows storing any related metadata. The keys of the object can be strings and the values can be any type.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json