Undo Add Product (Optional)
curl --request POST \
--url https://api.your-domain.com/example/zaymo/upsells/undo-add-product \
--header 'Content-Type: application/json' \
--header 'X-Zaymo-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"product_id": "<string>"
}
'import requests
url = "https://api.your-domain.com/example/zaymo/upsells/undo-add-product"
payload = {
"email": "jsmith@example.com",
"product_id": "<string>"
}
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', product_id: '<string>'})
};
fetch('https://api.your-domain.com/example/zaymo/upsells/undo-add-product', 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>"
}
}Upsells
Undo Add Product (Optional)
Remove a product from a customer’s order that was previously added using the add-product endpoint. Implementation of this endpoint is optional - if not implemented, customers will not be able to undo their purchases in the email upsell widget.
POST
/
zaymo
/
upsells
/
undo-add-product
Undo Add Product (Optional)
curl --request POST \
--url https://api.your-domain.com/example/zaymo/upsells/undo-add-product \
--header 'Content-Type: application/json' \
--header 'X-Zaymo-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"product_id": "<string>"
}
'import requests
url = "https://api.your-domain.com/example/zaymo/upsells/undo-add-product"
payload = {
"email": "jsmith@example.com",
"product_id": "<string>"
}
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', product_id: '<string>'})
};
fetch('https://api.your-domain.com/example/zaymo/upsells/undo-add-product', 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
Product and customer information for removing from order
Response
Product successfully removed from order
Indicates if the request was successful
Example:
true
Was this page helpful?