Skip to main content

Get All Subscriptions

Returns a list of all subscriptions with pagination based on the filters passed on as query parameters.

Request parameters

FieldDescriptionType
pageNumber 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
pageSizeNumber of Plans per Page requested (e.g. 10).Int
createdAtLteCreated before the provided date & time (Lte: Lower Than or Equal → <=). Format: yyyy-MM-dd'T'HH:mm:ss.SS'ZString
createdAtGteCreated after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'ZString
updatedAtLteUpdated before the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'ZString
updatedAtGteUpdated after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'ZString
trialStartDateGteTrial starts after or on the same provided date. Format: yyyy-MM-ddString
trialStartDateLteTrial starts before or on the same provided date. Format: yyyy-MM-ddString
trialEndDateGteTrial ends after or on the same provided date. Format: yyyy-MM-ddString
trialEndDateLteTrial ends before or on the same provided date. Format: yyyy-MM-ddString
nextBillingDateGteNext billing date is after or on the same provided date. Format: yyyy-MM-ddString
nextBillingDateLteNext billing date is before or on the same provided date. Format: yyyy-MM-ddString
deletedPossible values: true, falseString
planIdId of the Subscription Plan Example: SubscriptionPlan-3613bc8b-7a78-47b5-b19d-17fd9575fef9String
externalMerchantIdExternal 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&amp;pageSize=2

Header:

Content-Type: application/json
en-US

Response parameters

FieldDescriptionType
pageNumber of the page for which the data is to be returned.Int
pageSizeNumber of the records to display per page.Int
countNumber of total records(Subscriptions) returned for the made search/request.Int
totalPagesNumber of pages returned for the made search/request.Int
dataList 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.