Get Many Departments
Bad Request
Unauthorized
Forbidden
Internal server error
curl --request GET \ --url 'https://api.alexishr.com/v1/department?select=SOME_ARRAY_VALUE&relations=SOME_ARRAY_VALUE&filters=SOME_OBJECT_VALUE&limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&sort=SOME_OBJECT_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "status": "ok",
- "data": [
- {
- "id": "507f1f77bcf86cd799439011",
- "companyId": "507f1f77bcf86cd799439011",
- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "effectiveCostCenterId": "string",
- "parentId": "string"
}
], - "total": 500,
- "count": 50,
- "offset": 50,
- "relations": {
- "costCenter": [
- {
- "id": "string",
- "companyId": "507f1f77bcf86cd799439011",
- "code": "string",
- "name": "string"
}
], - "effectiveCostCenter": [
- {
- "id": "string",
- "companyId": "507f1f77bcf86cd799439011",
- "code": "string",
- "name": "string"
}
]
}
}Create One Department
Bad Request
Unauthorized
Forbidden
Internal server error
{- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "parentId": "string"
}{- "status": "ok",
- "data": {
- "id": "507f1f77bcf86cd799439011",
- "companyId": "507f1f77bcf86cd799439011",
- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "effectiveCostCenterId": "string",
- "parentId": "string"
}
}Get One Department
Bad Request
Unauthorized
Forbidden
Not Found
Internal server error
curl --request GET \ --url 'https://api.alexishr.com/v1/department/507f1f77bcf86cd799439011?select=SOME_ARRAY_VALUE&relations=SOME_ARRAY_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "status": "ok",
- "data": {
- "id": "507f1f77bcf86cd799439011",
- "companyId": "507f1f77bcf86cd799439011",
- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "effectiveCostCenterId": "string",
- "parentId": "string"
}, - "relations": {
- "costCenter": [
- {
- "id": "string",
- "companyId": "507f1f77bcf86cd799439011",
- "code": "string",
- "name": "string"
}
], - "effectiveCostCenter": [
- {
- "id": "string",
- "companyId": "507f1f77bcf86cd799439011",
- "code": "string",
- "name": "string"
}
]
}
}Update One Department
Bad Request
Unauthorized
Forbidden
Not Found
Internal server error
{- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "parentId": "string"
}{- "status": "ok",
- "data": {
- "id": "507f1f77bcf86cd799439011",
- "companyId": "507f1f77bcf86cd799439011",
- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "effectiveCostCenterId": "string",
- "parentId": "string"
}
}Replace One Department
Bad Request
Unauthorized
Forbidden
Not Found
Internal server error
{- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "parentId": "string"
}{- "status": "ok",
- "data": {
- "id": "507f1f77bcf86cd799439011",
- "companyId": "507f1f77bcf86cd799439011",
- "name": "string",
- "description": "string",
- "costCenterId": "string",
- "effectiveCostCenterId": "string",
- "parentId": "string"
}
}Delete One Department
Bad Request
Unauthorized
Forbidden
Not Found
Internal server error
curl --request DELETE \ --url https://api.alexishr.com/v1/department/507f1f77bcf86cd799439011 \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "status": "ok",
- "data": { }
}