Vouchers

Vouchers are generated by the Rewards for a specific Customer account and they are applied during the purchasing process. They are defined by its value, validity and related Reward. Vouchers can be managed by this resource.

Available methods

All available methods for resource vouchers.

HTTP method Endpoint Description
[badge-blue GET] /vouchers Get a list of all vouchers
[badge-blue GET] /vouchers/{voucher_id} Get a specific voucher data

Actions

Action method for resource vouchers.

HTTP method Endpoint Description
[badge-green POST] /vouchers/{voucher_id}/actions/apply-voucher Application of a voucher


Get all vouchers

Get information as a list o all vouchers
[badge-blue GET] /vouchers

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No
customer_id string The unique id for the customer that has the vouchers on the account. No
code string Unique code of the voucher No
store_id string The unique id for the store where the reward was applied. No
is_valid boolean Filter for valid vouchers.
Possible values: true - all vouchers in validity range / false - all vouchers before or after validity range / no value - all vouchers
No
is_applied boolean Filter voucher by the application condition.
Possible values: true - all applied vouchers / false - all vouchers, that have not been applied yet / no value - all vouchers
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
vouchers Voucher[] List of all recent vouchers
total_items integer Count of all recent vouchers


Get a voucher

Get information about a specific voucher
[badge-blue GET] /vouchers/{voucher_id}

Path parameters

Parameter name Type Description
voucher_id string The unique id for the voucher

Response

Status code: 200 OK
Output structure : Voucher


Application of a voucher

Sets a voucher as applied
[badge-green POST] /vouchers/{voucher_id}/actions/apply-voucher

Path parameters

Parameter name Type Description
voucher_id string The unique id for the voucher

Request

Parameter name Type Description Mandatory (Yes/No)
store_id string The unique id for the store where the voucher is applied No
date_applied string Date (ISO 8601) of voucher application
YYYY-MM-DD HH:MM:SS
Yes

Response

Status code: 204 No Content