About Department
Payable and receivable transactions can be reported into different departments within the business operations. Departments can be synced with accounting software or via a CSV file.
Note: In QuickBooks for Windows, Classes map to Departments in Bill.com.
Xero integration with Bill.com requires the field be named "Department" to sync successfully.
Create
Request
<API_URL_EndPoint>/Crud/Create/Department.json
data={
"obj" : {
"entity" : "Department",
"name" : "Marketing",
"shortName" : "Marketing",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000"
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marketing",
"shortName" : "Marketing",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000",
"createdTime" : "2016-12-11T19:36:46.000+0000",
"updatedTime" : "2016-12-11T19:36:46.000+0000",
"mergedIntoId" : "00000000000000000000"
}
}
Read
Request
<API_URL_EndPoint>/Crud/Read/Department.json
data={
"id" : "0de01WUJOTDQJZBOaztx"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marketing",
"shortName" : "Marketing",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000",
"createdTime" : "2016-12-11T19:36:46.000+0000",
"updatedTime" : "2016-12-11T19:36:46.000+0000",
"mergedIntoId" : "00000000000000000000"
}
}
Update
Request
<API_URL_EndPoint>/Crud/Update/Department.json
data={
"obj" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marketing-Music Instruments",
"shortName" : "Marketing-Music",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000"
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marketing-Music Instruments",
"shortName" : "Marketing-Music",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US..",
"parentDepartmentId" : "00000000000000000000",
"createdTime" : "2016-12-11T19:36:46.000+0000",
"updatedTime" : "2016-12-11T19:41:50.000+0000",
"mergedIntoId" : "00000000000000000000"
}
}
Delete
Once the Department is deleted, it is marked as inactive ["isActive" : "2"
].
Request
<API_URL_EndPoint>/Crud/Delete/Department.json
data={
"id" : "0de01WUJOTDQJZBOaztx"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marekting",
"shortName" : "Marketing",
"isActive" : "2",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000",
"createdTime" : "2016-12-11T19:36:46.000+0000",
"updatedTime" : "2016-12-11T19:39:06.000+0000",
"mergedIntoId" : "00000000000000000000"
}
}
Undelete
Once the Department is deleted, it is marked as active ["isActive" : "1"
].
Request
<API_URL_EndPoint>/Crud/Undelete/Department.json
data={
"id" : "0de01WUJOTDQJZBOaztx"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "Department",
"id" : "0de01WUJOTDQJZBOaztx",
"name" : "Marketing",
"shortName" : "Marketing",
"isActive" : "1",
"description" : "Marketing department for musical instruments sold in US.",
"parentDepartmentId" : "00000000000000000000",
"createdTime" : "2016-12-11T19:36:46.000+0000",
"updatedTime" : "2016-12-11T19:39:06.000+0000",
"mergedIntoId" : "00000000000000000000"
}
}
Resources
Parameters