Get Customer Children
This API is used to retrieve a list of all child customers that are attached to their parent customer. The result set includes a single level of hierarchy.
| HTTP URL | |
|---|---|
| GET | /api/v2/customer/{id}/child-customers |
Eligibility
The Requester is eligible to request and receive a list of own sub-customers. The Requester is not allowed to receive the list of sub-customer’s children.
API Request
This API has no request structure.
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure message. |
| content | Object | O | Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| customerID | String | O | Customer unique identifier (UUID) |
| customerName | String | O | Customer name |
Pageable data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number |
| size | Numeric | M | Page size. Number of requested elements per page |
| totalPages | Numeric | M | Total amount of available pages per requested page size |
| totalElements | Numeric | M | Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
| Code | Message |
|---|---|
| CUSTOMER_1002 | Customer does not exist |
| CUSTOMER_1006 | Failed to retrieve customer details |
| GLOBAL_1001 | Service unavailable. Please try again |
Examples
Request Body
Copy
{
}
Response Body: Success ACK
Copy
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47b5",
"customerName": "Customer A"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"customerName": "Customer B"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f42a7",
"customerName": "Customer C"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47a0",
"customerName": "Customer D"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f44a7",
"customerName": "Customer E"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f45a7",
"customerName": "Customer F"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47c3",
"customerName": "Customer G"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47e2",
"customerName": "Customer H"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47d5",
"customerName": "Customer I"
},
{
"customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f47a4",
"customerName": "Customer J"
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 99,
"totalElements": 988
}
}
Response Body: Failure NAK
Copy
{
"errorCode": "CUSTOMER_1006",
"errorMessage": "Failed to retrieve customer details",
"content": "",
"pageable": ""
}