Name

/returns

Method

GET

Request

Name Type Mandatory Description
api_token string yes API key provided by SWAP.
store string yes The store id that the RMAs belong to.
from_date date yes Only orders that were created or modified on or after this date will be returned.
to_date date no Only orders that were modified before or on this date will be returned.
limit number yes The number of orders to return (max is 50). This means the list of orders will be paginated if there are more than 50 that fulfil the request parameters.
version number yes 1

Response

The endpoint will return a JSON payload with 3 levels:

Root level

Name Type Description
from_date date The same “from_date” value sent in the request.
to_date date The same “to_date” value sent in the request.
next_from_date date This is the from_date of the last order returned in the orders field (orders are sorted by “date modified” in asc order).

Pagination is achieved by sending this value in the from_date in the request. | | limit | number | The same “limit” value sent in the request. | | returned | number | The number of orders returned in this response. | | remaining | number | Number of orders remaining that fulfil the request parameters. | | orders | list of orders | The list of orders that fulfil the request parameters. | | version | number | 1 |

Orders level

Name Type Description
order_name string Shopify’s order name
order_id string Shopify’s order ID
rma string SWAP’s RMA number
date_created date Date the return was created
date_updated date Date the return was updated
type_string string A comma separated string containing the types of returns.
type list of strings An array listing the types of returns. Can be one of the following:

billing_address object

Name Type Description
name string Billing address full name
address1 string Billing address line 1
address2 string Billing address line 2
city string Billing address city
postcode string Billing address zip/postcode
state_province_code string Billing address state/province code
country_code string Billing address country code

Products level

| --- | --- | --- |