Skip to main content
GET
/
coa
/
api
/
department
List Departments
curl --request GET \
  --url https://api.meetcampfire.com/coa/api/department \
  --header 'Authorization: <api-key>'
{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100",
  "results": [
    {
      "id": 123,
      "parent_name": "<string>",
      "tags": [
        {
          "id": 123,
          "group_name": "<string>",
          "parent_name": "<string>",
          "parent": 123,
          "is_deleted": false,
          "deleted_at": "2023-11-07T05:31:56Z",
          "name": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "last_modified_at": "2023-11-07T05:31:56Z",
          "customer": 123,
          "group": 123
        }
      ],
      "last_modified_at": "2023-11-07T05:31:56Z",
      "code": "<string>",
      "name": "<string>",
      "active": true,
      "created_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "parent": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Query Parameters

include_deleted
boolean
default:false

When set to 'true', returns ONLY deleted records instead of active records. Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp, and 'last_modified_at'. When 'false' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.

include_inactive
boolean
default:true

Include inactive departments in results

last_modified_at__gte
string

Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., '2024-01-01T00:00:00Z' or '2024-01-01'). Works with both active records and deleted records (filters by deletion time for deleted records).

last_modified_at__lte
string

Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., '2024-12-31T23:59:59Z' or '2024-12-31'). Works with both active records and deleted records (filters by deletion time for deleted records).

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

q
string

Search query - searches by department name or code

sort
string
default:name

Sort order. Use field name for ascending, -field for descending. Supports multiple fields separated by comma. Default: name

Response

200 - application/json
count
integer
required
Example:

123

results
object[]
required
next
string<uri> | null
Example:

"http://api.example.org/accounts/?offset=400&limit=100"

previous
string<uri> | null
Example:

"http://api.example.org/accounts/?offset=200&limit=100"

I