API returns integration script example

RETURN CONFIRMATION SCRIPTS EXAMPLE

The variables in the following examples must be adjusted to your system, so that the values are correctly populated, according to this documentation.

Content type: application/json
  • Single item within the API call
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"],
        "reason": ["size"],
        "fit": ["small"],
        "return_cost": "15",
        "currency": "EUR"}' -X POST https://usizy.com/api/v2/event/return
  • Multiple items within the API call
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"],
        "reason": ["size","other","size"],
        "fit": ["small","","large"],
        "return_cost": "15",
        "currency": "EUR"}' -X POST https://usizy.com/api/v2/event/return

Content type: application/x-www-form-urlencoded
  • Single item within the API call
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&reason=size&fit=small&return_cost=15&currency=EUR" -X POST https://usizy.com/api/v2/event/return
  • Multiple items within the API call
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&reason=size&reason=other&reason=size&fit=small&fit=&fit=large&return_cost=15&currency=EUR" -X POST https://usizy.com/api/v2/event/return

Content type: multipart/form-data
  • Single item within the API call
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" -F "reason=size" -F "fit=small" -F "return_cost=15" -F "currency=EUR" -X POST https://usizy.com/api/v2/event/return
  • Multiple items within the API call
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" -F "reason=size" -F "reason=other" -F "reason=size" -F "fit=small" -F "fit=" -F "fit=large" -F "return_cost=15" -F "currency=EUR" -X POST https://usizy.com/api/v2/event/return