Departments List
Retrieve a paginated list of departments configured for your company.
GET
/api/v1/departmentsDescription
Returns departments from Manage Configure. Use the name field when setting tag.department on deployment place-order requests. If a new department name is sent on place-order, it is created automatically.
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <access_token> | Yes |
| Content-Type | application/json | Yes |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | number | No | Page number (1-based). Default is 1. |
| limit | number | No | Records per page. Default is 10. Max 100 on tickets, wallet, and shipping labels. |
| modified_since | string | No | ISO 8601 timestamp; return departments updated on or after this time. |
Response
| Field | Type | Description |
|---|---|---|
| totalDepartments | number | Total matching departments. |
| totalPages | number | Total pages. |
| currentPage | number | Current page. |
| departments | array | Department records. |
| departments[].id | string | Opaque department ID (`{7-digit-prefix}-{numericId}`). |
| departments[].name | string | Department name. Use this value in tag.department on place-order requests (or send a new name to create one). |
| departments[].location | string | Linked location name. |
| departments[].phone_number | string | Formatted phone number. |
| departments[].active | boolean | Whether the department is active (not deleted). |
Notes
- Default page size is 10.
- Use departments[].name as tag.department when placing deployment orders. Unknown department names are created automatically on place-order.
Related Endpoints
Did this page help you?
Request
curl -X GET https://uat.unduit.com/api-exposed/api/v1/departments?page=1&limit=10 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"Success Response
{
"totalDepartments": 2,
"totalPages": 1,
"currentPage": 1,
"departments": [
{
"id": "1276917-5",
"name": "Engineering",
"location": "San Francisco HQ",
"phone_number": "US4155551234",
"active": true
},
{
"id": "6616904-8",
"name": "Finance",
"location": null,
"phone_number": null,
"active": true
}
]
}Error Responses
400 Bad Request
{
"error": "Invalid modified_since timestamp. Use ISO 8601 format."
}