Get Company Structure
Before you continue reading this steps, make sure you already have client_id and client_secret from request access. But if you don’t have the access, you can make request by read instruction from Request Client.
Information
This end point is used to get organization serial within company
[GET] /ruangkerja/company-structure
Headers
Name | Type | Example | Required | Description |
---|---|---|---|---|
Authorization | string | access_token | YES | Token of authentication. Get from Authentication API |
Accept | string | application/json | YES | Defines the message format that is expected by the client |
Content-Type | string | application/json | YES | Defines the message format of the request body that is sent by the client |
Example cURL Request
curl --location 'https://api.ruangkerja.id/ruangkerja/company-structure' \
--header 'Authorization: access_token'
Example Success Response
{
"data": {
"organizations": [
{
"childOrganizations": [
{
"childOrganizations": [],
"isActive": true,
"name": "Child From Second Organization Name",
"serial": "COMPFJLYTHWL"
}
],
"isActive": true,
"name": "Second Organization Name",
"serial": "COMPCQI9VPAN"
},
{
"childOrganizations": [
{
"childOrganizations": [],
"isActive": true,
"name": "Child Form First Organization Name",
"serial": "COMP1D2TPIVO"
}
],
"isActive": true,
"name": "First Organization Name",
"serial": "COMPLGH5D88B"
}
]
},
"status": "success",
"message": "success"
}
Example Error Response
{
"errorCode": 400,
"message": "BAD_REQUEST",
"detail": "Credentials does not match in our records"
}
See also: Error Dictionary.