API
Docs and API's for Weasy.io
Returns
Manage all the shopping cart returns from your website.Accepts GET PUT DELETE
All requests to the API must be authenticated with an API key on the HTTP Authorization header.
GET
Get all returns headers or returns detail from your e-commerceRequest example
~ curl -i -X GET \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/returns
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/returns
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| limit | integer | optional | define items per page |
| page | integer | optional | define page to display |
| since | date | optional | filter result starting at defined date date format ISO 8601 |
| status | string | optional | filter result by order status. Comma separator for multiple status options: all the status options can be obtained from the Order Status endpoint |
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| lang | string | optional | define the language to show data options: all the iso country codes (ISO 3166-2) obtained from the Languages endpoint |
PUT
Change a return status.Request example
~ curl -i -X PUT \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"status":"shipped","shippingtracking":"CTT-A3K8F72"}'\
https://api.weasy.io/v1/returns/MB123123
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"status":"shipped","shippingtracking":"CTT-A3K8F72"}'\
https://api.weasy.io/v1/returns/MB123123
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| trackingCode | string | required | return tracking code |
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| status | string | required | order new status options: Finished Canceled Pending Waiting |
| refundType | string | required if status = "Finalizada" (finished) | Return refund type options: 1 for Exchange product 2 for Cash Refund 3 for Voucher |
DELETE
Delete a ret or collection of returns from your returns database.Request example
~ curl -i -X DELETE \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/returns
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/returns
Body response example [ HTTP CODE: 200 ]
Body attributes
| Attribute description |
|---|
| A json payload containing an array of id or ids. |