Delay Subscription
curl --request POST \
--url https://api.your-domain.com/example/zaymo/customer-portal/delay \
--header 'Content-Type: application/json' \
--header 'X-Zaymo-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"new_date": "2023-12-25"
}
'import requests
url = "https://api.your-domain.com/example/zaymo/customer-portal/delay"
payload = {
"email": "jsmith@example.com",
"new_date": "2023-12-25"
}
headers = {
"X-Zaymo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Zaymo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', new_date: '2023-12-25'})
};
fetch('https://api.your-domain.com/example/zaymo/customer-portal/delay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Customer Portal
Delay Subscription
Postpone the customer’s next subscription billing and shipment to a new date. This endpoint is required for the ‘Delay Subscription’ button to be shown in the customer portal.
POST
/
zaymo
/
customer-portal
/
delay
Delay Subscription
curl --request POST \
--url https://api.your-domain.com/example/zaymo/customer-portal/delay \
--header 'Content-Type: application/json' \
--header 'X-Zaymo-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"new_date": "2023-12-25"
}
'import requests
url = "https://api.your-domain.com/example/zaymo/customer-portal/delay"
payload = {
"email": "jsmith@example.com",
"new_date": "2023-12-25"
}
headers = {
"X-Zaymo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Zaymo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', new_date: '2023-12-25'})
};
fetch('https://api.your-domain.com/example/zaymo/customer-portal/delay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"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
Body
application/json
Customer information and new billing date for subscription delay
Response
Subscription successfully delayed
Indicates if the request was successful
Example:
true
Was this page helpful?