expand
parameter to include nested objects directly in a single response.
How Expanding Works
By default, API responses include only basic object properties and IDs for related objects. When you use theexpand
parameter, the API replaces these IDs with the full related objects, including all their properties.
Example without expansion:
KYC Endpoints
Update KYC Endpoint
POST/v2/users/{userId}/kyc
When updating KYC information, you can expand related objects to get immediate access to updated data:
ultimateBeneficialOwners
- Include full UBO objectsdocuments
- Include all KYC documentsultimateBeneficialOwners.documents
- Include documents for each UBO
Retrieve KYC Information
GET/v2/users/{userId}/kyc
Retrieve KYC information with expanded related objects:
- Display complete KYC status including UBO details
- Show all associated documents in a single request
- Access nested document information for each UBO
UBO (Ultimate Beneficial Owner) Endpoints
Add a UBO
POST/v2/users/{userId}/kyc/ultimateBeneficialOwners
When adding a new UBO, expand documents to immediately see associated documents:
documents
- Include all documents for the UBO
Update a UBO
PUT/v2/users/{userId}/kyc/ultimateBeneficialOwners/{uboId}
Update UBO information with expanded document details:
Retrieve a UBO
GET/v2/users/{userId}/kyc/ultimateBeneficialOwners/{uboId}
Get specific UBO details with expanded documents:
List all UBOs
GET/v2/users/{userId}/kyc/ultimateBeneficialOwners
Retrieve all UBOs with their associated documents:
Advanced Expansion Techniques
Multiple Properties
Expand multiple properties in a single request by adding multipleexpand[]
parameters:
Multi-Level Expansion
Use dot notation to expand nested relationships across multiple levels:documents
property within each ultimateBeneficialOwner
, giving you:
- Full UBO objects with all their properties
- Complete document objects for each UBO
Combining Expansions
You can combine single-level and multi-level expansions:Best Practices
Performance Considerations
- Only expand what you need - Each expansion adds to response size and processing time
- Use specific expansions - Avoid expanding unnecessary relationships
- Consider response size - Large expansions can impact network performance
Common Use Cases
-
KYC Dashboard Display
-
Document Management
-
Compliance Review
Error Handling
If you try to expand a property that doesn’t exist or isn’t expandable, the API will ignore that expansion and return the response without it. Check the API reference to see which properties support expansion.Not all properties can be expanded. The API reference marks expandable
properties with the “Expandable” label.