API reference
Org API
8 operations for org. Each one names the scope your API key needs.
Scopes used here: platform.org_unit.read , platform.org_unit.create , platform.org_unit.update , platform.location.read , platform.location.create , platform.location.update
List org units
GET /org-units
Scope: platform.org_unit.read
Parameters
| Name | In | Description |
|---|---|---|
cursor | query | Opaque cursor from a previous response's nextCursor. |
limit | query | Page size, 1-200. Defaults to 50. |
Response 200
| Field | Type | Notes |
|---|---|---|
data | array of object required | |
data[].id | string (uuid) required | |
data[].name | string required | |
data[].kind | string required | |
data[].parentId | string (uuid), nullable required | |
data[].path | string required | |
data[].createdAt | string or string (date-time) required | ISO-8601 timestamp |
nextCursor | string, nullable required | Opaque. Pass back as ?cursor= for the next page; null on the last page. |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/org-units' \
-H 'Authorization: Bearer YOUR_API_KEY' Create an org unit
POST /org-units
Scope: platform.org_unit.create
Headers: Idempotency-Key
(see idempotency)
Request body
| Field | Type | Notes |
|---|---|---|
parentId | string (uuid) | |
name | string required | |
code | string | |
kind | string |
One of: department , team , division |
headEmployeeId | string (uuid) | |
costCentreId | string (uuid) | |
status | string |
One of: active , inactive |
colour | string, nullable |
One of: time , payroll , hiring , talent , helpdesk , reports , settings , me |
Response 201
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
kind | string required | |
parentId | string (uuid), nullable required | |
path | string required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s -X POST 'https://<your-company>.<app-domain>/api/v1/org-units' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: <a unique value>' \
--data '{ … }' Fetch one org unit
GET /org-units/{id}
Scope: platform.org_unit.read
Parameters
| Name | In | Description |
|---|---|---|
id required | path |
Response 200
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
kind | string required | |
parentId | string (uuid), nullable required | |
path | string required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/org-units/<id>' \
-H 'Authorization: Bearer YOUR_API_KEY' Update an org unit. Reparenting is not supported
PATCH /org-units/{id}
Scope: platform.org_unit.update
Parameters
| Name | In | Description |
|---|---|---|
id required | path |
Request body
| Field | Type | Notes |
|---|---|---|
name | string | |
code | string | |
kind | string |
One of: department , team , division |
headEmployeeId | string (uuid) | |
costCentreId | string (uuid) | |
status | string |
One of: active , inactive |
colour | string, nullable |
One of: time , payroll , hiring , talent , helpdesk , reports , settings , me |
Response 200
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
kind | string required | |
parentId | string (uuid), nullable required | |
path | string required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s -X PATCH 'https://<your-company>.<app-domain>/api/v1/org-units/<id>' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{ … }' List locations
GET /locations
Scope: platform.location.read
Parameters
| Name | In | Description |
|---|---|---|
cursor | query | Opaque cursor from a previous response's nextCursor. |
limit | query | Page size, 1-200. Defaults to 50. |
Response 200
| Field | Type | Notes |
|---|---|---|
data | array of object required | |
data[].id | string (uuid) required | |
data[].name | string required | |
data[].stateCode | string required | |
data[].status | string required | |
data[].legalEntityId | string (uuid) required | |
data[].createdAt | string or string (date-time) required | ISO-8601 timestamp |
nextCursor | string, nullable required | Opaque. Pass back as ?cursor= for the next page; null on the last page. |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/locations' \
-H 'Authorization: Bearer YOUR_API_KEY' Create a location
POST /locations
Scope: platform.location.create
Headers: Idempotency-Key
(see idempotency)
Request body
| Field | Type | Notes |
|---|---|---|
legalEntityId | string (uuid) required | |
name | string required | |
code | string required | |
address | object | |
stateCode | string required |
One of: AP , AR , AS , BR , CG , GA , GJ , HR , HP , JH , KA , KL , MP , MH , MN , ML , MZ , NL , OD , PB , RJ , SK , TN , TS , TR , UP , UK , WB , AN , CH , DN , DL , JK , LA , LD , PY |
pincode | string | |
geoLat | number | |
geoLng | number | |
geoRadiusM | integer | |
holidayCalendarId | string (uuid) | |
tz | string | |
status | string |
One of: active , inactive |
Response 201
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
stateCode | string required | |
status | string required | |
legalEntityId | string (uuid) required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s -X POST 'https://<your-company>.<app-domain>/api/v1/locations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: <a unique value>' \
--data '{ … }' Fetch one location
GET /locations/{id}
Scope: platform.location.read
Parameters
| Name | In | Description |
|---|---|---|
id required | path |
Response 200
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
stateCode | string required | |
status | string required | |
legalEntityId | string (uuid) required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s 'https://<your-company>.<app-domain>/api/v1/locations/<id>' \
-H 'Authorization: Bearer YOUR_API_KEY' Update a location
PATCH /locations/{id}
Scope: platform.location.update
Parameters
| Name | In | Description |
|---|---|---|
id required | path |
Request body
| Field | Type | Notes |
|---|---|---|
legalEntityId | string (uuid) | |
name | string | |
code | string | |
address | object | |
stateCode | string |
One of: AP , AR , AS , BR , CG , GA , GJ , HR , HP , JH , KA , KL , MP , MH , MN , ML , MZ , NL , OD , PB , RJ , SK , TN , TS , TR , UP , UK , WB , AN , CH , DN , DL , JK , LA , LD , PY |
pincode | string | |
geoLat | number | |
geoLng | number | |
geoRadiusM | integer | |
holidayCalendarId | string (uuid) | |
tz | string | |
status | string |
One of: active , inactive |
Response 200
| Field | Type | Notes |
|---|---|---|
id | string (uuid) required | |
name | string required | |
stateCode | string required | |
status | string required | |
legalEntityId | string (uuid) required | |
createdAt | string or string (date-time) required | ISO-8601 timestamp |
Errors: 400 · 401 · 403 · 404 · 422 · 429
(error format)
curl -s -X PATCH 'https://<your-company>.<app-domain>/api/v1/locations/<id>' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{ … }'