Developer Guide
Order Return
An order or portion of an order is eligible for return if:
- It’s fulfilled.
- The items to be returned aren’t previously returned.
- The item’s
eligible
property is set tofalse
in check order return eligibility API response. - The item aligns with fabric’s return policy.
General Rules:
- Return for an item is identified by the
exchange
boolean (exchange
is set tofalse
) field on the return payload. - Return for an order is validated for eligibility based on the orderId and lineItemId.
- Charged amount in the payments object of the order document shouldn’t be null to process the refund.
- Use the
POST/v3/orders/{orderId}/actions/submit-return-request
endpoint to initiate order return by order ID. - You can also use the
POST/v3/orders/order-number/{orderNumber}/actions/submit-return-request
endpoint to initiate order return by order number. - Order status should be one of:
ORDER_DELIVERED
,ORDER_SHIPPED
,ORDER_PARTIALLY_SHIPPED
,ORDER_PARTIALLY_DELIVERED
,ORDER_PARTIALLY_RETURNED
,
ORDER_PARTIALLY_CANCELLED
,PICKUP_COMPLETE
. - The
lineOrderStatus
should be one of:PENDING_EXCHANGE
,RETURN_PROCESSING
,PARTIALLY_CANCELLED
,PARTIALLY_REFUNDED
,PARTIALLY_CANCELLED_REFUNDED
,VALID
,PENDING_RETURN
,ORDER_LINE_VALID
,SHIPPED
,PARTIALLY_SHIPPED
,PARTIALLY_ALLOCATED
,DELIVERED
,PARTIALLY_DELIVERED
,PARTIAL_RETURN
. - Initiate a return when an item is pending to be received at the distribution center
- Create a return when the item is received at the distribution center for return
Initiate a return request when an item is pending to be received at the distribution center
When a shopper or a customer service agent creates a return request, but the item isn’t received at the distribution center:
- Set
returnType
toPENDING
in the request payload while using thePOST/v3/orders/{orderId}/actions/submit-return-request
endpoint to create a return.
lineOrderStatus
will be updated toRETURN_PENDING
for the line item of an order ID. Merchants can get the order details, along with the order status, by calling theGET/v3/orders/{orderId}
endpoint.RETURN_PENDING
webhook event is triggered if the merchant has subscribed to the event. The target URL of the subscription payload is notified.
sample curl
Item reaches the distribution center and is processed for return or reject
- When an item reaches the distribution center, use the
POST/v3/orders/{orderId}/actions/submit-return-request
endpoint to setreturnType
toPROCESSING
in the request payload. lineOrderStatus
will be updated toRETURN_PROCESSING
for the line item of the order ID. You can get the order details, along with the order status, by calling theGET/v3/orders/{orderId}
endpoint.- At this stage, the customer service agent at the warehouse or the distribution center does the quality checks such as, if the item is in good condition to return if the item matches the original order, etc. After a thorough inspection, the CSR can accept or reject the return request.
RETURN_PROCESSING
webhook event is triggered if the merchant has subscribed to the event. The target URL of the subscription payload is notified about the event.
sample curl:
- If customer service agent rejects the return request for any reason, they must use the
POST/v3/orders/{orderId}/actions/submit-return-request
endpoint to setreturnType
toREJECTED
. - Provide proper reason and sub-reasons for rejecting the return request.
lineOrderStatus
is updated toRETURN_REJECTED
for the line item of the order ID. You can get the order details, along with the order status, by calling theGET/v3/orders/{orderId}
endpoint.RETURN_REJECTED
webhook event is triggered if the merchant has subscribed to the event. The target URL will be notified of the event.
sample curl:
Create a return when an item is received or accepted for return
- Use
POST/v3/orders/{orderId}/actions/submit-return-request
endpoint, and setreturnType
toreceived
. - The amount received for return will be validated based on the invoiced amount for the item. If validation fails for any reason, an error message will be returned.
- If a refund for returned item is successful, the response for the order return endpoint (POST/api/v2/order/return) will display
refundStatus
asSUCCESSFUL
. - If all the quantity of line items are returned:
lineOrderStatus
(return status at item level) will be updated toRETURNED
.statusCode
(return status at order level) will be updated toORDER_RETURNED
.
- If some of the quantities of line items are returned:
lineOrderStatus
(return status at item level) will be updated toPARTIALLY_RETURNED
.statusCode
(return status at order level) will be updated toORDER_PARTIALLY_RETURNED
.
- If the refund failed for any reason, the response for the order return endpoint (POST/api/v2/order/return) will display
refundStatus
asREFUND_FAILED
. RETURN_NOTIFICATION_EMAIL
andREFUND_NOTIFICATION_EMAIL
webhook events are triggered if the merchant has subscribed to the events, and details are sent to the merchant.
sample curl:
Was this page helpful?