Get Discount
curl --request GET \
--url https://api.your-domain.com/example/zaymo/discounts/get-discount \
--header 'X-Zaymo-API-Key: <api-key>'import requests
url = "https://api.your-domain.com/example/zaymo/discounts/get-discount"
headers = {"X-Zaymo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Zaymo-API-Key': '<api-key>'}};
fetch('https://api.your-domain.com/example/zaymo/discounts/get-discount', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"discount_type": "percentage",
"discount_percentage": 15,
"discount_amount": 10
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Discounts
Get Discount
Retrieve discount information for a given discount code. This endpoint is necessary to support discounts in the add product and reactivate endpoints. Zaymo calls this endpoint to validate discount codes and retrieve the discount type and amount before applying them to products or subscriptions.
GET
/
zaymo
/
discounts
/
get-discount
Get Discount
curl --request GET \
--url https://api.your-domain.com/example/zaymo/discounts/get-discount \
--header 'X-Zaymo-API-Key: <api-key>'import requests
url = "https://api.your-domain.com/example/zaymo/discounts/get-discount"
headers = {"X-Zaymo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Zaymo-API-Key': '<api-key>'}};
fetch('https://api.your-domain.com/example/zaymo/discounts/get-discount', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"discount_type": "percentage",
"discount_percentage": 15,
"discount_amount": 10
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Zaymo will authenticate requests using the API key you provide
Query Parameters
The discount code to retrieve information for
Was this page helpful?