curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/return \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"returnCode": "2001",
"returnMessage": "Customer not interested"
}
'{
"orderId": "1626-4972-66351",
"status": "Successfully Returned order",
"order": {
"tags": "<array>",
"channel": 12,
"orderTotal": 124.33,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_RETURNED",
"statusLog": "Order has been Returned",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerPhone": {
"number": "555-555-5555",
"kind": "mobile"
},
"orderId": "1626-4972-66351",
"revision": 2,
"totalQuantity": 10,
"statusDescriptions": [
{
"_id": "614b0e0c6c4e26000906b513",
"status": "ORDER_RETURNED",
"code": "2001",
"description": "Customer is no longer interested in product",
"date": "2021-09-22T11:05:48.210Z",
"id": "614b0e0c6c4e26000906b513"
}
],
"events": "<array>",
"attributes": "<array>",
"__v": 0,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"shipTo": [
{
"address": {
"name": {
"first": "Mark",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"isValidated": false,
"email": "[email protected]",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
},
"delivery": {
"actual": "<string>"
},
"shipping": {
"actual": "<string>"
},
"promosApplied": [
{
"name": "test1"
}
],
"_id": "602c1511fcc5e900078ba4af",
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10,
"committedTax": 10,
"total": 34.87,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "10000001",
"promisedDeliveryDate": "2021-02-14T00:00:00.000Z",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered",
"readyForPickups": "<array>",
"id": "602c1511fcc5e900078ba4af"
}
],
"items": [
{
"group": [
"Group1"
],
"promosApplied": [
{
"name": "test"
}
],
"_id": "602c1511fcc5e900078ba4b0",
"lineItemId": 1,
"itemId": 1000000663,
"sku": "1538910",
"title": "Luminous Cushion Lagoon",
"quantity": 10,
"price": 4.5,
"discount": 1,
"currency": "USD",
"shipToId": 1000001,
"estimatedTax": 10.25,
"total": 4.54,
"taxCode": "FR020000",
"weight": 10,
"weightUnit": "lb",
"attributes": "<array>",
"reservedLocation": "<array>",
"id": "602c1511fcc5e900078ba4b0"
}
],
"shipments": [
{
"_id": "602c1607128f5e00078ad8ed",
"shippedDate": "2021-02-16T18:59:11.480Z",
"shipToId": 1000001,
"shipmentCarrier": "USPS",
"shipmentCarrierUrl": "https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989",
"trackingNumber": "65765798989",
"lineItems": [
{
"_id": "602c1607128f5e00078ad8ee",
"lineItemId": 1,
"quantity": 10,
"id": "602c1607128f5e00078ad8ee"
}
],
"shipmentStatus": "ORDER_SHIPPED",
"id": "602c1607128f5e00078ad8ed"
}
],
"payments": [
{
"billToAddress": {
"name": {
"first": "Marl",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"isValidated": false,
"email": "[email protected]",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
},
"shipToId": [
1000001
],
"_id": "602c1511fcc5e900078ba4b1",
"billToId": 1000001,
"paymentIdentifier": {
"cardIdentifier": 4242
},
"paymentMethod": "Visa",
"paymentToken": {
"token": 123456789
},
"paymentKind": "Default payment",
"amount": 533.33,
"currency": "USD",
"conversion": 1,
"paymentStatus": "Pending",
"id": "602c1511fcc5e900078ba4b1"
}
]
}
}Return order by user
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/return \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"returnCode": "2001",
"returnMessage": "Customer not interested"
}
'{
"orderId": "1626-4972-66351",
"status": "Successfully Returned order",
"order": {
"tags": "<array>",
"channel": 12,
"orderTotal": 124.33,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_RETURNED",
"statusLog": "Order has been Returned",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerPhone": {
"number": "555-555-5555",
"kind": "mobile"
},
"orderId": "1626-4972-66351",
"revision": 2,
"totalQuantity": 10,
"statusDescriptions": [
{
"_id": "614b0e0c6c4e26000906b513",
"status": "ORDER_RETURNED",
"code": "2001",
"description": "Customer is no longer interested in product",
"date": "2021-09-22T11:05:48.210Z",
"id": "614b0e0c6c4e26000906b513"
}
],
"events": "<array>",
"attributes": "<array>",
"__v": 0,
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"shipTo": [
{
"address": {
"name": {
"first": "Mark",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"isValidated": false,
"email": "[email protected]",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
},
"delivery": {
"actual": "<string>"
},
"shipping": {
"actual": "<string>"
},
"promosApplied": [
{
"name": "test1"
}
],
"_id": "602c1511fcc5e900078ba4af",
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10,
"committedTax": 10,
"total": 34.87,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "10000001",
"promisedDeliveryDate": "2021-02-14T00:00:00.000Z",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered",
"readyForPickups": "<array>",
"id": "602c1511fcc5e900078ba4af"
}
],
"items": [
{
"group": [
"Group1"
],
"promosApplied": [
{
"name": "test"
}
],
"_id": "602c1511fcc5e900078ba4b0",
"lineItemId": 1,
"itemId": 1000000663,
"sku": "1538910",
"title": "Luminous Cushion Lagoon",
"quantity": 10,
"price": 4.5,
"discount": 1,
"currency": "USD",
"shipToId": 1000001,
"estimatedTax": 10.25,
"total": 4.54,
"taxCode": "FR020000",
"weight": 10,
"weightUnit": "lb",
"attributes": "<array>",
"reservedLocation": "<array>",
"id": "602c1511fcc5e900078ba4b0"
}
],
"shipments": [
{
"_id": "602c1607128f5e00078ad8ed",
"shippedDate": "2021-02-16T18:59:11.480Z",
"shipToId": 1000001,
"shipmentCarrier": "USPS",
"shipmentCarrierUrl": "https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989",
"trackingNumber": "65765798989",
"lineItems": [
{
"_id": "602c1607128f5e00078ad8ee",
"lineItemId": 1,
"quantity": 10,
"id": "602c1607128f5e00078ad8ee"
}
],
"shipmentStatus": "ORDER_SHIPPED",
"id": "602c1607128f5e00078ad8ed"
}
],
"payments": [
{
"billToAddress": {
"name": {
"first": "Marl",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"isValidated": false,
"email": "[email protected]",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
},
"shipToId": [
1000001
],
"_id": "602c1511fcc5e900078ba4b1",
"billToId": 1000001,
"paymentIdentifier": {
"cardIdentifier": 4242
},
"paymentMethod": "Visa",
"paymentToken": {
"token": 123456789
},
"paymentKind": "Default payment",
"amount": 533.33,
"currency": "USD",
"conversion": 1,
"paymentStatus": "Pending",
"id": "602c1511fcc5e900078ba4b1"
}
]
}
}The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
15"2947-5955-82579"
Successfully canceled order
"1626-4972-66351"
"Successfully Returned order"
Show child attributes
12
124.33
5.23
"USD"
"ORDER_RETURNED"
"Order has been Returned"
"5e3598e3007c5e00080d2bb8"
"5e3598e3007c5e00080d2bb8"
"1626-4972-66351"
2
10
Show child attributes
"614b0e0c6c4e26000906b513"
"ORDER_RETURNED"
"2001"
"Customer is no longer interested in product"
"2021-09-22T11:05:48.210Z"
"614b0e0c6c4e26000906b513"
0
"5fee9d59f2f08a1b3cbdea08"
"2020-12-31T02:09:53.914Z"
"2020-12-31T02:09:53.914Z"
Show child attributes
Show child attributes
false
"10400 NE 4th St"
"Suite 500"
"Bellevue"
"WA"
"USA"
"98004"
"Ship to address"
"602c1511fcc5e900078ba4af"
1000001
"SHIP_TO_ADDRESS"
24.87
"USD"
10
10
34.87
"FR020000"
"Fedex"
"Express"
"10000001"
"2021-02-14T00:00:00.000Z"
"Leave at back door"
"Delivered"
"602c1511fcc5e900078ba4af"
Show child attributes
"602c1511fcc5e900078ba4b0"
1
1000000663
"1538910"
"Luminous Cushion Lagoon"
10
4.5
1
"USD"
1000001
10.25
4.54
"FR020000"
10
"lb"
"602c1511fcc5e900078ba4b0"
Show child attributes
"602c1607128f5e00078ad8ed"
"2021-02-16T18:59:11.480Z"
1000001
"USPS"
"https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989"
"65765798989"
"ORDER_SHIPPED"
"602c1607128f5e00078ad8ed"
Show child attributes
Show child attributes
false
"10400 NE 4th St"
"Suite 500"
"Bellevue"
"WA"
"USA"
"98004"
"Ship to address"
"602c1511fcc5e900078ba4b1"
1000001
"Visa"
"Default payment"
533.33
"USD"
1
"Pending"
"602c1511fcc5e900078ba4b1"
Was this page helpful?