department

Get Many Departments

Get Many Departments

Securitybearer
Request
query Parameters
select
Array of strings

Select Department fields, comma-separated. (e.g. select=id,firstName,lastName,workEmail)

Items Enum: "id" "companyId" "name" "costCenterId" "effectiveCostCenterId" "parentId"
relations
Array of strings

Select related Department resources, comma-separated. (e.g. relations=office,department)

Items Enum: "costCenter" "effectiveCostCenter"
object

Filters conditions per field. (e.g. filters[id][$eq]=507f1f77bcf86cd799439011)

limit
integer

Limit amount of received Departments. (e.g. limit=20)

offset
integer

Offset amount of received Departments. (e.g. offset=20)

object

Sort received Departments by field. (e.g. sort[id]=asc)

Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal server error

get/department
Response samples
application/json
{
  • "status": "ok",
  • "data": [
    ],
  • "total": 500,
  • "count": 50,
  • "offset": 50,
  • "relations": {
    }
}

Create One Department

Create One Department

Securitybearer
Request
Request Body schema: application/json
required
name
required
string
description
string
costCenterId
string
parentId
string
Responses
201
400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal server error

post/department
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "costCenterId": "string",
  • "parentId": "string"
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Get One Department

Get One Department

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
query Parameters
select
Array of strings

Select Department fields, comma-separated. (e.g. select=id,firstName,lastName,workEmail)

Items Enum: "id" "companyId" "name" "costCenterId" "effectiveCostCenterId" "parentId"
relations
Array of strings

Select related Department resources, comma-separated. (e.g. relations=office,department)

Items Enum: "costCenter" "effectiveCostCenter"
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

get/department/{id}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    },
  • "relations": {
    }
}

Update One Department

Update One Department

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Request Body schema: application/json
required
name
required
string
description
string
costCenterId
string
parentId
string
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

patch/department/{id}
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "costCenterId": "string",
  • "parentId": "string"
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Replace One Department

Replace One Department

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Request Body schema: application/json
required
name
required
string
description
string
costCenterId
string
parentId
string
Responses
200
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

put/department/{id}
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "costCenterId": "string",
  • "parentId": "string"
}
Response samples
application/json
{
  • "status": "ok",
  • "data": {
    }
}

Delete One Department

Delete One Department

Securitybearer
Request
path Parameters
id
required
string

Resource Id

Example: 507f1f77bcf86cd799439011
Responses
204
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

delete/department/{id}
Response samples
application/json
{
  • "status": "ok",
  • "data": { }
}