REST Order CouponCode

Redeem coupons.

Redeem a coupon code

Redeems a coupon code and applies it to an order. The ID of the order must be specified. If the coupon was successfully redeemed, the coupon data will be returned. If the coupon can not be redeemed, a validation exception will be thrown.

/rest/orders/{orderId}/coupons/{coupon}

Parameters

Field Type Description
orderId Int The ID of the order to redeem the coupon
coupon String The coupon code to be redeemed

Success 200

Field Type Description
campaignId Int The ID of the campaign
validationType String The type of the campaign. Currently the only type available is plentymarkets.
contactId Int The ID of the contact that wants to redeem the coupon
couponCode String The coupon code
currency String The currency of the purchase
referrer Float The order referrer
salesDiscount Float The total discount from a coupon applied to an order. The discount is given as gross amount.
salesDiscountNet Float The net discount from a coupon applied to an order. The net discount is the total discount minus the vat amount.
itemDiscount Float The discount amount applied to items.
itemDiscountNet Float The net discount applied to items.
shippingDiscount Float The discount applied to shipping costs.
shippingDiscountNet Float The net discount applied to shipping costs.
usedVatFields Array The vat fields used for the validation
restCouponAmount Float The remaining coupon amount
checkedItems Array The list of variations that passed the validation
validateParams Array Validation parameters
couponCampaignType String The campaign type

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!