Skip to content

List departments

Request

This endpoint lists departments of a company.

Security
Bearer
Path
companyIdstring, (uuid)required

Identifier for company.

Example:4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
searchTextstring

Search string entered by the user

Example:"Engineering"
paginationParamsobject(OffsetBasedPaginationRequestParams)required

Pagination information.

filtersArray of objects(ListDepartmentsFilter)

List of filters. Departments matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/departments/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "Engineering",
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "filters": [
      {
        "externalIds": [
          "department-external-id"
        ],
        "departmentIds": [
          "731ccbca-0415-6fe1-d235-c324dfbe7423"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationParamsobject(PaginationResponseParams)required

Pagination information.

departmentsArray of objects(DepartmentInfo)

List of departments containing id and name.

Response
{ "paginationParams": { "totalNumResults": 0 }, "departments": [ { … } ] }