Get Charges by Contract Display ID¶
ID: UC-NFS-CNTRCT-D003
Complexity: Intermediate
Description: Retrieve all charges associated with a specific contract display ID through a series of API calls
Scenario: A user needs to find all charges that are associated with a specific contract display ID. This requires searching through lease components, activation groups, units, and charges to build the complete relationship chain.
Business Value: Enables users to quickly identify all charges under a specific contract, which is essential for financial reporting, billing management, and cost analysis.
Prerequisites¶
Valid API key for NFS API
Access to NFS API environment
Valid contract display ID
Understanding of NFS data relationships
Steps¶
1. Search Lease Components by Contract Display ID¶
First, search for lease components associated with the contract display ID
Endpoint: POST /api/v1/lease-components/search
HTTP Request
curl -X POST 'https://{base-url}/api/v1/lease-components/search'
-H 'x-api-key: YOUR_API_KEY'
-H 'Content-Type: application/json'
-d '{
"contractDisplayIdIn": ["CT-100007957"]
}'
Expected Response: HTTP 200 with lease components data
2. Search Activation Groups by Lease Component Display ID¶
Search for activation groups associated with the lease component display ID
Endpoint: POST /api/v1/activation-groups/search
HTTP Request
curl -X POST 'https://{base-url}/api/v1/activation-groups/search'
-H 'x-api-key: YOUR_API_KEY'
-H 'Content-Type: application/json'
-d '{
"leaseComponentDisplayIdIn": ["LC-100006644"]
}'
Expected Response: HTTP 200 with activation groups data
3. Search Units by Activation Group Display ID¶
Search for units associated with the activation group display ID
Endpoint: POST /api/v1/units/search
HTTP Request
curl -X POST 'https://{base-url}/api/v1/units/search'
-H 'x-api-key: YOUR_API_KEY'
-H 'Content-Type: application/json'
-d '{
"activationGroupDisplayIdIn": ["AG-100003627"]
}'
Expected Response: HTTP 200 with units data
4. Search Charges by Unit Display ID¶
Search for charges associated with each unit display ID
Endpoint: POST /api/v1/charges/search
HTTP Request
curl -X POST 'https://{base-url}/api/v1/charges/search'
-H 'x-api-key: YOUR_API_KEY'
-H 'Content-Type: application/json'
-d '{
"unitDisplayIdIn": ["UN-100003750"]
}'
Expected Response: HTTP 200 with charges data
Best Practices¶
Always validate the contract display ID before starting the workflow
Handle empty results gracefully at each step
Implement proper error handling for each API call