curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/query \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"offset": 0,
"limit": 10,
"sortBy": "createdAt",
"sortDirection": "desc",
"filters": {
"status": [
"ORDER_CREATED",
"ORDER_PAYMENT_AUTHORIZED"
],
"date": {
"gte": "2020-11-01T18:12:03.412Z",
"lte": "2022-12-03T18:12:03.412Z"
},
"orderTotal": {},
"totalQuantity": {},
"attributes": [
{
"attributeId": "60119337cb662800075717f8",
"value": "blue"
}
],
"customerUserId": [
"<string>"
],
"customerEmail": [
"<string>"
],
"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"
}
]
}
}
'{
"query": {
"limit": 2,
"offset": 0,
"count": 6,
"orderTotalSum": 13543.5,
"orderAverage": 2257.25,
"totalQuantitySum": 82,
"statusCounts": {
"ORDER_CREATED": 0,
"ORDER_CONFIRMED": 0,
"ORDER_CANCELLED": 0,
"ORDER_PARTIALLY_SHIPPED": 0,
"ORDER_SHIPPED": 0,
"ORDER_PARTIALLY_DELIVERED": 0,
"ORDER_DELIVERED": 0,
"ORDER_RETURNED": 0,
"ORDER_PARTIALLY_RETURNED": 0,
"ORDER_PAYMENT_AUTHORIZED": 0,
"ORDER_PAYMENT_INVALID": 0,
"ORDER_FULFILLED": 0,
"ORDER_PARTIALLY_FULFILLED": 0,
"ORDER_REFUNDED": 6
},
"paymentStatusCounts": {
"succeeded": 3
}
},
"orders": [
{
"_id": "608c8f995cc215000848a8e0",
"tags": "<array>",
"cartId": "608c8c9e79f00c00080fbacc",
"attributes": "<array>",
"customerEmail": "[email protected]",
"orderCurrency": "USD",
"orderTotal": 950.5,
"taxTotal": 2.5,
"channel": 12,
"status": "ORDER_REFUNDED",
"statusLog": "Order has been shipped",
"orderReference": "9975-7559-14446",
"orderId": "2660-5356-89773",
"shipTo": [
{
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"phone": {
"number": 8087769338,
"kind": "Mobile"
},
"email": "[email protected]"
},
"altPickupPerson": {
"name": {
"first": "first",
"last": "last"
},
"phone": {
"number": 8087769338,
"kind": "Mobile"
},
"email": "[email protected]"
},
"promosApplied": "<array>",
"_id": "608c8d2f798c0900083f60ee",
"shipToType": "BOPIS",
"taxCode": "FR1000",
"shipToId": 978,
"price": 0,
"currency": null,
"shipmentMethodId": null,
"estimatedTax": 0,
"shipmentCarrier": null,
"shipmentMethod": null,
"total": 0,
"id": "608c8d2f798c0900083f60ee"
}
],
"items": [
{
"group": [
1.2312312312312322e+23
],
"promosApplied": "<array>",
"_id": "608c8cd679f00c00080fbace",
"price": 900,
"weightUnit": "lb",
"isPickup": true,
"itemId": 1000000051,
"quantity": 1,
"priceListId": 100269,
"sku": 1538910,
"taxCode": "PH060771",
"title": "Luminous Cushion Lagoon",
"weight": 1,
"lineItemId": 1,
"attributeTotalPrice": 0,
"attributes": "<array>",
"warehouseId": "605d0c47c87d0e0008a3b5a8",
"currency": "USD",
"shipToId": 978,
"discount": 0,
"estimatedTax": 1,
"total": 901,
"reservedLocation": [
{
"_id": "608c8f9de4b526000842505f",
"warehouseId": "605d0c47c87d0e0008a3b5a8",
"quantity": 1,
"id": "608c8f9de4b526000842505f"
}
],
"id": "608c8cd679f00c00080fbace"
}
],
"shipments": [
{
"_id": "60936b987d5a2f0008e8bea6",
"shippedDate": "2021-05-06T04:07:47.654Z",
"shipToId": 978,
"shipmentCarrier": "USPS",
"shipmentCarrierUrl": "https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989",
"trackingNumber": 65765798989,
"lineItems": [
{
"_id": "60936b987d5a2f0008e8bea7",
"lineItemId": 1,
"quantity": 1,
"id": "60936b987d5a2f0008e8bea7"
}
],
"shipmentStatus": "ORDER_SHIPPED",
"id": "60936b987d5a2f0008e8bea6"
}
],
"revision": 2,
"totalQuantity": 2,
"statusDescriptions": "<array>",
"events": "<array>",
"createdAt": "2021-04-30T23:15:37.094Z",
"updatedAt": "2021-05-06T04:09:09.970Z",
"__v": 0
}
]
}Order query
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/query \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"offset": 0,
"limit": 10,
"sortBy": "createdAt",
"sortDirection": "desc",
"filters": {
"status": [
"ORDER_CREATED",
"ORDER_PAYMENT_AUTHORIZED"
],
"date": {
"gte": "2020-11-01T18:12:03.412Z",
"lte": "2022-12-03T18:12:03.412Z"
},
"orderTotal": {},
"totalQuantity": {},
"attributes": [
{
"attributeId": "60119337cb662800075717f8",
"value": "blue"
}
],
"customerUserId": [
"<string>"
],
"customerEmail": [
"<string>"
],
"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"
}
]
}
}
'{
"query": {
"limit": 2,
"offset": 0,
"count": 6,
"orderTotalSum": 13543.5,
"orderAverage": 2257.25,
"totalQuantitySum": 82,
"statusCounts": {
"ORDER_CREATED": 0,
"ORDER_CONFIRMED": 0,
"ORDER_CANCELLED": 0,
"ORDER_PARTIALLY_SHIPPED": 0,
"ORDER_SHIPPED": 0,
"ORDER_PARTIALLY_DELIVERED": 0,
"ORDER_DELIVERED": 0,
"ORDER_RETURNED": 0,
"ORDER_PARTIALLY_RETURNED": 0,
"ORDER_PAYMENT_AUTHORIZED": 0,
"ORDER_PAYMENT_INVALID": 0,
"ORDER_FULFILLED": 0,
"ORDER_PARTIALLY_FULFILLED": 0,
"ORDER_REFUNDED": 6
},
"paymentStatusCounts": {
"succeeded": 3
}
},
"orders": [
{
"_id": "608c8f995cc215000848a8e0",
"tags": "<array>",
"cartId": "608c8c9e79f00c00080fbacc",
"attributes": "<array>",
"customerEmail": "[email protected]",
"orderCurrency": "USD",
"orderTotal": 950.5,
"taxTotal": 2.5,
"channel": 12,
"status": "ORDER_REFUNDED",
"statusLog": "Order has been shipped",
"orderReference": "9975-7559-14446",
"orderId": "2660-5356-89773",
"shipTo": [
{
"pickupPerson": {
"name": {
"first": "John",
"last": "Doe"
},
"phone": {
"number": 8087769338,
"kind": "Mobile"
},
"email": "[email protected]"
},
"altPickupPerson": {
"name": {
"first": "first",
"last": "last"
},
"phone": {
"number": 8087769338,
"kind": "Mobile"
},
"email": "[email protected]"
},
"promosApplied": "<array>",
"_id": "608c8d2f798c0900083f60ee",
"shipToType": "BOPIS",
"taxCode": "FR1000",
"shipToId": 978,
"price": 0,
"currency": null,
"shipmentMethodId": null,
"estimatedTax": 0,
"shipmentCarrier": null,
"shipmentMethod": null,
"total": 0,
"id": "608c8d2f798c0900083f60ee"
}
],
"items": [
{
"group": [
1.2312312312312322e+23
],
"promosApplied": "<array>",
"_id": "608c8cd679f00c00080fbace",
"price": 900,
"weightUnit": "lb",
"isPickup": true,
"itemId": 1000000051,
"quantity": 1,
"priceListId": 100269,
"sku": 1538910,
"taxCode": "PH060771",
"title": "Luminous Cushion Lagoon",
"weight": 1,
"lineItemId": 1,
"attributeTotalPrice": 0,
"attributes": "<array>",
"warehouseId": "605d0c47c87d0e0008a3b5a8",
"currency": "USD",
"shipToId": 978,
"discount": 0,
"estimatedTax": 1,
"total": 901,
"reservedLocation": [
{
"_id": "608c8f9de4b526000842505f",
"warehouseId": "605d0c47c87d0e0008a3b5a8",
"quantity": 1,
"id": "608c8f9de4b526000842505f"
}
],
"id": "608c8cd679f00c00080fbace"
}
],
"shipments": [
{
"_id": "60936b987d5a2f0008e8bea6",
"shippedDate": "2021-05-06T04:07:47.654Z",
"shipToId": 978,
"shipmentCarrier": "USPS",
"shipmentCarrierUrl": "https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989",
"trackingNumber": 65765798989,
"lineItems": [
{
"_id": "60936b987d5a2f0008e8bea7",
"lineItemId": 1,
"quantity": 1,
"id": "60936b987d5a2f0008e8bea7"
}
],
"shipmentStatus": "ORDER_SHIPPED",
"id": "60936b987d5a2f0008e8bea6"
}
],
"revision": 2,
"totalQuantity": 2,
"statusDescriptions": "<array>",
"events": "<array>",
"createdAt": "2021-04-30T23:15:37.094Z",
"updatedAt": "2021-05-06T04:09:09.970Z",
"__v": 0
}
]
}"0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k"
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\"}"
x >= 01 <= x <= 500createdAt, orderTotal, totalQuantity, status asc, desc Show child attributes
ORDER_CREATED, ORDER_CONFIRMED, ORDER_CANCELLED, ORDER_PARTIALLY_SHIPPED, ORDER_SHIPPED, ORDER_PARTIALLY_DELIVERED, ORDER_DELIVERED, ORDER_RETURNED, ORDER_PARTIALLY_RETURNED, ORDER_PAYMENT_AUTHORIZED, ORDER_PAYMENT_INVALID, ORDER_FULFILLED, ORDER_PARTIALLY_FULFILLED, ORDER_REFUNDED ["ORDER_CREATED", "ORDER_PAYMENT_AUTHORIZED"]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"
Returned orders
Show child attributes
2
0
6
13543.5
2257.25
82
Show child attributes
0
0
0
0
0
0
0
0
0
0
0
0
0
6
Show child attributes
"608c8f995cc215000848a8e0"
"608c8c9e79f00c00080fbacc"
"USD"
950.5
2.5
12
"ORDER_REFUNDED"
"Order has been shipped"
"9975-7559-14446"
"2660-5356-89773"
Show child attributes
Show child attributes
Show child attributes
"608c8d2f798c0900083f60ee"
"BOPIS"
"FR1000"
978
0
null
null
0
null
null
0
"608c8d2f798c0900083f60ee"
Show child attributes
"608c8cd679f00c00080fbace"
900
"lb"
1000000051
1
100269
1538910
"PH060771"
"Luminous Cushion Lagoon"
1
1
0
"605d0c47c87d0e0008a3b5a8"
"USD"
978
0
1
901
Show child attributes
"608c8cd679f00c00080fbace"
Show child attributes
"60936b987d5a2f0008e8bea6"
"2021-05-06T04:07:47.654Z"
978
"USPS"
"https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage&tLc=2&text28777=&tLabels=65765798989"
65765798989
"ORDER_SHIPPED"
"60936b987d5a2f0008e8bea6"
2
2
"2021-04-30T23:15:37.094Z"
"2021-05-06T04:09:09.970Z"
0
Was this page helpful?