Get All Subscriptions
Returns a list of all subscriptions with pagination based on the filters passed on as query parameters.
Request parameters
Field | Description | Type |
---|---|---|
page | Number of the desired page for which data should be returned. Page numbers use zero-based numbering e.g. to get the 10th page, you need to set page=9. | Int |
pageSize | Number of Plans per Page requested (e.g. 10). | Int |
createdAtLte | Created before the provided date & time (Lte: Lower Than or Equal → <=). Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z | String |
createdAtGte | Created after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z | String |
updatedAtLte | Updated before the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z | String |
updatedAtGte | Updated after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z | String |
trialStartDateGte | Trial starts after or on the same provided date. Format: yyyy-MM-dd | String |
trialStartDateLte | Trial starts before or on the same provided date. Format: yyyy-MM-dd | String |
trialEndDateGte | Trial ends after or on the same provided date. Format: yyyy-MM-dd | String |
trialEndDateLte | Trial ends before or on the same provided date. Format: yyyy-MM-dd | String |
nextBillingDateGte | Next billing date is after or on the same provided date. Format: yyyy-MM-dd | String |
nextBillingDateLte | Next billing date is before or on the same provided date. Format: yyyy-MM-dd | String |
deleted | Possible values: true, false | String |
planId | Id of the Subscription Plan Example: SubscriptionPlan-3613bc8b-7a78-47b5-b19d-17fd9575fef9 | String |
externalMerchantId | External merchant identifier provided during the creation of subscription(s) | String |
Gte: Greater Than or Equal: >=
Lte: Lower Than or Equal: <=
info
Please note that if a query parameter non-existent in the list above is passed in the request it would be ignored. If the value sent on one of the query parameters is invalid it would also be ignored.
info
The request must provide the following header:
x-api-key: {merchantKey}
Request sample
Path:
GET {baseURL}/subscriptions?page=1&pageSize=2
Header:
Content-Type: application/json
en-US
Response parameters
Field | Description | Type |
---|---|---|
page | Number of the page for which the data is to be returned. | Int |
pageSize | Number of the records to display per page. | Int |
count | Number of total records(Subscriptions) returned for the made search/request. | Int |
totalPages | Number of pages returned for the made search/request. | Int |
data | List of all the Subscription of the page requested. For the Subscription output parameters specification, please refer to Get Subscription API outputs section. | Object |
Response sample
Status Code:
200 (OK)
Header:
Content-Type: application/json
Accept-Language: en-US
{
"page": 1,
"pageSize": 2,
"count": 27,
"totalPages": 14,
"data": [
{
"id": "Subscription-234956e0-96d8-4205-8dd4-d8fa5714c804",
"createdAt": "2021-03-18T15:45:36.33Z",
"updatedAt": "2021-03-18T15:45:36.33Z",
"deletedAt": null,
"planId": "SubscriptionPlan-5098594c-5483-4faa-a36d-3ba9ac33b095",
"status": "created",
"payment": {
"description": "Premium music for only 25 EUR!",
"recurrentAmount": 20.99,
"currencyIsoCode": "EUR"
},
"startDate": "2021-03-09T15:30:44.718-08:00",
"trialStartDate": "2022-03-09",
"trialEndDate": "2022-03-10",
"nextBillingDate": "2022-04-10",
"billingCyclesRemaining": 1,
"customerAccountId": "d58c3076-b496-4a3a-bc8f-d2a55af5794a",
"merchantMetadata": "{\"usage\": 250, \"client\": 1248052792, \"monitor\": true }",
"externalMerchantId": "client_21507252",
"billingAgreement": null,
"billingAddress": {
"addressLine1": "Wall st. , NY",
"addressLine2": "Building 442A22",
"addressLine3": "7th floor",
"number": "224",
"city": "NEW YORK",
"postCode": "NEW YORK",
"countryCode": "USA",
"state": "AR"
},
"shippingAddress": {
"addressLine1": "Wall st. , NY",
"addressLine2": "Building 442A22",
"addressLine3": "7th floor",
"number": "224",
"city": "NEW YORK",
"postCode": "NEW YORK",
"countryCode": "US",
"state": "AR"
},
"consumer": {
"firstName": "John",
"lastName": "Smith",
"middleName": ".",
"emailAddress": "john.smith@smithenterprise.com",
"title": "Mr",
"culture": "de-en",
"dateOfBirth": "1995-01-26",
"gender": "M",
"mobilePhone": "1285765191221",
"homePhone": "1285765191221",
"workPhone": "1285765191221",
"taxId": "DE1927456229"
}
},
{
"id": "Subscription-873c7f6e-55ee-4909-b243-c614f319820e",
"createdAt": "2021-03-18T15:45:23.20Z",
"updatedAt": "2021-03-18T15:45:23.20Z",
"deletedAt": null,
"planId": "SubscriptionPlan-5098594c-5483-4faa-a36d-3ba9ac33b095",
"status": "created",
"payment": {
"description": "Premium music for only 25 EUR!",
"recurrentAmount": 20.99,
"currencyIsoCode": "EUR"
},
"startDate": "2021-03-09T15:30:44.718-08:00",
"trialStartDate": "2022-03-09",
"trialEndDate": "2022-03-10",
"nextBillingDate": "2022-04-10",
"billingCyclesRemaining": 1,
"customerAccountId": "d58c3076-b496-4a3a-bc8f-d2a55af5794a",
"merchantMetadata": "{\"usage\": 250, \"client\": 1248052792, \"monitor\": true }",
"externalMerchantId": "client_21507252",
"billingAgreement": null,
"billingAddress": {
"addressLine1": "Wall st. , NY",
"addressLine2": "Building 442A22",
"addressLine3": "7th floor",
"number": "224",
"city": "NEW YORK",
"postCode": "NEW YORK",
"countryCode": "USA",
"state": "AR"
},
"shippingAddress": {
"addressLine1": "Wall st. , NY",
"addressLine2": "Building 442A22",
"addressLine3": "7th floor",
"number": "224",
"city": "NEW YORK",
"postCode": "NEW YORK",
"countryCode": "US",
"state": "AR"
},
"consumer": {
"firstName": "John",
"lastName": "Smith",
"middleName": ".",
"emailAddress": "john.smith@smithenterprise.com",
"title": "Mr",
"culture": "de-en",
"dateOfBirth": "1995-01-26",
"gender": "M",
"mobilePhone": "1285765191221",
"homePhone": "1285765191221",
"workPhone": "1285765191221",
"taxId": "DE1927456229"
}
}
]
}
info
For error handling, please refer to this section.