Product Vouchers
GET
v1/products/{product_id}/vouchers/{voucher_id}Retrieves all vouchers for a specified product.
Request
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
An Access Token is a unique string that represents the authorization granted to a client (Partner application) by a user (Merchant or Store Manager) to access their protected resources. It is part of the OAuth 2.0 standard and is used to authenticate API requests on behalf of the user. Access Tokens have a limited lifespan and must be used within their validity period. Once expired, a new Access Token can be obtained using a Refresh Token. Access Tokens should be treated as sensitive information and must be kept secure to prevent unauthorized access to the user's data. If you do not have an Access-Token
, but have the older alternative instead, i.e., the X-Manager-Token
, then see the instructions here on how to obtain the Access-Token
.
Role of the user.
Preferred language for the response. Defaults to en
if not specified.
Request samples
Responses
The unique identifier for the voucher. This field is mandatory and is used to identify the voucher in the system.
The unique code sent to your customer to activate the digital product. This code is mandatory and is used to identify the voucher.
pin_code is optional. It is just an extra key that is used for vouchers that need two keys (for example, Jarir gift cards in Saudi need a key and pin code).
The current status of the voucher. Possible values include:
AVAILABLE
: The voucher is available for use.SOLD
: The voucher has been sold.RESERVED
: The voucher is reserved for a customer.RETURNED
: The voucher has been returned.
This field is mandatory.
The serial number is just used for stock-keeping
and is not used as the key of the digital product.
expires_at is optional, and it should be a DateTime in iso8601 format.
The timestamp indicating when the voucher was created. This field is automatically generated by the system.
The timestamp indicating the last time the voucher was updated. This field is automatically generated by the system.