Department is a dimension that can be defined by the company and set on transactions to expand report functionality and insight.


List Departments

readByQuery

<readByQuery>
    <object>DEPARTMENT</object>
    <fields>*</fields>
    <query></query>
    <pagesize>100</pagesize>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use DEPARTMENT
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

query

Name Required Type Description
STATUS Optional string Status. Use T for Active and F for Inactive.

Get Department

read

<read>
    <object>DEPARTMENT</object>
    <keys>1</keys>
    <fields>*</fields>
</read>

Parameters

Name Required Type Description
object Required string Use DEPARTMENT
keys Required string Department RECORDNO to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

Get Department by Name

readByName

<readByName>
    <object>DEPARTMENT</object>
    <keys>9ADMIN</keys>
    <fields>*</fields>
</readByName>

Parameters

Name Required Type Description
object Required string Use DEPARTMENT
keys Required string Department DEPARTMENTID to get
fields Optional string Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.

Create Department

create

<create>
    <DEPARTMENT>
        <DEPARTMENTID>FIN</DEPARTMENTID>
        <TITLE>Finance</TITLE>
        <PARENTID></PARENTID>
        <SUPERVISORID></SUPERVISORID>
        <CUSTTITLE></CUSTTITLE>
        <STATUS>active</STATUS>
    </DEPARTMENT>
</create>

Parameters

Name Required Type Description
DEPARTMENT Optional object Object to create

DEPARTMENT

Name Required Type Description
DEPARTMENTID Required string Department ID to create
TITLE Required string Department name
PARENTID Optional string Parent department ID
SUPERVISORID Optional string Manager employee ID
CUSTTITLE Optional string Department title for reporting
STATUS Optional string Department status. Use active for Active otherwise use inactive for Inactive. (Default: active)

Create Department (Legacy)

create_department

<create_department>
    <departmentid>FIN</departmentid>
    <title>Finance</title>
</create_department>

Parameters

Name Required Type Description
departmentid Required string Department ID to create
title Required string Department name
parentid Optional string Parent department ID
supervisorid Optional string Manager employee ID
status Optional string Department status. Use active for Active otherwise use inactive for Inactive. (Default: active)
customfields Optional customfield[0...n] Custom fields
custtitle Optional string Department title for reporting

customfield

Name Required Type Description
customfieldname Optional string Custom field ID
customfieldvalue Optional varies Custom field value. For a multi-pick-list custom field, implode multiple field values with #~#.

Update Department

update

<update>
    <DEPARTMENT>
        <RECORDNO>212</RECORDNO>
        <TITLE>Finance</TITLE>
        <PARENTID></PARENTID>
        <SUPERVISORID></SUPERVISORID>
        <CUSTTITLE></CUSTTITLE>
        <STATUS>active</STATUS>
    </DEPARTMENT>
</update>

Parameters

Name Required Type Description
DEPARTMENT Optional object Object to update

DEPARTMENT

Name Required Type Description
RECORDNO Optional integer Record number of department to update. Required if not using DEPARTMENTID.
DEPARTMENTID Optional string Department ID. Required if not using RECORDNO.
TITLE Optional string Department name
PARENTID Optional string Parent department ID
SUPERVISORID Optional string Manager employee ID
CUSTTITLE Optional string Department title for reporting
STATUS Optional string Department status. Use active for Active otherwise use inactive for Inactive. (Default: active)

Update Department (Legacy)

update_department

<update_department departmentid="FIN">
    <title>Finance and Accounting</title>
</update_department>

Parameters

Name Required Type Description
departmentid Required string Department ID to update
title Optional string Department name
parentid Optional string Parent department ID
supervisorid Optional string Manager employee ID
status Optional string Department status. Use active for Active otherwise use inactive for Inactive. (Default: active)
customfields Optional customfield[0...n] Custom fields
custtitle Optional string Department title for reporting

customfield

Name Required Type Description
customfieldname Optional string Custom field ID
customfieldvalue Optional varies Custom field value. For a multi-pick-list custom field, implode multiple field values with #~#.

Delete Department

delete

<delete>
    <object>DEPARTMENT</object>
    <keys>112</keys>
</delete>

Parameters

Name Required Type Description
object Required string Use DEPARTMENT
keys Required string Department RECORDNO to delete

Delete Department (Legacy)

delete_department

<delete_department departmentid="FIN"></delete_department>

Parameters

Name Required Type Description
departmentid Required string Department ID to delete

Provide feedback