Departments: Retrieving, Creating, Updating, Archiving, and Unarchiving Department Records via the API

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=1070

Retrieving 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=1

Add 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

FieldDescription
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
scopedepartment
required
fieldsname, email, corporationId, invoiceName, bic
at least 1 required, comma separated values
corporationId1070
required
includeArchived1
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 to
department. It's required to specify the corporationId and name fields.

Insert Department Fields

FieldDescription
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}}
scopedepartment
operationinsert
data.corporationId1461
data.nameTires dep.
data.number44363
data.address1White St.
data.address2Build. 132/3
data.postalCode31231
data.cityBasel
data.countryBelgium
data.officePhone+4433125523
data.emailbasse-tires@bb-tires.com
data.vatNumber66753
data.bankAccount89676471527491
data.parentDepartmentId3792

Update Department

POST

For updating a department, use the POST method with the operation set to update and scope to
department. 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

FieldDescription
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}}
scopedepartment
operationupdate
data.departmentId3123
data.corporationId1461
data.parentDepartmentId3792
data.nameTires dep.
data.number44363
data.address1White st.
data.address2Build. 132/3
data.postalCode31231
data.cityBasel
data.countryBelgium
data.officePhone+4433125523
data.emailbasse-tires@bb-tires.com
data.vatNumber66753
data.bankAccount89676471527491

Archive Department

POST

For archiving a department, use the POST method with the operation set to delete and scope to
department. 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}}
scopedepartment
operationdelete
data.departmentId3794

Unarchive Department

POST

For unarchiving a department, use the POST method with the operation set to update and scope to
department. It's required to specify the departmentId and unArchiveDepartment fields.

Unarchive Department Fields

FieldDescription
unArchiveDepartment
boolean
Boolean value of true. Required

Request Body

key{{api_key}}
scopedepartment
operationupdate
data.departmentId3792
data.unArchiveDepartmenttrue
Was this article helpful?
0 out of 0 found this helpful