Saaslogic
  1. Subscriptions
Saaslogic
  • Introduction
  • Authentication
  • Enum Reference
  • Authentication
    • saaslogic token
      • Get the saaslogic access token
    • login Url
      • Gives the login URL
    • logout Url
      • Gives the logout URL
  • Countries
    • Get list of countries
  • Plans
    • List all plans for a product
  • Subscriptions
    • Create a product subscription
      POST
    • Retrieve a subscription
      GET
    • Create Customer and Subscription
      POST
    • Subscription with details permissions, menus and features
      GET
    • The Saaslogic URL for creating subscription
      POST
  • Usage Reporting
    • Report the resource usages in subscription for invoicing
    • Retrieves the resource usages of a subscription in the current billing cycle
  • Customers
    • addresses
      • Create an address
      • List all addresses
      • Update an address
      • Retrieve an address
      • Delete an address
    • contacts
      • Create a contact
      • List all contacts
      • Update a contact
      • Retrieve a contact
      • Delete a contact
    • Create a customer
    • List all customers
    • Update a customer
    • Retrieve a customer
    • Delete a customer
  • Vendors
    • vendor addresses
      • Create a vendor address.
      • List all vendor addresses.
      • Update a vendor address.
      • Retrieve a vendor address..
      • Delete a vendor address.
    • vendor contacts
      • Create a vendor contact.
      • List all vendor contacts.
      • Update a vendor contact.
      • Retrieve a vendor contact.
      • Delete a vendor contact.
    • vendor bills
      • Create a vendor bill
      • Cancel a vendor bill.
    • vendor bills payout
      • Update payment details to vendor bills.
    • Create a vendor
    • Update a vendor.
    • Activate a vendor.
    • Dectivate a vendor.
  • Attributes
    • Create a organization attribute and set the value
    • Retrieve a organization attribute
    • Create a user attribute
    • Update a user attribute
    • Get a user attribute
  • Invoices
    • subscriptions
      • Get the invoices
      • Get the invoices by subscription
    • payments
      • Mark the invoice payment status
    • Get the invoice details .
    • cancel the invoices
    • Send invoice as pdf with payment link.
    • Create an on-demand invoice
  1. Subscriptions

Retrieve a subscription

GET
/subscriptions/{subscriptionId}
Subscriptions
Retrieve a subscription by subscription Id
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api-sandbox.saaslogic.io/v1/subscriptions/4ef403a0-b7eb-4731-9a7b-df7962aa481f' \
--header 'Authorization;' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Response Response Example
200 - Example 1
{
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "productId": "2a9d72c5-1c78-4b1b-bd12-4f4d76e9c2b7",
  "customerAddressId": "c0a80123-12b4-4c56-abc7-89d4ef567890",
  "planId": "d6f7e5a1-3c47-4a78-9b23-67f3e2d5a4b8",
  "billingFrequencyId": "9f8b7a6c-5d4e-4c3b-8a2b-1f0d9e7c6a5b",
  "subscriptionId": "7a3e2b1c-8d4f-5a6b-9f0e-2c7d1a4b3c8d",
  "subscriptionStartDate": "2025-03-18T00:00:00",
  "billingCycleStartDate": "2025-03-01T00:00:00",
  "isAutoRenewEnabled": false,
  "subscriptionAttributes": [
    {
      "attributeName": "Contract Type",
      "attributeValue": "Annual"
    }
  ],
  "resourceQuantities": [
    {
      "resourceId": "5d2b3a1e-8c4f-6b7a-9f0e-2c1d4a3b8c7d",
      "resourceName": "Storage Space",
      "quantity": "200"
    }
  ],
  "addons": [
    {
      "addonId": "3e7a2b1c-9d4f-5a6b-0f1e-2c7d8a4b3c8d",
      "addonName": "Storage100",
      "addonType": "Non-Recurring",
      "billingFrequencyId": "f7a6b5c4-d3e2-1f0e-9b8d-2c7a4b3c8d5e",
      "billingFrequencyName": "Monthly",
      "resourceName": "Backup Storage",
      "quantity": "50",
      "resourceUOMId": "6e7a2b1d-3d2f-7a6c-0f1e-2c7d8a4b3c8d",
      "resourceUOMName": "GB"
    }
  ],
  "isTrail": false,
  "isGenerateInvoiceForCurrentCycle": false
}

Request

Path Params
subscriptionId
string 
required
Example:
4ef403a0-b7eb-4731-9a7b-df7962aa481f
Header Params
Authorization
string 
required
Saaslogic authorization token
Default:
Bearer {{bearerToken}}
Content-Type
string 
optional
Default:
application/json
Accept
string 
optional
Default:
application/json

Responses

🟢200Success
application/json
Body
customerId
string 
required
The ID of the Customer
Example:
550e8400-e29b-41d4-a716-446655440000
productId
string 
required
The ID of the Product
Example:
2a9d72c5-1c78-4b1b-bd12-4f4d76e9c2b7
customerAddressId
string 
required
The ID of the Customer Address
Example:
c0a80123-12b4-4c56-abc7-89d4ef567890
planId
string 
required
The ID of the Plan
Example:
d6f7e5a1-3c47-4a78-9b23-67f3e2d5a4b8
billingFrequencyId
string 
required
The ID of the Billing Frequency
Example:
9f8b7a6c-5d4e-4c3b-8a2b-1f0d9e7c6a5b
subscriptionId
string 
optional
The ID of the Subscription
Example:
7a3e2b1c-8d4f-5a6b-9f0e-2c7d1a4b3c8d
productName
string 
read-onlyoptional
The name of the product
Example:
Premium Cloud Storage
planName
string 
read-onlyoptional
The name of the plan
Example:
Enterprise Plan
subscriptionStartDate
string <yyyy-MM-dd'T'HH:mm:ss>
optional
The start date of the subscription
Example:
2025-03-18T00:00:00
subscriptionEndDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The end date of the subscription
Example:
2026-03-18T23:59:59
paidThroughDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The date until which the subscription has been paid
Example:
2025-12-31T23:59:59
nextInvoiceDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The date when the next invoice is scheduled to be generated
Example:
2025-04-01T00:00:00
billingCycleStartDate
string <yyyy-MM-dd'T'HH:mm:ss>
optional
The start date of the billing cycle. This filed is only applicable to backdated subscription.
Example:
2025-03-01T00:00:00
billingCycleEndDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The end date of the billing cycle
Example:
2025-03-31T23:59:59
subscriptionExpirationDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The expiration date of the subscription
lastInvoiceDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The date when the last invoice was generated
Example:
2025-02-28T00:00:00
paymentDueDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The due date for the next payment
Example:
2025-04-10T00:00:00
billedThroughDate
string <yyyy-MM-dd'T'HH:mm:ss>
read-onlyoptional
The date until which billing has been completed
Example:
2025-03-31T23:59:59
isAutoRenewEnabled
boolean 
optional
Indicates whether the subscription is set to auto-renew (true/false)
status
string 
read-onlyoptional
The current status of the subscription.
Example:
Active
paymentStatus
string 
read-onlyoptional
The current payment status of the subscription.
Example:
Paid
subscriptionAttributes
array [object {2}] 
optional
List of attributes and their values associated with the subscription
attributeName
string 
optional
The attribute name of the subscription
Example:
Contract Type
attributeValue
string 
optional
The attribute value of the subscription
Example:
Annual
resourceQuantities
array [object {9}] 
optional
List of resources and their quantities associated with the subscription
resourceId
string 
optional
The ID of the resource
Example:
5d2b3a1e-8c4f-6b7a-9f0e-2c1d4a3b8c7d
resourceName
string 
read-onlyoptional
The name of the resource
Example:
Storage Space
rangeFrom
string 
read-onlyoptional
The minimum quantity range for the resource
Example:
100
rangeTo
string 
read-onlyoptional
The maximum quantity range for the resource
Example:
500
pricePerSet
string 
read-onlyoptional
The price per set of the resource
Example:
10.0
pricingSetSize
string 
read-onlyoptional
The set size for pricing calculation
Example:
50
uomName
string 
read-onlyoptional
The unit of measurement for the resource
Example:
GB
priceCalculationType
string 
read-onlyoptional
The type of price calculation used (e.g., Fixed, Tiered)
Example:
Fixed
quantity
string 
optional
The quantity of the resource subscribed
Example:
200
addons
array [object {13}] 
optional
List of addons associated with the subscription
addonId
string 
optional
The ID of the addon
Example:
3e7a2b1c-9d4f-5a6b-0f1e-2c7d8a4b3c8d
addonName
string 
read-onlyoptional
The name of the addon
Example:
Storage100
addonType
enum<string> 
read-onlyoptional
The Type of addon
Allowed values:
OnetimeNon-RecurringRecurring
Default:
Recurring
Example:
Non-Recurring
billingFrequencyId
string 
read-onlyoptional
The ID of the billing frequency for the addon
Example:
f7a6b5c4-d3e2-1f0e-9b8d-2c7a4b3c8d5e
billingFrequencyName
string 
read-onlyoptional
The name of the billing frequency for the addon
Example:
Monthly
resourceName
string 
read-onlyoptional
The name of the resource associated with the addon
Example:
Backup Storage
quantity
string 
read-onlyoptional
The quantity of the addon resource
Example:
50
resourceUOMId
string 
read-onlyoptional
The ID of the unit of measurement for the addon resource
resourceUOMName
string 
read-onlyoptional
The name of the unit of measurement for the addon resource
Example:
GB
currencyUOMId
string 
read-onlyoptional
The ID of the currency unit of measurement
Example:
d3e2f1a0-9b8d-2c7a4b3c-8d5e6f7a
currencyUOMName
string 
read-onlyoptional
The name of the currency unit of measurement
Example:
USD
currencyDisplaySymbol
string 
read-onlyoptional
The display symbol for the currency
Example:
$
countries
array [object {2}] 
read-onlyoptional
List of countries where the addon is available
isTrail
boolean 
optional
Indicates whether the subscription is a trial (true/false)
Default:
false
🔴500ErrorResponse
Previous
Create a product subscription
Next
Create Customer and Subscription
Built with