Apply a media campaign offer code on an invoice

This API helps you to apply a media campaign offer code on an invoice. By doing so, you can provide your guests the option to avail promotional discounts on their invoice when they purchase any services or products from your Customer Mobile Application (CMA) or custom Webstore. For more information on how to configure a media campaign, refer to this Help article.

You must specify appropriate data for the invoice_id parameter.

Request Body Details

NameTypeDescription
offer_codestringUnique code of the media campaign offer.
center_idguidUnique 32-character identifier of the center at which the media campaign offer is applied on the guest's invoice.

Response Details

NameTypeDescription
discount_appliedbooleanIndicates whether a discount was applied on the guest's specified invoice, as part of the media campaign offer.
campaign_idguidUnique 32-character identifier of the media campaign offer that is applied on the guest's invoice.
errorobjectObject that contains error message and error code details. For more information, refer to the error Object table.

error Object

codemessage
503Offer code is required for applying campaign.
418Invoice not found.
428Invoice not found.
492Group Invoice not supported.
429Invoice item not found.
4051User cannot access.
4045Center ID cannot be empty.
502Invoice center is not a valid center.
502Organization ID does not match with invoice's organization ID.
4017Campaign cannot be found with the given campaign details.
468Organization does not allow custom discounts.
4024This campaign cannot be applied simultaneously with another campaign. Undo applied campaigns to proceed with this campaign.
4025Campaign can not be applied as Discount pre-requisites are not present.
4026Voucher cannot be redeemed as the voucher code was already used.
4027Voucher cannot be redeemed as the voucher code does not exist.
4028Campaign cannot be redeemed since maximum number of redemptions for campaign has already reached.
4024This campaign cannot be redeemed along with other campaigns that allow redeeming multiple campaigns.
4029This campaign cannot be redeemed since another campaign that does not allow redeeming multiple campaigns is already applied.
4029The campaign was already applied on few items in the invoice. To apply the campaign on more items, undo the application, and then reapply the campaign.
4024This campaign cannot be applied simultaneously with another campaign.Undo applied campaigns to proceed with this campaign.
500There was an error while applying the campaign.
Language
Authorization
Header
Click Try It! to start a request and see the response here!