Item Return API (0.1)
Download OpenAPI specification:Download
List returns for order
Authorizations:
path Parameters
| order_id required | string The identifier for the order. |
Responses
Response samples
- 200
[- {
- "refunded_amount": 775.19,
- "return_id": "1fc4d366-40ca-4e36-b38f-66393bda517a",
- "returned_from": "27a39710-4b2d-43fd-b636-5f7aed3073a2",
- "currency": "USD",
- "return_items": [
- {
- "product_id": "1000031"
}
]
}, - {
- "refunded_amount": 666.32,
- "return_id": "97fada4f-8eaf-4e91-aebd-c289c10c3311",
- "returned_from": "7c9f2605-9fb3-5444-8fee-47fe51608efe",
- "currency": "USD",
- "return_items": [
- {
- "product_id": "1000001"
}
]
}
]Create return (legacy)
Initiates the return process for item(s) in an order.
Imports a historical return into NewStore when is_historical is set to true.
is_historical is deprecated on this endpoint.
Warning: This call still issues a live refund to the payment provider.
To record a historical return without calling the payment provider, use
Item Return v1
(POST /v1/d/orders/{order_id}/returns).
You must specify the condition code for an item when creating a return.
NewStore creates condition codes for your business.
To retrieve the list of condition codes configured for your business, contact the support team.
If the refund amount is not provided in the request, it is calculated by the platform:
- If only some items from the order are returned, sum of the item prices is refunded.
- If the config property
refund_shipping_costis set toTrueand all items in the order are returned, the amount refunded includes the sum of the item prices and the shipping costs. - If the config property
refund_shipping_costis not set, or set toFalse, the sum of the item prices is refunded. Shipping costs are not included in this amount, and not refunded.
Authorizations:
path Parameters
| order_id required | string The identifier for the order. |
Request Body schema: application/json
| is_historical | boolean Deprecated Deprecated. Set to true, if the return is historical, i.e. it was processed by an external system. On this endpoint the return is recorded and a live refund is still issued. Use Item Return v1 instead. |
| returned_at | string or null <date-time> The time when the item was returned. If this property is not set in the request, it is set to the current time. |
| returned_from required | string non-empty The fulfillment_node_id of the location to which the item was returned. |
| refund_amount | number or null The amount to be refunded. If this property is not set in the request, it is calculated automatically. |
required | Array of objects non-empty |
Array of objects <= 100 items This is a list of read-only objects that can be used to display additional information. |
Responses
Request samples
- Payload
{- "items": [
- {
- "product_id": "1000031",
- "return_reason": "Wrong size",
- "return_code": 1,
- "item_condition": "Resell",
- "condition_code": 1
}, - {
- "product_id": "1000032",
- "return_reason": "Damaged",
- "return_code": 2,
- "item_condition": "Scrap",
- "condition_code": 2
}
], - "returned_from": "27a39710-4b2d-43fd-b636-5f7aed3073a2"
}Response samples
- 201
{- "refunded_amount": 775.19,
- "return_id": "1fc4d366-40ca-4e36-b38f-66393bda517a",
- "returned_from": "27a39710-4b2d-43fd-b636-5f7aed3073a2",
- "currency": "USD",
- "return_items": [
- {
- "product_id": "1000031"
}, - {
- "product_id": "1000032"
}
]
}Get return
Retrieves the specified return.
Authorizations:
path Parameters
| return_id required | string The identifier for the returns. |
| order_id required | string The identifier for the order. |
Responses
Response samples
- 200
{- "refunded_amount": 1406.75,
- "return_id": "76ba2c90-c413-438e-8040-a3585a2db770",
- "returned_from": "7c9f2605-9fb3-5444-8fee-47fe51608efe",
- "currency": "USD",
- "return_items": [
- {
- "product_id": "1000061",
- "item_condition": "Sellable",
- "condition_code": 1,
- "return_reason": "Too small",
- "return_code": 2
}, - {
- "product_id": "1000221",
- "item_condition": "Scrap",
- "condition_code": 2,
- "return_reason": "Damaged",
- "return_code": 1
}
]
}