Retrieve Subscriptions
The Nue Self-Service API provides comprehensive capabilities for retrieving and managing customer subscriptions. This functionality enables customers to view their active subscriptions, track subscription history, and monitor their recurring services.
How to Retrieve Customer SubscriptionsCopied!
Required Information
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
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)
-
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
-
Why We Differentiate Subscription Naming Between Nue and Salesforce
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 their ongoing relationship with your business effectively.