curl --request POST \
--url https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/submit-return-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"items": [
{
"orderLineItemId": "1",
"quantity": 1,
"returnType": "RECEIVED",
"scannedAt": "2022-07-11T15:03:14.642Z",
"shipmentId": "62b37697c67b204dd18a7465",
"shipmentLineId": "12",
"attributes": {
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
},
"exchange": {
"items": [
{
"itemId": 1234,
"quantity": 10,
"sku": "P1234",
"initiateReshipment": true,
"itemUnitPrice": 10,
"itemUnitPriceInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
]
}
],
"isRefundingDisabled": true,
"refund": {
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"conversion": 1,
"currency": "USD"
}
},
"fees": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"isPolicyOverride": true,
"reasonCode": "Incorrect order",
"refundAmount": 21.5,
"refundAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"refunds": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"returnAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"subReasonCode": "Incorrect specification"
}
],
"source": "CSR",
"attributes": {
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
},
"credits": [
{
"amount": 21.5,
"currency": "USD",
"reasonCode": "EC",
"source": "CSR",
"type": "GIFT_CARD",
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"attributes": {
"giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
},
"employeeId": "12312232",
"note": "Credit request initiated",
"paymentCounter": 1,
"policyCode": "RC1",
"subReasonCode": "ACC"
}
],
"employeeId": "62272e917b12209e68751d94",
"fees": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"isExchange": false,
"reasonCode": "Incorrect item",
"refunds": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"returnedAt": "2022-07-11T15:03:14.642Z",
"totalRefundAmount": 21.5
}
'{
"items": [
{
"lineItemId": "62f3dfc438bcab1951be0a19",
"policyCode": "policyCode",
"refundAmount": 21.5,
"returnQuantity": 2,
"returnStatus": "VALID"
}
],
"refundStatus": "REFUND_INITIATED",
"totalRefundAmount": 21.5,
"totalRefundAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
]
}When the customers return request is determined to be eligible, this endpoint is used to process the return request.
Note: If you do not have the order number, but have order ID, use Return order by order ID endpoint - POST /orders/{orderId}/actions/submit-return-request.
curl --request POST \
--url https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/submit-return-request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '
{
"items": [
{
"orderLineItemId": "1",
"quantity": 1,
"returnType": "RECEIVED",
"scannedAt": "2022-07-11T15:03:14.642Z",
"shipmentId": "62b37697c67b204dd18a7465",
"shipmentLineId": "12",
"attributes": {
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
},
"exchange": {
"items": [
{
"itemId": 1234,
"quantity": 10,
"sku": "P1234",
"initiateReshipment": true,
"itemUnitPrice": 10,
"itemUnitPriceInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
]
}
],
"isRefundingDisabled": true,
"refund": {
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"conversion": 1,
"currency": "USD"
}
},
"fees": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"isPolicyOverride": true,
"reasonCode": "Incorrect order",
"refundAmount": 21.5,
"refundAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"refunds": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"returnAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"subReasonCode": "Incorrect specification"
}
],
"source": "CSR",
"attributes": {
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
},
"credits": [
{
"amount": 21.5,
"currency": "USD",
"reasonCode": "EC",
"source": "CSR",
"type": "GIFT_CARD",
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"attributes": {
"giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
},
"employeeId": "12312232",
"note": "Credit request initiated",
"paymentCounter": 1,
"policyCode": "RC1",
"subReasonCode": "ACC"
}
],
"employeeId": "62272e917b12209e68751d94",
"fees": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"isExchange": false,
"reasonCode": "Incorrect item",
"refunds": [
{
"amount": 34.56,
"amountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
],
"name": "RETURN_FEE",
"reason": "Return fee",
"type": "FEE"
}
],
"returnedAt": "2022-07-11T15:03:14.642Z",
"totalRefundAmount": 21.5
}
'{
"items": [
{
"lineItemId": "62f3dfc438bcab1951be0a19",
"policyCode": "policyCode",
"refundAmount": 21.5,
"returnQuantity": 2,
"returnStatus": "VALID"
}
],
"refundStatus": "REFUND_INITIATED",
"totalRefundAmount": 21.5,
"totalRefundAmountInCurrencies": [
{
"currency": "USD",
"group": "SHOPPER",
"amount": 123.45
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.
Unique request ID
Merchant-defined order identifier
Return request
Item details
Show child attributes
Unique identifier for each item in order
"1"
Returned quantity of the given item
1
Return type
PENDING, PROCESSING, REJECTED, RECEIVED "RECEIVED"
Scanned time of return (UTC)
"2022-07-11T15:03:14.642Z"
24-character system-generated shipment ID
"62b37697c67b204dd18a7465"
Unique identifier for each item in the shipment
"12"
Merchant-defined custom attributes. This is a placeholder for additional info in key-value pairs.
{
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
}Item exchange and return details.
Show child attributes
Item to be shipped in exchange for returned item
Show child attributes
Unique identifier of item from fabric Products (PIM) service
1234
Number of items to be exchanged.
10
Stock Keeping Unit (SKU), unique identifier of item
"P1234"
true: Proceed with reshipment immediately, do not wait for return. false: Proceed with the reshipment after return is successful.
true
Item's unit price
10
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
true: Refund is disabled. false: Refund is enabled.
true
Order refund
Show child attributes
Merchant-defined refund amount
34.56
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Conversion required for currency
1
Three-letter currency code as defined by ISO-4217
"USD"
Show child attributes
Merchant-defined return amount
34.56
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Fee name
"RETURN_FEE"
Merchant-defined return reason
"Return fee"
Return fee type
TAX, DISCOUNT, FEE, ITEM, ADJUSTMENT "FEE"
true: Disable policy check. false: Enable the policy check.
true
Reason code for return, varies from merchant to merchant.
"Incorrect order"
Merchant-defined total refund amount
21.5
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Show child attributes
Merchant-defined return amount
34.56
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Fee name
"RETURN_FEE"
Merchant-defined return reason
"Return fee"
Return fee type
TAX, DISCOUNT, FEE, ITEM, ADJUSTMENT "FEE"
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Sub-reason code for return, for another layer of classification
"Incorrect specification"
Merchant-defined source from where the return request was initiated. There are no pre-defined values; possible values are Customer Service Representative (CSR), point-of-sale (POS), etc.
"CSR"
Merchant-defined custom attributes. This is a placeholder for additional info in key: value pairs
{
"fraudCheckSessionId": "59f1d2b88de74aef96d3ec900ad548e0",
"fraudStatus": "FRAUD_PASS"
}Show child attributes
Credits amount
21.5
Three-letter currency code as defined by ISO-4217
"USD"
Reason code
"EC"
Source of credits request
"CSR"
Credit type. Currently, supports only Gift Card
GIFT_CARD "GIFT_CARD"
A list of amounts represented in different currencies.
Each item includes a monetary value and its corresponding currency code,
following the structure defined in the amountInCurrency schema.
This field is used to represent multi-currency totals or balances.
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Merchant-defined custom attributes. This is a placeholder for additional info in key-value pairs.
{
"giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
}Employee (ID or name) who initiated a the credits request
"12312232"
Note
"Credit request initiated"
A sequential or incremental counter associated with a payment for an order. Applicable in refund scenarios to identify the specific payment for refund.
1
Merchant-defined policy code, varies from merchant to merchant. If omitted, the default policy is used.
"RC1"
Subreason code
"ACC"
Employee (ID or name) who initiated the request
"62272e917b12209e68751d94"
Show child attributes
Merchant-defined return amount
34.56
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Fee name
"RETURN_FEE"
Merchant-defined return reason
"Return fee"
Return fee type
TAX, DISCOUNT, FEE, ITEM, ADJUSTMENT "FEE"
true: Return includes one or more exchanges. false: Only returns, no exchange.
false
Merchant-defined reason code for return
"Incorrect item"
Show child attributes
Merchant-defined return amount
34.56
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Fee name
"RETURN_FEE"
Merchant-defined return reason
"Return fee"
Return fee type
TAX, DISCOUNT, FEE, ITEM, ADJUSTMENT "FEE"
Merchant-defined time for return (UTC)
"2022-07-11T15:03:14.642Z"
Merchant-defined total refund amount
21.5
Return request accepted
An object containing the details of a returned order.
Item details
Show child attributes
Merchant-defined unique identifier for each item in an order. When omitted, fabric will generate it (in UUID format) during order creation.
"62f3dfc438bcab1951be0a19"
Merchant-defined policy code, varies from merchant to merchant. If omitted, the default policy is used.
"policyCode"
Merchant-defined total refund amount
21.5
Returned quantity of given item
2
Return status
VALID, POLICY_VIOLATION, PENDING, PROCESSING, REJECTED "VALID"
Refund status
REFUND_INITIATED, REFUND_SUCCESS, REFUND_FAILURE, REFUND_PENDING "REFUND_INITIATED"
Merchant-defined total refund amount
21.5
Show child attributes
Currency in ISO-4217
"USD"
A unique identifier for currencies. All calculations and invoicing are based on this identifier. For example, the Shopper group uses USD, while the Retailer group uses EUR.
"SHOPPER"
The amount displayed in the primary currency.
123.45
Was this page helpful?