Get Specific Corporate
Retrieves the details of a single corporate: its parent company and its sub-companies.
HTTP Request
- URL:
/corporates/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_WRITE_COMPANY
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | The ID of the corporate (not the parent company ID). Required. |
cURL Example
curl --location '<BASE_URL>/corporates/67bd786f177125410d15d694' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The corporate was returned successfully.
- 400 Bad Request: The access token is missing or invalid, or the corporate ID is not valid.
- 404 Not Found: No corporate matches the ID. The body is
{ "status": false, "message": "Corporate not found", "data": null }, withstatusinstead ofsuccess.
Sample JSON Response
{
"success": true,
"data": {
"_id": "67bd786f177125410d15d694",
"parentCompany": "67bd7732e2c361f0b15a1c18",
"name": "Keystone Holdings",
"active": true,
"subCompanies": [
"64f72a721e63ec3bf06acd65",
"64ae9fbb401a953a2b8988a1"
],
"createdBy": {
"id": "64f0a70c6212cdcbe89a2402",
"name": "ERP integration",
"type": "api"
}
}
}
Response Details
Corporate Data
| Field | Type | Description |
|---|---|---|
_id | String | Unique identifier of the corporate. |
parentCompany | String | ID of the parent company. |
name | String | Name of the corporate. Defaults to the parent company's name. |
active | Boolean | Whether the corporate is active. Default is true. |
subCompanies | Array | IDs of the direct sub-companies. Does not include indirect descendants and does not include access settings. |
createdBy | Object | Who created the corporate (id, name, type). |
Notes
- To find the corporate of a parent company, use Get All Corporates with the
companyfilter. - The access settings of a link (
corporateLinkAccess) can be written but not read through the API. See Corporate Hierarchy and Access.