XM

Order Search

Path:

POST /api-order/orders/shipments

This API enables you to search for orders and narrow down the search results using filter parameters.

Headers

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

x-api-key : d41d8cd98f00b204e9800998ecf8427e

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: body

Name: Order Filters

Required: true

Sample Request

{
"offset": 0,
"limit": 2,
"sortBy": "createdAt",
"sortDirection": "asc",
"filters": {
"date": {
"gte": "2020-05-03T00:00:00.000Z",
"lte": "2020-12-03T23:59:59.999Z"
},
"status": ["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"]
}
}

Response

Response Code: 200

Message: OK

Sample

{
"query": {
"limit": 2,
"offset": 0,
"count": 106907,
"orderTotalSum": null,
"orderAverage": 0,
"totalQuantitySum": 4876011,
"statusCounts": {
"ORDER_CREATED": 101354,
"ORDER_CONFIRMED": 0,
"ORDER_CANCELLED": 37,
"ORDER_PARTIALLY_SHIPPED": 19,
"ORDER_SHIPPED": 33,
"ORDER_PARTIALLY_DELIVERED": 0,
"ORDER_DELIVERED": 0,
"ORDER_RETURNED": 0,
"ORDER_PARTIALLY_RETURNED": 0,
"ORDER_PAYMENT_AUTHORIZED": 4533,
"ORDER_PAYMENT_INVALID": 931
}
},
"orders": [
{
"_id": "5edfcaca3bed2f5a6f31bdf4",
"tags": [
"tag100",
"tag200"
],
"cartId": "5edfcaca30eda66b889417f2",
"customerUserId": "7e4d8b52488c009276460ffe",
"customerAccountId": "5e4d8b52488c009276460ffb",
"customerEmail": "[email protected]",
"customerPhone": {
"number": "783-879-8973 x1934",
"kind": "mobile"
},
"orderCurrency": "USD",
"orderTotal": 16499.52,
"taxTotal": 1712.99,
"channel": 12,
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"notes": "My Random note",
"events": [
{
"_id": "5edfcaca3bed2f5a6f31bdf5",
"status": "ORDER_CANCELLED",
"data": {
"reason": "DELAYED_SHIPMENT"
},
"id": "5edfcaca3bed2f5a6f31bdf5"
}
],
"orderId": "8049-2005-86198",
"shipTo": [
{
"address": {
"name": {
"first": "Dennis",
"middle": "Robb",
"last": "Weimann"
},
"phone": {
"number": "502-383-6417 x38526",
"kind": "mobile"
},
"email": "[email protected]",
"street1": "95469 Williamson Row",
"street2": "",
"city": "Lilianstad",
"state": "OR",
"country": "USA",
"zipCode": "26441",
"kind": "ship to address"
},
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31bdf6",
"shipToId": 2000000051,
"shipToType": "SHIP_TO_ADDRESS",
"price": 9.59,
"currency": "USD",
"estimatedTax": 0.42,
"committedTax": 0.52,
"total": 234.34,
"taxCode": "FR02000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "1234324",
"promisedDeliveryDate": "2019-03-01T00:00:00.000Z",
"shipmentInstructions": "Leave order at door",
"shipmentStatus": "On Route",
"id": "5edfcaca3bed2f5a6f31bdf6"
},
{
"address": {
"name": {
"first": "Mallie",
"middle": "Hailie",
"last": "Schultz"
},
"phone": {
"number": "1-794-598-4701",
"kind": "mobile"
},
"email": "[email protected]",
"street1": "22472 Fahey Throughway",
"street2": "",
"city": "Spencershire",
"state": "AL",
"country": "USA",
"zipCode": "71530",
"kind": "ship to address"
},
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31bdf7",
"shipToId": 2000000053,
"shipToType": "SHIP_TO_ADDRESS",
"price": 502,
"currency": "USD",
"estimatedTax": 0.4,
"committedTax": 0.4,
"total": 6.9,
"taxCode": "FR02000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "1234324",
"promisedDeliveryDate": "2019-03-01T00:00:00.000Z",
"shipmentInstructions": "Leave order at door",
"shipmentStatus": "On Route",
"id": "5edfcaca3bed2f5a6f31bdf7"
}
],
"items": [
{
"group": [],
"promosApplied": [
{
"name": "test"
}
],
"_id": "5edfcaca3bed2f5a6f31bdf8",
"lineItemId": 1,
"itemId": 1000000053,
"sku": "1538910",
"title": "abcDNA Luminous Cushion Lagoon",
"quantity": 12,
"price": 260.71,
"discount": 1.51,
"currency": "USD",
"shipToId": 2000000051,
"estimatedTax": 0.35,
"committedTax": 0.43,
"total": 345.92,
"taxCode": "FR02000",
"weight": 20,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31bdf8"
},
{
"group": [],
"promosApplied": [
{
"name": "test"
}
],
"_id": "5edfcaca3bed2f5a6f31bdf9",
"lineItemId": 2,
"itemId": 1000000214,
"sku": "1539168",
"title": "Leizu by Elizabeth Few Studio Carnation Pillow Pink",
"quantity": 21,
"price": 330.92,
"discount": 234324,
"currency": "USD",
"shipToId": 2000000051,
"estimatedTax": 0.42,
"committedTax": 53,
"total": 23.33,
"taxCode": "FR02000",
"weight": 19,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31bdf9"
},
{
"group": [],
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31bdfa",
"lineItemId": 3,
"itemId": 1000000058,
"sku": "1539168",
"title": "Leizu by Elizabeth Few Studio Carnation Pillow Pink",
"quantity": 10,
"price": 419.71,
"discount": 1.51,
"currency": "USD",
"shipToId": 2000000053,
"estimatedTax": 0.4,
"committedTax": 0.4,
"total": 6.9,
"taxCode": "FR02000",
"weight": 18,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31bdfa"
}
],
"shipments": [],
"revision": 0,
"totalQuantity": 43,
"createdAt": "2020-06-09T17:45:47.009Z",
"updatedAt": "2020-06-09T17:45:47.009Z",
"__v": 0
},
{
"_id": "5edfcaca3bed2f5a6f31be4e",
"tags": [
"tag100",
"tag200"
],
"cartId": "5edfcaca30eda66b889417fc",
"customerUserId": "7e4d8b52488c009276460fff",
"customerAccountId": "5e4d8b52488c009276460ffc",
"customerEmail": "[email protected]",
"customerPhone": {
"number": "1-427-709-6354 x06247",
"kind": "mobile"
},
"orderCurrency": "USD",
"orderTotal": 31433.77,
"taxTotal": 3221.85,
"channel": 12,
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"notes": "My Random note",
"events": [
{
"_id": "5edfcaca3bed2f5a6f31be4f",
"status": "ORDER_CANCELLED",
"data": {
"reason": "DELAYED_SHIPMENT"
},
"id": "5edfcaca3bed2f5a6f31be4f"
}
],
"orderId": "9903-7987-78984",
"shipTo": [
{
"address": {
"name": {
"first": "Trudie",
"middle": "Preston",
"last": "Heidenreich"
},
"phone": {
"number": "1-567-492-8669 x3620",
"kind": "mobile"
},
"email": "[email protected]",
"street1": "4294 Chase Corner",
"street2": "",
"city": "Kochbury",
"state": "SD",
"country": "USA",
"zipCode": "15413-7180",
"kind": "ship to address"
},
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31be50",
"shipToId": 2000000051,
"shipToType": "SHIP_TO_ADDRESS",
"price": 462.34,
"currency": "USD",
"estimatedTax": 0.42,
"committedTax": 0.52,
"total": 234.34,
"taxCode": "FR02000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "1234324",
"promisedDeliveryDate": "2019-03-01T00:00:00.000Z",
"shipmentInstructions": "Leave order at door",
"shipmentStatus": "On Route",
"id": "5edfcaca3bed2f5a6f31be50"
},
{
"address": {
"name": {
"first": "Sanford",
"middle": "Ocie",
"last": "Heathcote"
},
"phone": {
"number": "524.765.4345",
"kind": "mobile"
},
"email": "[email protected]",
"street1": "3954 Pouros Route",
"street2": "",
"city": "Alizashire",
"state": "UT",
"country": "USA",
"zipCode": "30649-6475",
"kind": "ship to address"
},
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31be51",
"shipToId": 2000000053,
"shipToType": "SHIP_TO_ADDRESS",
"price": 900.86,
"currency": "USD",
"estimatedTax": 0.4,
"committedTax": 0.4,
"total": 6.9,
"taxCode": "FR02000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "1234324",
"promisedDeliveryDate": "2019-03-01T00:00:00.000Z",
"shipmentInstructions": "Leave order at door",
"shipmentStatus": "On Route",
"id": "5edfcaca3bed2f5a6f31be51"
}
],
"items": [
{
"group": [],
"promosApplied": [
{
"name": "test"
}
],
"_id": "5edfcaca3bed2f5a6f31be52",
"lineItemId": 1,
"itemId": 1000000214,
"sku": "1538910",
"title": "abcDNA Luminous Cushion Lagoon",
"quantity": 12,
"price": 358.58,
"discount": 1.51,
"currency": "USD",
"shipToId": 2000000051,
"estimatedTax": 0.35,
"committedTax": 0.43,
"total": 345.92,
"taxCode": "FR02000",
"weight": 18,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31be52"
},
{
"group": [],
"promosApplied": [
{
"name": "test"
}
],
"_id": "5edfcaca3bed2f5a6f31be53",
"lineItemId": 2,
"itemId": 1000000220,
"sku": "1539168",
"title": "Leizu by Elizabeth Few Studio Carnation Pillow Pink",
"quantity": 22,
"price": 970.32,
"discount": 234324,
"currency": "USD",
"shipToId": 2000000051,
"estimatedTax": 0.42,
"committedTax": 53,
"total": 23.33,
"taxCode": "FR02000",
"weight": 10,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31be53"
},
{
"group": [],
"promosApplied": [],
"_id": "5edfcaca3bed2f5a6f31be54",
"lineItemId": 3,
"itemId": 1000000217,
"sku": "1539168",
"title": "Leizu by Elizabeth Few Studio Carnation Pillow Pink",
"quantity": 16,
"price": 74.92,
"discount": 1.51,
"currency": "USD",
"shipToId": 2000000053,
"estimatedTax": 0.4,
"committedTax": 0.4,
"total": 6.9,
"taxCode": "FR02000",
"weight": 8,
"weightUnit": "lb",
"id": "5edfcaca3bed2f5a6f31be54"
}
],
"shipments": [],
"revision": 0,
"totalQuantity": 50,
"createdAt": "2020-06-09T17:45:47.009Z",
"updatedAt": "2020-06-09T17:45:47.009Z",
"__v": 0
}
]
}

Error Code: 404

Message: Order Not Found

Changelog

  • Last Updated - April 2021

  • First Updated - July 2020