Getting a subscription by identifier
Learn how to get a subscription by using the subscription identifier.
By using the GET /v1/subscriptions/{subscriptionId} request, you can fetch detailed information about a specific subscription using the subscription's unique identifier. This information includes the basic subscription details and intricate aspects such as billing, renewal dates, product details, and associated add-ons. 
You need to replace the {subscriptionId} with the subscription identifier and {YourAPIKey} with your actual API key. 
curl --location --request GET 'https://api.digitalriver.com/v1/subscriptions/{subscriptionId}' \
--header 'Authorization: Basic {YourAPIKey}' \
...You will receive a 200 OK response.
{
    "id": "10499",
    "creationDate": "2020-10-05T11:59:53.000Z",
    "activationDate": "2020-10-05T05:00:00.000Z",
    "nextRenewalDate": "2021-10-05T05:00:00.000Z",
    "expirationDate": "2021-10-05T05:00:00.000Z",
    "graceDate": "2021-10-05T05:00:00.000Z",
    "currentQuantity": 1,
    "renewalQuantity": 1,
    "autoRenewal": false,
    "locale": "en_US",
    "state": "Subscribed",
    "duration": 365,
    "frequency": 365,
    "siteId": "sub2test",
    "term": {
        "termUnit": "YEARS",
        "termLength": 1
    },
    "product": {
        "id": "5396391800",
        "name": "Annual manual renewal Subscription"
    },
    "shipToAddress": {
        "id": "325333930516",
        "firstName": "John",
        "lastName": "Smith",
        "companyName": "Acme Company",
        "line1": "1234 Fake Street",
        "city": "Minnetonka",
        "postalCode": "55343",
        "countrySubdivision": "MN",
        "country": "US",
        "countryName": "United States",
        "phoneNumber": "5556543210",
        "emailAddress": "[email protected]"
    },
    "paymentOption": {
        "nickName": "Default",
        "id": "4010780499",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
            "expirationMonth": "2",
            "expirationYear": "2021",
            "displayableNumber": "************1111",
            "type": "visa",
            "displayName": "Visa"
        },
        "address": {
            "id": "325333930515",
            "firstName": "John",
            "lastName": "Smith",
            "companyName": "Acme Company",
            "line1": "1234 Fake Street",
            "city": "Minnetonka",
            "postalCode": "55343",
            "countrySubdivision": "MN",
            "country": "US",
            "countryName": "United States",
            "phoneNumber": "55343",
            "emailAddress": "[email protected]"
        }
    },
    "addOns": [ 
        {
          "product": {
            "id": "SubProd1234561",
            "name": "Thissub-product is sub product addon1",
            "externalReferenceID": "32323377"
          },
          "quantity": 2
        },        
    ]
}A successful request will return a 200 OK response status, along with json data that contains the details of the subscription, such as its id, creationDate, state, and product information.
Last updated
Was this helpful?
