Skip to main content
POST
/
coa
/
api
/
department
/
bulk-search
Bulk Search Departments by Name
curl --request POST \
  --url https://api.meetcampfire.com/coa/api/department/bulk-search \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "departments": [
    {
      "name": "<string>",
      "parent_id": 123
    }
  ],
  "upsert": false
}'
[
  {
    "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"

Body

departments
object[]
required
Required array length: 1 - 10000 elements
upsert
boolean
default:false

If true, create departments that don't exist

Response

200 - application/json
id
integer
required
parent_name
string
required
tags
object[]
required
last_modified_at
string<date-time>
required
name
string | null
required
Maximum length: 250
created_at
string<date-time>
required
customer
integer
required
code
string | null
Maximum length: 250
active
boolean
parent
integer | null
I