XM

Retrieve All Subscribers

Path:

GET /data-subscription/customers?pageSize=12&pageNumber=1

This API enables you to retrieve all of your subscribers based on the specified query parameters

Headers

Content-Type : application/json

Authorization: JWT Token

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

Parameters

Type : query

Name : page size and page number

Required: true

Sample Path

https://{baseURL}/data-subscription/subscriptions/customers?pageSize=12&pageNumber=1

Sample Response

Response Code: 200

Message: OK

{
"success": true,
"responseStatus": "OK",
"message": "Request processed successfully.",
"data": {
"customers": [
{
"_id": "6068efcdb89ba600081ea618",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JElkvWLG5Lu1cb",
"customerEmail": "[email protected]",
"customerReferenceId": "[email protected]",
"customerFullName": "Joe M Demo",
"paymentMethodId": [
{
"isDeleted": false,
"_id": "6068efcdb89ba600081ea619",
"paymentMethodId": "pm_1ISekkETggmgrCy2b7osIpl8",
"isDefault": "true"
}
],
"createdAt": "2021-04-03T22:44:29.656Z",
"updatedAt": "2021-04-11T09:25:11.654Z",
"__v": 0,
"merchantAccount": "5fc78dfc6135050007191290",
"subscriptions": [
{
"_id": "6068efcdb89ba600081ea618",
"status_with_count": [
{
"status": "ACTIVE",
"count": 3
},
{
"status": "PAUSE",
"count": 1
}
],
"count": 4
}
]
},
{
"_id": "606c90c746eb7a0008ae4c4b",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JFnfL6dEFDGvKB",
"customerEmail": "[email protected]",
"customerReferenceId": "606c8f222b0ed4000838d631",
"customerFullName": "Smith Demo",
"paymentMethodId": [
{
"isDeleted": false,
"_id": "606c90c746eb7a0008ae4c4c",
"paymentMethodId": "pm_1ISekkETggmgrCy2b7osIpl8",
"isDefault": "true"
}
],
"createdAt": "2021-04-06T16:48:07.714Z",
"updatedAt": "2021-04-06T17:01:24.246Z",
"__v": 0,
"merchantAccount": "5fc78dfc6135050007191290",
"subscriptions": [
{
"_id": "606c90c746eb7a0008ae4c4b",
"status_with_count": [
{
"status": "CANCEL",
"count": 1
},
{
"status": "PAUSE",
"count": 1
}
],
"count": 2
}
]
},
{
"_id": "606de2193b02c1000989679e",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGAtcCVomlYRxq",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "[email protected]",
"customerFullName": "Kathy Demo",
"paymentMethodId": [],
"createdAt": "2021-04-07T16:47:21.173Z",
"updatedAt": "2021-04-08T21:03:11.843Z",
"__v": 0,
"subscriptions": [
{
"_id": "606de2193b02c1000989679e",
"status_with_count": [
{
"status": "ACTIVE",
"count": 1
}
],
"count": 1
}
]
},
{
"_id": "606e2498b1f58a000875d63b",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGFS38AJQtWJh3",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "",
"customerFullName": "Sara Demo",
"paymentMethodId": [],
"createdAt": "2021-04-07T21:31:04.125Z",
"updatedAt": "2021-04-07T21:31:04.125Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606efdc83bf07b0009bb92e7",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGUP58B8bOiQNn",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "606efb7ec042330007b48447",
"customerFullName": "Mike Demo",
"paymentMethodId": [],
"createdAt": "2021-04-08T12:57:44.079Z",
"updatedAt": "2021-04-08T12:57:44.079Z",
"__v": 0,
"subscriptions": [
{
"_id": "606efdc83bf07b0009bb92e7",
"status_with_count": [
{
"status": "ACTIVE",
"count": 3
}
],
"count": 3
}
]
},
{
"_id": "606f024132f89200086753bc",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGUiIgFqh76cGM",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "606f01f441b8fc0008529916",
"customerFullName": "Lyn Demo",
"paymentMethodId": [],
"createdAt": "2021-04-08T13:16:49.214Z",
"updatedAt": "2021-04-08T13:16:49.214Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606f1cfe8bb36a000944ea08",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGWY1d5javq8Ub",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "",
"customerFullName": "Erin Test",
"paymentMethodId": [],
"createdAt": "2021-04-08T15:10:54.313Z",
"updatedAt": "2021-04-08T15:10:54.313Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606f226dd0c32b0008bf0472",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGWvrW64HRYjXY",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "",
"customerFullName": "taha Test",
"paymentMethodId": [],
"createdAt": "2021-04-08T15:34:05.628Z",
"updatedAt": "2021-04-08T15:34:05.628Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606f235dd0c32b0008bf0473",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGWzgpZeCba3iY",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "601bd05137d7fc00081c3259",
"customerFullName": "Ahmed Test",
"paymentMethodId": [],
"createdAt": "2021-04-08T15:38:05.315Z",
"updatedAt": "2021-04-08T15:38:05.315Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606f2c241c731e0008059528",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGXbtZUZaqRbmX",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "",
"customerFullName": "Sam Demo",
"paymentMethodId": [],
"createdAt": "2021-04-08T16:15:32.988Z",
"updatedAt": "2021-04-08T16:15:32.988Z",
"__v": 0,
"subscriptions": []
},
{
"_id": "606f7102d52ad200094c818c",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGcLvmdeaFeMAY",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "606f7098d19ec5000830027a",
"customerFullName": "Ruth Test",
"paymentMethodId": [],
"createdAt": "2021-04-08T21:09:22.644Z",
"updatedAt": "2021-04-08T21:32:35.109Z",
"__v": 0,
"subscriptions": [
{
"_id": "606f7102d52ad200094c818c",
"status_with_count": [
{
"status": "ACTIVE",
"count": 5
}
],
"count": 5
}
]
},
{
"_id": "606f81f8feef6c0008971e60",
"isDeleted": false,
"deletedAt": null,
"stripeId": "cus_JGdVfXEUZu18En",
"customerEmail": "[email protected]",
"merchantAccount": "5fc78dfc6135050007191290",
"customerReferenceId": "6037b2dc6c845c00085d40f7",
"customerFullName": "Liz Tets",
"paymentMethodId": [
{
"isDeleted": false,
"_id": "606f81f8feef6c0008971e61",
"paymentMethodId": "pm_1ISekkETggmgrCy2b7osIpl8",
"isDefault": "true"
}
],
"createdAt": "2021-04-08T22:21:44.597Z",
"updatedAt": "2021-04-08T22:21:44.616Z",
"__v": 0,
"subscriptions": [
{
"_id": "606f81f8feef6c0008971e60",
"status_with_count": [
{
"status": "ACTIVE",
"count": 1
}
],
"count": 1
}
]
}
],
"count": 1404
}
}

Response Code: 400

Message: Client Error

Response Code: 500

Message: Server Error

Changelog

  • April-2021