Retrieve Subscriptions
The Nue Self-Service API provides comprehensive capabilities for retrieving and managing customer subscriptions. There are two ways of showing customer’s their subscriptions:
Current Contract View
Use this view when you need to:
-
View the complete subscription lifecycle
-
See all changes (past, present, and future)
-
Understand the full contract terms
-
Plan future modifications
-
Generate complete subscription reports
Snapshot View
Use this view when you need to:
-
Analyze subscription state at a specific point in time
-
Track historical changes
-
Understand the impact of upcoming changes
-
Generate financial reports for a specific period
-
Audit subscription changes
How to Retrieve Current Contract ViewCopied!
To retrieve the current contract for customer subscriptions, you need one of:
-
Customer IDs: Array of unique identifiers for customers whose subscriptions you want to retrieve
-
Subscription Name: The specific name of a subscription to fetch. This can be either the Nue name or the Salesforce name. See note in Subscription Response below for details around the format’s for Nue name and Salesforce name.
Query Parameters
The subscription retrieval endpoint (/subscriptions) supports several query parameters:
-
customerIds: JSON-encoded array of customer IDs (cannot be used with name)
-
name: Name of specific subscription to fetch (cannot be used with customerIds)
-
history: Boolean flag to include subscription history (only valid with name)
-
includes: Comma-separated list of related data to include (currently supports product and pricetags)
-
version: To specify the version of the subscriptions to retrieve, with currently the only option being latest
-
status: Filter subscriptions by status:
-
active: Currently active subscriptions
-
expired: Past subscriptions
-
canceled: Canceled subscriptions
-
Subscription Response
The response includes detailed information about each subscription:
-
Basic Details
-
Subscription ID, name, status
-
Creation and modification timestamps
-
Subscription version and composite ID
-
-
Financial Information
-
List price and sales price
-
Total amounts (ACV, TCV)
-
Tax amounts
-
-
Subscription Terms
-
Start and end dates
-
Subscription term length
-
Auto-renewal settings
-
Billing timing
-
-
Product and Price Tag Details
-
Product details
-
Price book entries
-
Product features
-
Unit of measure details
-
Price tag details
-
Price tag tiers
-
How to Retrieve Snapshot ViewCopied!
To retrieve customer subscriptions, you need one of:
-
Customer IDs: Array of unique identifiers for customers whose subscriptions you want to retrieve
-
Subscription Name: The specific name of a subscription to fetch. This can be either the Nue name or the Salesforce name. See note in Subscription Response below for details around the format’s for Nue name and Salesforce name.
Query Parameters
For the snapshot view, the snapshotDate MUST be provided as a query parameter. In addition, the following query parameters are supported:
-
customerIds: JSON-encoded array of customer IDs (cannot be used with name)
-
name: Name of specific subscription to fetch (cannot be used with customerIds)
-
includes: Comma-separated list of related data to include (currently supports product and pricetags)
Subscription Response
The response includes detailed information about each subscription at a specific point in time:
-
Basic Details
-
Subscription ID, name, status
-
External ID and parent subscription relationships
-
Snapshot date and subscription state
-
-
Account Information
-
Customer ID and billing account ID
-
External system identifiers
-
Account hierarchies and relationships
-
-
Subscription Terms
-
Start and end dates
-
Subscription term length
-
Unit of measure details
-
Term dimension (Month, Year, etc.)
-
-
-
Product and Pricing Details
-
Product ID and product details (when includes=product)
-
Price book entries
-
Quantity and unit specifications
-
Price tag details (when includes=pricetags)
-
-
Future Changes (when includes=upcomingChanges)
-
Scheduled quantity updates
-
Product upgrades and swaps
-
Term modifications and renewals
-
Cancellation and end dates
-
Change effective dates
-
-
Snapshot Metadata
-
Point-in-time calculation date
-
Subscription status at snapshot date
-
Warnings and validation messages
-
Why We Differentiate Subscription Naming Between Nue and SalesforceCopied!
Subscriptions created directly through Nue's self-service flow are assigned names in the format SUB-XXXXXXXX. These also carry an externalName field that maps to the corresponding Salesforce subscription name (which typically follows the format SUB-XXXXXX).
On the other hand, subscriptions originating in Salesforce retain the standard Salesforce naming convention (SUB-XXXXXX) and do not require the externalName mapping.
This approach is intentional and critical for data integrity. When a customer creates a subscription through self-service (i.e., within Nue), there's a chance that the sync to Salesforce could fail due to a variety of reasons (e.g., API limits, connectivity issues, data validation errors). If we used only the Salesforce name format and the sync failed, that subscription might get lost or become inaccessible.
By assigning Nue-generated subscriptions their own unique name format and storing the Salesforce name separately in externalName, we:
-
Preserve the customer's data even if the Salesforce sync doesn't go through.
-
Ensure billing continuity—the subscription still exists in Nue and can be billed against.
-
Maintain traceability between Nue and Salesforce systems without data loss.
-
Enable re-sync or manual intervention later, which will populate the
externalNameat that time.
This setup is a safeguard to protect valuable self-service subscription data and support uninterrupted billing workflows.
Use Cases for Subscription Retrieval
This functionality supports several key self-service scenarios:
-
Active Subscription Management:
-
View current subscriptions
-
Monitor renewal dates
-
Track subscription quantities
-
-
Subscription History:
-
Review past subscription changes
-
Track version history
-
Analyze usage patterns
-
-
Financial Planning:
-
Monitor subscription costs
-
Track recurring charges
-
Plan for renewals
-
-
Product Management:
-
View included features
-
Understand pricing tiers
-
Best Practices
-
Performance Optimization:
-
Use specific customer IDs when possible
-
Include only necessary related data
-
Implement appropriate caching strategies
-
-
Data Management:
-
Regularly sync subscription data
-
Monitor subscription statuses
-
Track version changes
-
-
User Experience:
-
Provide clear subscription status indicators
-
Show relevant renewal information
-
Link to appropriate subscription management actions
-
-
Error Handling:
-
Handle expired subscriptions appropriately
-
Manage subscription transitions
-
Process renewal failures gracefully
-
By implementing effective subscription retrieval, you enable customers to maintain clear visibility into their recurring services and manage th