XM
Members
Retrieve Orders by Subscription 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-subscriptionId/{subscriptionID}
Copied!
Retrieves details of the subscribed orders, by subscription 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 subscription ID.
Required: true

Sample Path

1
https://{baseURL}/data-subscription/orders/get-by-subscriptionId/6058511b4dd50e6ddd6d744c
Copied!

Sample Response

Response Code: 200
Message: OK
1
{
2
"success": true,
3
"responseStatus": "OK",
4
"message": "Request processed successfully.",
5
"data": {
6
"subscription": {
7
"shipTo": {
8
"name": {
9
"firstName": "test IQBAR",
10
"middleName": "",
11
"lastName": "test"
12
},
13
"streetAddress": {
14
"street1": "185-S QA Estate",
15
"street2": ""
16
},
17
"shipToId": "testShip",
18
"city": "Lahore",
19
"state": "Punjab",
20
"zipCode": "a1a1a1",
21
"country": "Pakistan"
22
},
23
"billTo": {
24
"name": {
25
"firstName": "test bill",
26
"middleName": "",
27
"lastName": "test"
28
},
29
"streetAddress": {
30
"street1": "185-S QA Estate bill",
31
"street2": ""
32
},
33
"billToId": "testBill",
34
"city": "Lahore",
35
"state": "Punjab",
36
"zipCode": "a1a1a1",
37
"country": "Pakistan"
38
},
39
"isDeleted": false,
40
"deletedAt": null,
41
"_id": "6058511b4dd50e6ddd6d744c",
42
"planID": "604f5e65eddac91f7ad5535c",
43
"itemID": "1000019305",
44
"priceListID": "100266",
45
"quantity": 3,
46
"customerID": "6045e4453db3e710480a4d2b",
47
"frequency": 6,
48
"frequencyType": "weekly",
49
"merchantAccountId": "8739392294",
50
"merchantAccount": "5f328bf0b7c15700071233b9",
51
"status": "ACTIVE",
52
"lastOrderReferenceId": "5082-5948-16923",
53
"cancellationReason": "",
54
"discount": 2,
55
"tax": 2,
56
"shippingCost": 2,
57
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
58
"lastPaymentDate": "2021-03-22T08:11:07.219Z",
59
"nextPaymentDate": "2021-05-03T08:11:07.218Z",
60
"createdAt": "2021-03-22T08:11:07.234Z",
61
"updatedAt": "2021-03-22T08:11:07.234Z",
62
"__v": 0
63
},
64
"orderAttempts": [
65
{
66
"shipTo": {
67
"name": {
68
"firstName": "test IQBAR",
69
"middleName": "",
70
"lastName": "test"
71
},
72
"streetAddress": {
73
"street1": "185-S QA Estate",
74
"street2": ""
75
},
76
"shipToId": "testShip",
77
"city": "Lahore",
78
"state": "Punjab",
79
"zipCode": "a1a1a1",
80
"country": "Pakistan"
81
},
82
"billTo": {
83
"name": {
84
"firstName": "test bill",
85
"middleName": "",
86
"lastName": "test"
87
},
88
"streetAddress": {
89
"street1": "185-S QA Estate bill",
90
"street2": ""
91
},
92
"billToId": "testBill",
93
"city": "Lahore",
94
"state": "Punjab",
95
"zipCode": "a1a1a1",
96
"country": "Pakistan"
97
},
98
"isDeleted": false,
99
"deletedAt": null,
100
"_id": "605851204dd50e6ddd6d744d",
101
"subscriptionID": "6058511b4dd50e6ddd6d744c",
102
"planID": "604f5e65eddac91f7ad5535c",
103
"itemID": "1000019305",
104
"itemName": "test0939",
105
"quantity": 3,
106
"frequency": 6,
107
"frequencyType": "weekly",
108
"flagPreviousOrder": false,
109
"orderReferenceId": "5082-5948-16923",
110
"customerReferenceId": "customerReferenceId",
111
"discount": 2,
112
"tax": 2,
113
"totalAmount": 882000,
114
"shippingCost": 2,
115
"paymentStatus": "PAID",
116
"paymentMethod": "pm_1ISekkETggmgrCy2b7osIpl8",
117
"paymentDate": "2021-03-22T08:11:12.321Z",
118
"createdAt": "2021-03-22T08:11:12.367Z",
119
"updatedAt": "2021-03-22T08:11:12.367Z",
120
"__v": 0
121
}
122
]
123
}
124
}
Copied!
Response Code: 400
Message: Client Error
Response Code: 500
Message: Server Error

Changelog

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