XM
Members
Retrieve All Orders by Customer Reference ID
This documentation is now outdated, please find the latest docs for this endpoint here
Path:
1
GET https://{baseurl}/data-subscription/orders/get-by-customer/{customer-reference-ID}
Copied!
This API helps retrieve details of a subscribed order based on the specified order ID.

Headers

Content-Type : application/json
Authorization: The JWT Authorization toke from the Login API.
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox"

Parameters

Type : path
Name : The system-generated customer reference ID.
Required: true

Sample Path

1
https://{baseurl}/data-subscription/orders/get-by-customer/606efb7ec042330007b48447
Copied!

Sample Response

Response Code: 200
Message: OK
1
{
2
"success": true,
3
"responseStatus": "OK",
4
"message": "Request processed successfully.",
5
"data": {
6
"orders": [
7
{
8
"shipTo": {
9
"name": {
10
"firstName": "Khizer",
11
"middleName": "",
12
"lastName": "Younas"
13
},
14
"streetAddress": {
15
"street1": "177 HUNTINGTON AVE STE 1703",
16
"street2": ""
17
},
18
"shipToId": "606f79b7a084a10008fc411f",
19
"city": "BOSTON",
20
"state": "MA",
21
"zipCode": "02115-3153",
22
"country": "US"
23
},
24
"billTo": {
25
"name": {
26
"firstName": "Khizer",
27
"middleName": "",
28
"lastName": "Younas"
29
},
30
"streetAddress": {
31
"street1": "177 HUNTINGTON AVE STE 1703",
32
"street2": ""
33
},
34
"city": "BOSTON",
35
"state": "MA",
36
"zipCode": "02115-3153",
37
"country": "US",
38
"billToId": "606f79d440b47300084ad850"
39
},
40
"paymentDetails": {
41
"processor": "stripe"
42
},
43
"isDeleted": false,
44
"deletedAt": null,
45
"_id": "606f79d8f94b4a00090fcad8",
46
"subscriptionID": "606f79d8f94b4a00090fcad7",
47
"planID": "606ef36a93bc6e00084fd5ca",
48
"itemID": "1000000058",
49
"itemName": "FRUIT LOVERS VARIETY",
50
"quantity": 1,
51
"frequency": 2,
52
"frequencyType": "Monthly",
53
"flagPreviousOrder": false,
54
"orderReferenceId": "2865-4716-86171",
55
"customerReferenceId": "606efb7ec042330007b48447",
56
"discount": 0,
57
"tax": 0,
58
"totalAmount": 2499,
59
"shippingCost": 0,
60
"paymentStatus": "PAID",
61
"paymentMethod": "pi_1Ie5gUFbKq2PvwXbhEJlJQrv",
62
"paymentDate": "2021-04-08T21:47:04.778Z",
63
"createdAt": "2021-04-08T21:47:04.784Z",
64
"updatedAt": "2021-04-08T21:47:04.784Z",
65
"__v": 0
66
},
67
{
68
"shipTo": {
69
"name": {
70
"firstName": "Khizer",
71
"middleName": "",
72
"lastName": "Younas"
73
},
74
"streetAddress": {
75
"street1": "177 HUNTINGTON AVE STE 1703",
76
"street2": ""
77
},
78
"shipToId": "606f822b2d77400008841d1e",
79
"city": "BOSTON",
80
"state": "MA",
81
"zipCode": "02115-3153",
82
"country": "US"
83
},
84
"billTo": {
85
"name": {
86
"firstName": "Khizer",
87
"middleName": "",
88
"lastName": "Younas"
89
},
90
"streetAddress": {
91
"street1": "177 HUNTINGTON AVE STE 1703",
92
"street2": ""
93
},
94
"city": "BOSTON",
95
"state": "MA",
96
"zipCode": "02115-3153",
97
"country": "US",
98
"billToId": "606f8240d10b8600089fa55b"
99
},
100
"paymentDetails": {
101
"processor": "stripe"
102
},
103
"isDeleted": false,
104
"deletedAt": null,
105
"_id": "606f8243feef6c0008971e65",
106
"subscriptionID": "606f8243feef6c0008971e64",
107
"planID": "606ef36a93bc6e00084fd5ca",
108
"itemID": "1000000058",
109
"itemName": "FRUIT LOVERS VARIETY",
110
"quantity": 1,
111
"frequency": 2,
112
"frequencyType": "Monthly",
113
"flagPreviousOrder": false,
114
"orderReferenceId": "8520-6752-84361",
115
"customerReferenceId": "606efb7ec042330007b48447",
116
"discount": 30,
117
"tax": 0,
118
"totalAmount": 1749.3,
119
"shippingCost": 0,
120
"paymentStatus": "PAID",
121
"paymentMethod": "pi_1Ie6FMFbKq2PvwXb82yBlcn9",
122
"paymentDate": "2021-04-08T22:22:59.579Z",
123
"createdAt": "2021-04-08T22:22:59.584Z",
124
"updatedAt": "2021-04-08T22:22:59.584Z",
125
"__v": 0
126
},
127
{
128
"shipTo": {
129
"name": {
130
"firstName": "Khizer",
131
"middleName": "",
132
"lastName": "Younas"
133
},
134
"streetAddress": {
135
"street1": "177 HUNTINGTON AVE STE 1703",
136
"street2": ""
137
},
138
"shipToId": "606f8414484b1500094c53bd",
139
"city": "boston",
140
"state": "MA",
141
"zipCode": "02115-3153",
142
"country": "US"
143
},
144
"billTo": {
145
"name": {
146
"firstName": "Khizer",
147
"middleName": "",
148
"lastName": "Younas"
149
},
150
"streetAddress": {
151
"street1": "177 HUNTINGTON AVE STE 1703",
152
"street2": ""
153
},
154
"city": "boston",
155
"state": "MA",
156
"zipCode": "02115-3153",
157
"country": "US",
158
"billToId": "606f8431591d4d0008f3d24a"
159
},
160
"paymentDetails": {
161
"processor": "stripe"
162
},
163
"isDeleted": false,
164
"deletedAt": null,
165
"_id": "606f843692d2360008857980",
166
"subscriptionID": "606f843592d236000885797f",
167
"planID": "606ef369c239960008ab3d77",
168
"itemID": "1000000058",
169
"itemName": "FRUIT LOVERS VARIETY",
170
"quantity": 1,
171
"frequency": 2,
172
"frequencyType": "Weekly",
173
"flagPreviousOrder": false,
174
"orderReferenceId": "1953-2671-40456",
175
"customerReferenceId": "606efb7ec042330007b48447",
176
"discount": 24,
177
"tax": 0,
178
"totalAmount": 1899.2399999999996,
179
"shippingCost": 0,
180
"paymentStatus": "PAID",
181
"paymentMethod": "pi_1Ie6NHFbKq2PvwXbn2hx2KEr",
182
"paymentDate": "2021-04-08T22:31:18.677Z",
183
"createdAt": "2021-04-08T22:31:18.682Z",
184
"updatedAt": "2021-04-08T22:31:18.682Z",
185
"__v": 0
186
},
187
{
188
"shipTo": {
189
"name": {
190
"firstName": "test IQBAR",
191
"middleName": "",
192
"lastName": "test"
193
},
194
"streetAddress": {
195
"street1": "185-S QA Estate",
196
"street2": ""
197
},
198
"shipToId": "testShip",
199
"city": "Lahore",
200
"state": "Punjab",
201
"zipCode": "a1a1a1",
202
"country": "Pakistan"
203
},
204
"billTo": {
205
"name": {
206
"firstName": "test bill",
207
"middleName": "",
208
"lastName": "test"
209
},
210
"streetAddress": {
211
"street1": "185-S QA Estate bill",
212
"street2": ""
213
},
214
"billToId": "testBill",
215
"city": "Lahore",
216
"state": "Punjab",
217
"zipCode": "a1a1a1",
218
"country": "Pakistan"
219
},
220
"paymentDetails": {
221
"processor": "stripe"
222
},
223
"isDeleted": false,
224
"deletedAt": null,
225
"_id": "60893381982e030009d7925f",
226
"subscriptionID": "6089337f982e030009d7925e",
227
"planID": "6069ad22b68b21000ab1b046",
228
"itemID": "1000000058",
229
"itemName": "FRUIT LOVERS VARIETY",
230
"quantity": 3,
231
"frequency": 4,
232
"frequencyType": "Weekly",
233
"orderReferenceId": "5082-5948-21691",
234
"customerReferenceId": "606efb7ec042330007b48447",
235
"discount": 10,
236
"tax": 2,
237
"totalAmount": 6747.3,
238
"shippingCost": 2,
239
"paymentStatus": "PAID",
240
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
241
"paymentDate": "2021-04-28T10:05:53.626Z",
242
"createdAt": "2021-04-28T10:05:53.631Z",
243
"updatedAt": "2021-04-28T10:05:53.631Z",
244
"__v": 0
245
}
246
]
247
}
248
}
Copied!
Response Code: 400
Message: Client Error
Response Code: 500
Message: Server Error

Changelog

  • April-2021
Last modified 1mo ago
Copy link
Contents
Changelog