OMS DOCUMENTATIONRESOURCE CENTER

These guides provide examples for many tasks that a developer will need to be familiar with during implementation.

KIBO OMS DEVELOPMENT

Documentation

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.

Version2.0
Callhttps://integration.shopatron.com/api/v2/order/action/addPromotion
Supported FormatsJSON
HTTP MethodPOST
Schemahttps://integration.shopatron.com/api/v2/schema/order/action/addPromotion.json

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.

Example

The example case will add the following promotion to an order:

  • Order ID 000000
  • Promotion Code “exampleDiscount!”

Required Parameters

Adding an order promotion only requires two parameters, and has no optional properties:

ParameterTypeDescription
orderIDintegerA unique identifier for the order. The minimum value is “1”.
promotionCodestringThe 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.

{
  "orderID": 00000,
  "promotionCode": "exampleDiscount!"
}

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.

"discounts":[  
   {  
      "code":"exampleDiscount!",
      "singleUseCode":"",
      "description":"A fake promotion showing how this call works",
      "amount":0.01,
      "quantity":1
   }
]