Definition
https://sandbox.bluesnap.com/services/2/recurring/subscriptions?{parameters}
Documentation
The Retrieve All Subscriptions request enables you to retrieve details about all existing subscriptions in your account, or else for a specific shopper or plan ID.
You can filter by status, shopper, or plan.
Request Content
Enter any of the query parameters below into the request URL. For example:
services/2/recurring/subscriptions?pagesize=20&after=34567&gettotal=true
Query Parameters
Parameter Name | Description | Example |
---|---|---|
pagesize | Positive integer. Sets the maximum number of results to return (i.e. page size). Default is 10 if not set. Maximum is 500. | pagesize=50 |
after | Subscription ID. The response will get the page of results after the specified ID (exclusive). | after=1000 |
before | Subscription ID. The response will get the page of results before the specified ID (exclusive). | before=5000 |
gettotal | true = Include the number of total results in the response | gettotal=true |
fulldescription | true (default) = Return complete details for each subscription in the response false = Return limited information about each subscription | fulldescription=true |
status | Enter ACTIVE , CANCELED, SUSPENDED or DELETED to filter for subscriptions with that status. | status=ACTIVE |
shopperid | Retrieve the subscriptions for a specific shopper. | shopperid=16985478 |
planid | Retrieve the subscriptions associated to a specific plan. | planid=2345 |
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the subscriptionList object.
Examples
Request Examples
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions?pagesize=5&after=34567&gettotal=true&fulldescription=false \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions?pagesize=2&after=343435&fulldescription=true \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
Response Examples
{
"totalResults": 42,
"lastPage": false,
"subscriptions": [
{
"vaultedShopperId": 19550180,
"planId": 2186200,
"subscriptionId": 34566
},
{
"vaultedShopperId": 1976543,
"planId": 2186208,
"subscriptionId": 34565
},
{
"vaultedShopperId": 1923456,
"planId": 2195008,
"subscriptionId": 34564
},
{
"vaultedShopperId": 1975746,
"planId": 6208208,
"subscriptionId": 34563
},
{
"vaultedShopperId": 1922334,
"planId": 408567,
"subscriptionId": 34562
}
]
}
{
"lastPage": true,
"subscriptions": [
{
"nextChargeDate": "2016-08-15",
"quantity": 1,
"trialPeriodDays": 14,
"paymentSource": {"creditCardInfo": {
"billingContactInfo": {
"firstName": "John",
"lastName": "Doe"
},
"creditCard": {
"expirationYear": 2023,
"cardLastFourDigits": 1111,
"cardSubType": "CREDIT",
"cardCategory": "CLASSIC",
"cardType": "VISA",
"expirationMonth": "07"
}
}},
"softDescriptor": "BLS*default_descriptor",
"recurringChargeAmount": 29.99,
"chargeFrequency": "MONTHLY",
"vaultedShopperId": 21188039,
"payerInfo": {
"firstName": "John",
"lastName": "Doe"
},
"initialChargeAmount": 100,
"autoRenew": true,
"planId": 2283845,
"currency": "USD",
"subscriptionId": 343434,
"status": "ACTIVE"
},
{
"nextChargeDate": "2016-08-30",
"quantity": 1,
"trialPeriodDays": 14,
"paymentSource": {"creditCardInfo": {
"billingContactInfo": {
"firstName": "Bob",
"lastName": "Shopper"
},
"creditCard": {
"expirationYear": 2023,
"cardLastFourDigits": 1234,
"cardSubType": "CREDIT",
"cardCategory": "CLASSIC",
"cardType": "VISA",
"expirationMonth": 10
}
}},
"softDescriptor": "BLS*default_descriptor",
"recurringChargeAmount": 29.99,
"chargeFrequency": "MONTHLY",
"vaultedShopperId": 2134539,
"payerInfo": {
"firstName": "Bob",
"lastName": "Shopper"
},
"initialChargeAmount": 100,
"autoRenew": true,
"planId": 2283845,
"currency": "USD",
"subscriptionId": 343433,
"status": "ACTIVE"
}
]
}
Example Descriptions
Retrieve Subscriptions
The example above shows how to retrieve all subscriptions in your account. Results are limited to subscriptions after subscription ID 34567, and a maximum of 5 subscriptions per page. Because gettotal=true
, the response includes the total number of results. Because fulldescription=false
, the response includes limited information and you can use the subscription IDs to retrieve more details about each subscription.
Retrieve Subscriptions with full description
The example above shows how to retrieve plans with their complete details, using the fulldescription=true
parameter (alternatively, you can just leave this parameter off, since the default is true).
Back to Top