Get Units by Contract Display ID

ID: UC-NFS-CNTRCT-D002
Complexity: Intermediate
Description: Retrieve all units associated with a specific contract display ID through a series of API calls
Scenario: A user needs to find all units that are associated with a specific contract display ID. This requires searching through lease components, activation groups, and units to build the complete relationship chain.
Business Value: Enables users to quickly identify all units under a specific contract, which is essential for lease management, reporting, and operational workflows.

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

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