In this article, you can read about how to retrieve, create, update, archive, and unarchive department records via the API, including all available department fields such as address, bank details, VAT number, and parent department relationships.
Get Departments
GET
https://api.recman.io/v2/get/?key={{api_key}}
&scope=department&fields=name,email,corporationId,invoiceName,bic
&corporationId=1070Retrieving data about departments is done through the GET method. This fetches a list of all departments in your Recman account.
Get Departments — Include Archived
https://api.recman.io/v2/get/?key={{api_key}}
&scope=department&fields=name,email,corporationId,invoiceName,bic
&corporationId=1070&includeArchived=1Add the includeArchived parameter to fetch the department list including archived departments.
Note
When includeArchived is used, each department in the response includes an additional field, isArchived, to indicate whether the department is archived or active.
Department Fields
| Field | Description |
|---|---|
| name string | Department name |
| address1 string | Department address (row 1) |
| address2 string | Department address (row 2) |
| postalCode string | Department postal code |
| city string | Department city |
| country string | Department country |
| bankAccount string | Department bank account |
| officePhone string | Department office phone |
| vatNumber string | Department VAT number |
| email string | Department email |
| logo string | Department logo link |
| parentDepartmentId string | Department's parent department ID |
| number string | Department number |
| corporationId string | Department's corporation ID it's connected to |
| invoiceName string | Department invoice name |
| iban string | Department IBAN |
| bic string | Department BIC |
| invoiceIngress string | Department invoice ingress |
PARAMS
| key | {{api_key}} required |
| scope | department required |
| fields | name, email, corporationId, invoiceName, bic at least 1 required, comma separated values |
| corporationId | 1070 required |
| includeArchived | 1 optional, number |
Insert Department
POST
https://api.recman.io/v2/post/For inserting a department, use the POST method with the operation set to insert and scope todepartment. It's required to specify the corporationId and name fields.
Insert Department Fields
| Field | Description |
|---|---|
| corporationId integer | Corporation ID. Required |
| name string | Name. Min length: 3 characters. Required |
| number numeric | Department number. Optional |
| bankAccount string | Bank account number. Optional |
| address1 string | First address line. Optional |
| address2 string | Second address line. Optional |
| postalCode string | Postal code. Optional |
| city string | City. Optional |
| country string | Country. Optional |
| vatNumber string | VAT number (company no. / department org ID). Optional |
| officePhone string | Office phone number. Optional |
| email string | Email. Must be a valid email address Optional |
| parentDepartmentId integer | Parent department's ID. The parent department must be active and related to the specified corporation. |
Request Body
| key | {{api_key}} |
| scope | department |
| operation | insert |
| data.corporationId | 1461 |
| data.name | Tires dep. |
| data.number | 44363 |
| data.address1 | White St. |
| data.address2 | Build. 132/3 |
| data.postalCode | 31231 |
| data.city | Basel |
| data.country | Belgium |
| data.officePhone | +4433125523 |
| data.email | basse-tires@bb-tires.com |
| data.vatNumber | 66753 |
| data.bankAccount | 89676471527491 |
| data.parentDepartmentId | 3792 |
Update Department
POST
For updating a department, use the POST method with the operation set to update and scope todepartment. It's required to specify the departmentId field.
Note
To clear a field's value, pass an empty string (e.g. "number": ""). To unset parentDepartmentId, pass the value 0.
Note
The corporationId field cannot be unset — only changed. An archived department cannot be updated.
Update Department Fields
| Field | Description |
|---|---|
| corporationId integer | Corporation ID. Optional Note: if parentDepartmentId is set, corporationId is required |
| parentDepartmentId integer | Parent department's ID. The parent department must be active and related to the specified corporation. |
| name string | Name. Min length: 3 characters Optional |
| number numeric | Department number. Optional |
| bankAccount string | Bank account number. Optional |
| address1 string | First address line. Optional |
| address2 string | Second address line. Optional |
| postalCode string | Postal code. Optional |
| city string | City. Optional |
| country string | Country. Optional |
| vatNumber string | VAT number (company no. / department org ID). Optional |
| officePhone string | Office phone number. Optional |
| email string | Email. Must be a valid email address. Optional |
Request Body
| key | {{api_key}} |
| scope | department |
| operation | update |
| data.departmentId | 3123 |
| data.corporationId | 1461 |
| data.parentDepartmentId | 3792 |
| data.name | Tires dep. |
| data.number | 44363 |
| data.address1 | White st. |
| data.address2 | Build. 132/3 |
| data.postalCode | 31231 |
| data.city | Basel |
| data.country | Belgium |
| data.officePhone | +4433125523 |
| data.email | basse-tires@bb-tires.com |
| data.vatNumber | 66753 |
| data.bankAccount | 89676471527491 |
Archive Department
POST
For archiving a department, use the POST method with the operation set to delete and scope todepartment. It's required to specify the departmentId field.
Note
Departments cannot be permanently deleted through the API — they are archived instead, and can be unarchived later.
Request Body
| key | {{api_key}} |
| scope | department |
| operation | delete |
| data.departmentId | 3794 |
Unarchive Department
POST
For unarchiving a department, use the POST method with the operation set to update and scope todepartment. It's required to specify the departmentId and unArchiveDepartment fields.
Unarchive Department Fields
| Field | Description |
|---|---|
| unArchiveDepartment boolean | Boolean value of true. Required |
Request Body
| key | {{api_key}} |
| scope | department |
| operation | update |
| data.departmentId | 3792 |
| data.unArchiveDepartment | true |