Skip to main content
Version: 2.2.1

newDepartment

This method enables to edit the data of a department or business unit (if FGDEPTTYPE = 2). For this addition, it is necessary to follow the standard documented below.

Java class
Requestweb\wwwroot\ws\java\admin\NewDepartmentRequestType.java
Returnweb\wwwroot\ws\java\admin\NewDepartmentResponseType.java

Request:

ID #RequiredDescription
IDXDepartment ID #
DESCXDepartment description
IDPOSID # of the default position to be defined in the department
IDUPPERUpper level department ID #
IDCOMPANYID # of the company where the department is defined
FGDEPTTYPEDepartment type:
1 - Department;
2 - Business unit.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:newDepartment>
<!--You may enter the following 6 items in any order-->
<urn:ID>?</urn:ID>
<urn:DESC>?</urn:DESC>
<urn:IDPOS>?</urn:IDPOS>
<urn:IDUPPER>?</urn:IDUPPER>
<urn:IDCOMPANY>?</urn:IDCOMPANY>
<urn:FGDEPTTYPE>?</urn:FGDEPTTYPE>
</urn:newDepartment>
</soapenv:Body>
</soapenv:Envelope>

Return:

ID #Description
ReturnSUCCESS:  Primary key of the department (CDDEPARTMENT)
FAILURE: -1
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
DetailSUCCESS: Record(s) added.
FAILURE: message regarding the error that occurred.
CodeSUCCESS: 1.
FAILURE: Code regarding the error that occurred:
â–ª 16 - Inexistent position.
â–ª 43 - The ID # has no value.
â–ª 45 - The record already exists.
â–ª 53 - Inexistent upper level organizational unit.
â–ª 63 - The DESC field cannot be empty.
â–ª 64 - Inexistent upper level department.