XM
Powered By GitBook
Retrieve Orders By Authorization Token
Path:
1
GET https://{baseurl}/api-order/orders/user?offset=0&limit=10
Copied!
This API enables your customers to retrieve their order details, in a paginated response. This is secured by Authorization Token.

Headers

Content-Type : application/json
Authorization: JWT userAuthToken
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : query
Name : The offset and limit values to retrieve order details in a paginated response. When no value is specified, the default value used for offset and limit are 0 and 10 respectively.
Required: true

Sample Request

Path:
1
https://{baseurl}/api-order/orders/user?offset=0&limit=2
Copied!

Response

Response Code: 200
Message: OK
Description: You'll see this message when the order details are successfully retrieved. The response is a list of orders in the account based on the query criteria. Each object with in the array of the orders object is a separate order.
1
{
2
"query": {
3
"limit": 2,
4
"offset": 0,
5
"count": 19,
6
"orderTotalSum": 31719.46,
7
"orderAverage": 1669.45,
8
"totalQuantitySum": 132,
9
"statusCounts": {
10
"ORDER_CREATED": 13,
11
"ORDER_CONFIRMED": 0,
12
"ORDER_CANCELLED": 1,
13
"ORDER_PARTIALLY_SHIPPED": 0,
14
"ORDER_SHIPPED": 2,
15
"ORDER_PARTIALLY_DELIVERED": 0,
16
"ORDER_DELIVERED": 0,
17
"ORDER_RETURNED": 0,
18
"ORDER_PARTIALLY_RETURNED": 0,
19
"ORDER_PAYMENT_AUTHORIZED": 2,
20
"ORDER_PAYMENT_INVALID": 0,
21
"ORDER_FULFILLED": 0,
22
"ORDER_PARTIALLY_FULFILLED": 1
23
}
24
},
25
"orders": [
26
{
27
"_id": "60ca5d3dc0fac00008e64c91",
28
"tags": [],
29
"cartId": "60ca5b6ae3b5d900081ae44a",
30
"customerUserId": "60c128045a38bf0009ad6502",
31
"attributes": [],
32
"customerEmail": "[email protected]",
33
"orderCurrency": "USD",
34
"orderTotal": 90.5,
35
"taxTotal": 0.5,
36
"channel": 12,
37
"status": "ORDER_CREATED",
38
"statusLog": "Order has been created",
39
"orderReference": "1635-8532-92190",
40
"orderId": "8677-7648-19307",
41
"shipTo": [
42
{
43
"pickupPerson": {
44
"name": {
45
"first": "John",
46
"last": "Doe"
47
},
48
"phone": {
49
"number": "8087769338",
50
"kind": "Mobile"
51
},
52
"email": "[email protected]"
53
},
54
"altPickupPerson": {
55
"name": {
56
"first": "first",
57
"last": "last"
58
},
59
"phone": {
60
"number": "8087769338",
61
"kind": "Mobile"
62
},
63
"email": "[email protected]"
64
},
65
"promosApplied": [],
66
"_id": "60ca5c1c9f490e0008020b28",
67
"shipToType": "BOPIS",
68
"taxCode": "FR1000",
69
"shipToId": 390,
70
"price": 0,
71
"currency": "",
72
"shipmentMethodId": "",
73
"estimatedTax": 0.5,
74
"shipmentCarrier": "",
75
"shipmentMethod": "",
76
"total": 0.5,
77
"id": "60ca5c1c9f490e0008020b28"
78
}
79
],
80
"items": [
81
{
82
"group": [
83
"123123123123123213212222"
84
],
85
"promosApplied": [],
86
"_id": "60ca5b6ae3b5d900081ae44b",
87
"price": 90,
88
"weightUnit": "lb",
89
"isPickup": true,
90
"itemId": 89,
91
"quantity": 1,
92
"priceListId": 100000,
93
"sku": "GardenWoodSofa",
94
"taxCode": "tytuy",
95
"title": "Garden Wood Sofa",
96
"weight": 2345,
97
"lineItemId": 1,
98
"attributeTotalPrice": 0,
99
"attributes": [],
100
"warehouseId": "60bf9615e66d120008b37e5e",
101
"currency": "USD",
102
"shipToId": 390,
103
"discount": 0,
104
"estimatedTax": 0,
105
"total": 90,
106
"reservedLocation": [
107
{
108
"_id": "60ca5d3e06b91d0008427435",
109
"warehouseId": "60bf9615e66d120008b37e5e",
110
"quantity": 1,
111
"id": "60ca5d3e06b91d0008427435"
112
}
113
],
114
"id": "60ca5b6ae3b5d900081ae44b"
115
}
116
],
117
"shipments": [],
118
"payments": [
119
{
120
"billToAddress": {
121
"name": {
122
"first": "John",
123
"last": "Smith"
124
},
125
"phone": {
126
"number": "07780811973",
127
"kind": "mobile"
128
},
129
"email": "[email protected]",
130
"street1": "600 Congress Ave",
131
"street2": "suite 219",
132
"city": "Austin",
133
"state": "Tx",
134
"country": "US",
135
"zipCode": "10033"
136
},
137
"shipToId": [
138
390
139
],
140
"_id": "60ca5d3dc0fac00008e64c94",
141
"paymentStatus": "succeeded",
142
"amount": 90.5,
143
"currency": "USD",
144
"paymentIdentifier": {
145
"cardIdentifier": "4242"
146
},
147
"paymentMethod": "visa",
148
"paymentKind": "CARD_STRIPE",
149
"conversion": 1,
150
"paymentToken": {
151
"token": "pi_1J35DCJxr7zyIFb9axtM3OKv",
152
"type": "CARD_STRIPE"
153
},
154
"id": "60ca5d3dc0fac00008e64c94"
155
}
156
],
157
"revision": 0,
158
"totalQuantity": 1,
159
"statusDescriptions": [],
160
"events": [],
161
"pickups": [],
162
"createdAt": "2021-06-16T20:21:17.038Z",
163
"updatedAt": "2021-06-16T20:21:18.355Z",
164
"__v": 0
165
},
166
{
167
"_id": "60c7a091d17c5b000920cefe",
168
"tags": [],
169
"cartId": "60c7a089147af80008cd5b07",
170
"customerUserId": "60c128045a38bf0009ad6502",
171
"attributes": [],
172
"customerEmail": "[email protected]",
173
"orderCurrency": "USD",
174
"orderTotal": 700,
175
"taxTotal": 0,
176
"channel": 12,
177
"status": "ORDER_SHIPPED",
178
"statusLog": "Order has been shipped",
179
"orderReference": "3904-7477-79114",
180
"orderId": "9773-9497-40152",
181
"shipTo": [
182
{
183
"address": {
184
"name": {
185
"first": "First",
186
"last": "Last"
187
},
188
"phone": {
189
"number": "998-992-9404",
190
"kind": "Mobile"
191
},
192
"street1": "3520, Crowley Drive",
193
"city": "Vancouver",
194
"state": "BC",
195
"country": "Canada",
196
"zipCode": "98004",
197
"kind": "shipping",
198
"email": "[email protected]"
199
},
200
"promosApplied": [],
201
"_id": "60c7a08c8d0ea300088c9e9a",
202
"shipToType": "SHIP_TO_ADDRESS",
203
"taxCode": "FR1000",
204
"shipToId": 334,
205
"price": 0,
206
"shipmentMethodId": "10003",
207
"estimatedTax": 0,
208
"shipmentCarrier": "Fedex",
209
"shipmentMethod": "Next Day",
210
"total": 0,
211
"id": "60c7a08c8d0ea300088c9e9a"
212
}
213
],
214
"items": [
215
{
216
"group": [
217
"123123123123123213212222"
218
],
219
"promosApplied": [
220
{
221
"unit": "%OFF",
222
"value": 100,
223
"ON": {
224
"kind": "SERVICE",
225
"value": [
226
{
227
"label": "Fedex - Next Day Delivery",
228
"isSelected": true,
229
"key": "Fedex_Next_Day_Delivery",
230
"methodIds": [
231
10003
232
]
233
},
234
{
235
"label": "DHL - Next Day Delivery",
236
"isSelected": true,
237
"key": "DHL_Next_Day_Delivery",
238
"methodIds": [
239
10005,
240
10006,
241
10007,
242
10008
243
]
244
}
245
]
246
},
247
"id": "60c26dd7a014a30008e1e9e1",
248
"promoId": "60c26dd7a014a30008e1e9df",
249
"promoCode": "shiptrio"
250
},
251
{
252
"unit": "%OFF",
253
"value": 5,
254
"ON": {
255
"kind": "SKU",
256
"value": null
257
},
258
"id": "60c6e7776d6fd800094504e8",
259
"promoId": "60c6e5c339c1e00009c3b974"
260
},
261
{
262
"unit": "%OFF",
263
"value": 100,
264
"ON": {
265
"kind": "SKU",
266
"value": null
267
},
268
"id": "60c6e579ac3abe000807002c",
269
"promoId": "60c6e56439c1e00009c3b96e"
270
}
271
],
272
"_id": "60c7a08b147af80008cd5b09",
273
"price": 200,
274
"weightUnit": "lb",
275
"isPickup": false,
276
"itemId": 90,
277
"quantity": 2,
278
"priceListId": 100000,
279
"sku": "Bench",
280
"taxCode": "ASD789",
281
"title": "Bench",
282
"weight": 5,
283
"lineItemId": 1,
284
"attributeTotalPrice": 0,
285
"attributes": [],
286
"currency": "USD",
287
"shipToId": 334,
288
"discount": 200,
289
"estimatedTax": 0,
290
"total": 400,
291
"reservedLocation": [
292
{
293
"_id": "60c7aa9cb4c6c80009496e2c",
294
"warehouseId": "60bf9615e66d120008b37e5e",
295
"quantity": 2,
296
"id": "60c7aa9cb4c6c80009496e2c"
297
}
298
],
299
"id": "60c7a08b147af80008cd5b09"
300
},
301
{
302
"group": [
303
"123123123123123213212222"
304
],
305
"promosApplied": [
306
{
307
"unit": "%OFF",
308
"value": 100,
309
"ON": {
310
"kind": "SERVICE",
311
"value": [
312
{
313
"label": "Fedex - Next Day Delivery",
314
"isSelected": true,
315
"key": "Fedex_Next_Day_Delivery",
316
"methodIds": [
317
10003
318
]
319
},
320
{
321
"label": "DHL - Next Day Delivery",
322
"isSelected": true,
323
"key": "DHL_Next_Day_Delivery",
324
"methodIds": [
325
10005,
326
10006,
327
10007,
328
10008
329
]
330
}
331
]
332
},
333
"id": "60c26dd7a014a30008e1e9e1",
334
"promoId": "60c26dd7a014a30008e1e9df",
335
"promoCode": "shiptrio"
336
},
337
{
338
"unit": "%OFF",
339
"value": 5,
340
"ON": {
341
"kind": "SKU",
342
"value": null
343
},
344
"id": "60c6e7776d6fd800094504e8",
345
"promoId": "60c6e5c339c1e00009c3b974"
346
},
347
{
348
"unit": "%OFF",
349
"value": 100,
350
"ON": {
351
"kind": "SKU",
352
"value": null
353
},
354
"id": "60c6e579ac3abe000807002c",
355
"promoId": "60c6e56439c1e00009c3b96e"
356
}
357
],
358
"_id": "60c7a089147af80008cd5b08",
359
"price": 100,
360
"weightUnit": "lb",
361
"isPickup": false,
362
"itemId": 170,
363
"quantity": 3,
364
"priceListId": 100000,
365
"sku": "testPrice",
366
"taxCode": "EWPE",
367
"title": "Pricing",
368
"weight": 23,
369
"lineItemId": 2,
370
"attributeTotalPrice": 0,
371
"attributes": [],
372
"currency": "USD",
373
"shipToId": 334,
374
"discount": 100,
375
"estimatedTax": 0,
376
"total": 300,
377
"reservedLocation": [
378
{
379
"_id": "60c7aa9c97041d0009a5801e",
380
"warehouseId": "60bfb7fa92eb920008dd0078",
381
"quantity": 3,
382
"id": "60c7aa9c97041d0009a5801e"
383
}
384
],
385
"id": "60c7a089147af80008cd5b08"
386
}
387
],
388
"shipments": [
389
{
390
"_id": "60c7a62003a1ce0009ea6824",
391
"shipmentRef": "POS Shipment Added",
392
"shipmentCarrier": "DHL",
393
"shipmentCarrierUrl": "https://dhl.com",
394
"trackingNumber": "2345367890876549",
395
"lineItems": [
396
{
397
"_id": "60c7a62003a1ce0009ea6825",
398
"lineItemId": 1,
399
"quantity": 1,
400
"id": "60c7a62003a1ce0009ea6825"
401
}
402
],
403
"shipmentStatus": "Shipping",
404
"estimatedDeliveryDate": "2021-07-01T00:00:00.000Z",
405
"shippedDate": "2021-06-11T00:00:00.000Z",
406
"shipToId": 334,
407
"id": "60c7a62003a1ce0009ea6824"
408
},
409
{
410
"_id": "60c7a6a003a1ce0009ea682d",
411
"shipmentRef": "POS Shipment Added",
412
"shipmentCarrier": "DHL",
413
"shipmentCarrierUrl": "https://dhl.com",
414
"trackingNumber": "2345367890876549",
415
"lineItems": [
416
{
417
"_id": "60c7a6a003a1ce0009ea682e",
418
"lineItemId": 1,
419
"quantity": 1,
420
"id": "60c7a6a003a1ce0009ea682e"
421
}
422
],
423
"shipmentStatus": "Shipping",
424
"estimatedDeliveryDate": "2021-07-01T00:00:00.000Z",
425
"shippedDate": "2021-06-11T00:00:00.000Z",
426
"shipToId": 334,
427
"id": "60c7a6a003a1ce0009ea682d"
428
},
429
{
430
"_id": "60c7a6d603a1ce0009ea6838",
431
"shipmentRef": "POS Shipment Added",
432
"shipmentCarrier": "DHL",
433
"shipmentCarrierUrl": "https://dhl.com",
434
"trackingNumber": "2345367890876549",
435
"lineItems": [
436
{
437
"_id": "60c7a6d603a1ce0009ea6839",
438
"lineItemId": 2,
439
"quantity": 2,
440
"id": "60c7a6d603a1ce0009ea6839"
441
}
442
],
443
"shipmentStatus": "Shipping",
444
"estimatedDeliveryDate": "2021-07-01T00:00:00.000Z",
445
"shippedDate": "2021-06-11T00:00:00.000Z",
446
"shipToId": 334,
447
"id": "60c7a6d603a1ce0009ea6838"
448
},
449
{
450
"_id": "60c7a8c648aa0d00086c9f38",
451
"shipmentRef": "POS Shipment Added",
452
"shipmentCarrier": "DHL",
453
"shipmentCarrierUrl": "https://dhl.com",
454
"trackingNumber": "2345367890876549",
455
"lineItems": [
456
{
457
"_id": "60c7a8c648aa0d00086c9f39",
458
"lineItemId": 2,
459
"quantity": 1,
460
"id": "60c7a8c648aa0d00086c9f39"
461
}
462
],
463
"shipmentStatus": "Shipping",
464
"estimatedDeliveryDate": "2021-07-01T00:00:00.000Z",
465
"shippedDate": "2021-06-11T00:00:00.000Z",
466
"shipToId": 334,
467
"id": "60c7a8c648aa0d00086c9f38"
468
}
469
],
470
"payments": [
471
{
472
"billToAddress": {
473
"name": {
474
"first": "Dave",
475
"last": "Sheffer"
476
},
477
"phone": {
478
"number": "4156529712",
479
"kind": "Mobile"
480
},
481
"email": "[email protected]",
482
"street1": "10400 NE 4th St",
483
"street2": "",
484
"city": "Bellevue",
485
"state": "WA",
486
"country": "United States",
487
"zipCode": "98004"
488
},
489
"shipToId": [
490
334
491
],
492
"_id": "60c7a091d17c5b000920cf02",
493
"paymentIdentifier": {
494
"cardIdentifier": "1111"
495
},
496
"paymentMethod": "Visa",
497
"paymentKind": "Fabric User",
498
"amount": 700,
499
"currency": "USD",
500
"conversion": 1,
501
"paymentToken": {
502
"token": "40067346490",
503
"type": "CARD"
504
},
505
"id": "60c7a091d17c5b000920cf02"
506
}
507
],
508
"revision": 4,
509
"totalQuantity": 5,
510
"statusDescriptions": [],
511
"events": [],
512
"pickups": [],
513
"createdAt": "2021-06-14T18:31:45.928Z",
514
"updatedAt": "2021-06-14T19:14:36.519Z",
515
"__v": 0
516
}
517
]
518
}
Copied!
Error Code: 500
Message: Internal Server Error
Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

    June - 2021
    July - 2020 First updated
Last modified 2mo ago
Copy link
Contents
Change Log