Skip to main content

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​

ParameterTypeDescription
idStringThe 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 }, with status instead of success.

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​

FieldTypeDescription
_idStringUnique identifier of the corporate.
parentCompanyStringID of the parent company.
nameStringName of the corporate. Defaults to the parent company's name.
activeBooleanWhether the corporate is active. Default is true.
subCompaniesArrayIDs of the direct sub-companies. Does not include indirect descendants and does not include access settings.
createdByObjectWho created the corporate (id, name, type).

Notes​