Cancellations integration API example
CANCELLATION CONFIRMATION SCRIPTS EXAMPLE
The following examples contain variables in bold that must be adjusted to your system environment according to this documentation
Example (application/x-www-form-urlencoded)
curl --header "Authorization: Api-Key <api_key>" --data "order_id=3453&product_ids=98734&variation_ids=98734-L&date=2017-09-12&ecomm_size=L" -X POST https://usizy.com/api/v2/event/cancel
Example (application/x-www-form-urlencoded) multiple products
curl --header "Authorization: Api-Key <api_key>" --data "order_id=3453&product_ids=98734&product_ids=81273&product_ids=512312&variation_ids=98734-L&variation_ids=81273-M&variation_ids=512312-42&date=2017-09-12&ecomm_size=L&ecomm_size=M&ecomm_size=42" -X POST https://usizy.com/api/v2/event/cancel
Example (multipart/form-data)
curl --header "Authorization: Api-Key <api_key>" -F "order_id=3453" -F "product_ids=98734" -F "variation_ids=98734-L" -F "date=2017-09-12" -F "ecomm_size=L" -X POST https://usizy.com/api/v2/event/cancel
Example (multipart/form-data) multiple products
curl --header "Authorization: Api-Key <api_key>" -F "order_id=3453" -F "product_ids=98734" -F "product_ids=81273" -F "product_ids=512312" -F "variation_ids=98734-L" -F "variation_ids=81273-M" -F "variation_ids=512312-42" -F "date=2017-09-12" -F "ecomm_size=L" -F "ecomm_size=M" -F "ecomm_size=42" -X POST https://usizy.com/api/v2/event/cancel
Example (application/json)
curl --header "Authorization: Api-Key <api_key>" --header "Content-Type: application/json" --data '{
"order_id": "3453",
"date": "2017-09-12",
"product_ids": ["98734"],
"variation_ids": ["98734-L"],
"ecomm_size": ["L"]}' -X POST https://usizy.com/api/v2/event/cancel
Example (application/json) multiple products
curl --header "Authorization: Api-Key <api_key>" --header "Content-Type: application/json" -d '{
"order_id": "3453",
"date": "2017-09-12",
"product_ids": ["98734", "81273", "512312"],
"variation_ids": ["98734-L", "81273-M", "512312-42"],
"ecomm_size": ["L","M","42"]}' -X POST https://usizy.com/api/v2/event/cancel