post https://api.zenoti.com/v1/invoices//campaign_discount/apply
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
Name | Type | Description |
---|---|---|
offer_code | string | Unique code of the media campaign offer. |
center_id | guid | Unique 32-character identifier of the center at which the media campaign offer is applied on the guest's invoice. |
Response Details
Name | Type | Description |
---|---|---|
discount_applied | boolean | Indicates whether a discount was applied on the guest's specified invoice, as part of the media campaign offer. |
campaign_id | guid | Unique 32-character identifier of the media campaign offer that is applied on the guest's invoice. |
error | object | Object that contains error message and error code details. For more information, refer to the error Object table. |
error Object
code | message |
---|---|
503 | Offer code is required for applying campaign. |
418 | Invoice not found. |
428 | Invoice not found. |
492 | Group Invoice not supported. |
429 | Invoice item not found. |
4051 | User cannot access. |
4045 | Center ID cannot be empty. |
502 | Invoice center is not a valid center. |
502 | Organization ID does not match with invoice's organization ID. |
4017 | Campaign cannot be found with the given campaign details. |
468 | Organization does not allow custom discounts. |
4024 | This campaign cannot be applied simultaneously with another campaign. Undo applied campaigns to proceed with this campaign. |
4025 | Campaign can not be applied as Discount pre-requisites are not present. |
4026 | Voucher cannot be redeemed as the voucher code was already used. |
4027 | Voucher cannot be redeemed as the voucher code does not exist. |
4028 | Campaign cannot be redeemed since maximum number of redemptions for campaign has already reached. |
4024 | This campaign cannot be redeemed along with other campaigns that allow redeeming multiple campaigns. |
4029 | This campaign cannot be redeemed since another campaign that does not allow redeeming multiple campaigns is already applied. |
4029 | The 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. |
4024 | This campaign cannot be applied simultaneously with another campaign.Undo applied campaigns to proceed with this campaign. |
500 | There was an error while applying the campaign. |