(POST) Create Department API 


This API Endpoint will allow a customer to create a new department in an existing business. The new department will be added to the hierarchy of the business. 



There are two non-production environments that can be used for testing.


Mandatory Fields are denoted by *




Content-Type = application/json


This is required for authentication. If you do not have your API key please contact PDS Support (support@pdsglobal.com).


Primary key of the group where you want to create a new department. You can use the groupId that is in the response of (GET) Area Details API.


Object: CreateDepartment

name* - string(50)
The name of the department. The name must be unique in the hierarchy at the group level.

functionalLocation - string(50) 

A functional location can be added to reference the group to external software like SAP. This is just free text, not a link.


After sending through your data, the API call will return a response entity with a body and a status. The response entity will let you know if the data you sent through was successful or unsuccessful.


200 - HTTP Response OK
       - DepartmentId:XXX

400 - HTTP Response Bad Request
       -  Missing API Key
       - groupId parameter is not provided
       - Invalid groupId
       - name is not provided on the json request body
       - Department name is already existing on groupIid:XXX

403 - HTTP Response Forbidden
       - Invalid/Incorrect API Key
       - Non “API User” role.

500 - HTTP Response Internal Server Error


Object: ResponseEntity
The ResponseEntity object will contain a string or object value. This will have an error or success message – examples below:

- Successfully created Department and the departmentId will be the response.
- Invalid Security Token.
- Invalid/Incorrect API Key.
- Missing Content-Type header.
- Error connecting to PDS Server.
- groupId parameter is not provided.
- Invalid  groupId.
- name is not provided on the json request body.
- Department name is already existing on  groupId:XXX.


Example URL:

Request Example Body

{"name":"Test 1 Department", 

"functionalLocation":"Test 1 Department functional location" 


Successful Response Example Body:

  "departmentId":  45


prev next
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

prev next

Related sections