Skip to content

Applies a coupon to an existing order

Request

This is designed to be run by administrators; allows an order to e processed but have prices or quantities overridden

Security
knox-authorizer
Path
tenantIdstringrequired

The id of the tenant being accessed

Bodyapplication/jsonrequired

The order that you would like to be saved.

coupon_code_idstring(Coupon Code)required
optionsobject(Options)
order_idstring(Order)required
curl -i -X POST \
  'https://docs.api.rhythmsoftware.com/_mock/apis/commerce/commerce-v1/orders/{tenantId}/retroactivelyApplyCoupon' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "coupon_code_id": "string",
    "options": {
      "action": "credit",
      "batch_id": "string",
      "do_not_perform_electronic_refund": true,
      "ignore_payment_gateway_errors": true
    },
    "order_id": "string"
  }'

Responses

The order preview was successful

Headers
Access-Control-Allow-Headersstring
Access-Control-Allow-Methodsstring
Access-Control-Allow-Originstring
Bodyapplication/json
executionArnstring(Executionarn)required

The arn of the execution

notification_channelstring(Notification Channel)

The id of the channel where progress updates will be posted

notification_publishKeystring(Notification Publishkey)

The publish key for the channel where progress updates will be posted

notification_subscribeKeystring(Notification Subscribekey)

The subscribe key for the channel where progress updates will be posted

start_datestring, (date-time)(Start Date)

The start date of the execution

Response
{ "executionArn": "string", "notification_channel": "string", "notification_publishKey": "string", "notification_subscribeKey": "string", "start_date": "2019-08-24T14:15:22Z" }