Add Order Promotion
The Order Promotion API allows for an existing promotion code to be applied to an order. This action is performed based on only that ID and code, though the promotion object itself includes more detailed data as seen in the Get Order response below.
The .json address above can be used to access the schema within Postman. An example use of the Add Order Promotion API follows below, or view the schema or the sample Postman Collection.
The example case will add the following promotion to an order:
- Order ID 000000
- Promotion Code “exampleDiscount!”
Adding an order promotion only requires two parameters, and has no optional properties:
|orderID||integer||A unique identifier for the order. The minimum value is “1”.|
|promotionCode||string||The code of the particular discount promotion to be applied.|
The Full Request
This is the entire request that will add a promotion to an order.
The returned response follows the same structure as the Get Order API, providing information about the order that the promotion was applied to. The promotion will be specified in the discounts block of of the response, as seen below.
"description":"A fake promotion showing how this call works",