Org department APIs

Add org department

OVERVIEW

Overview

This API call is used to add a new department to an organisation object in the system.

HTTP Request

POST  /api/5/organisations/departments?orgid=<ORGID>

URL Parameters
Parameter Description
ORGID

The ID of the organisation to add the new department to

 

HTTP Request Object

POST http://example.com/context/api/5/organisations/departments?orgid=101

 

XML Request Example

<department>
    <name>IT</name>
</department>

 

JSON Request Example

{
        "name": "IT"
}
 

HTTP Response
Success

HTTP response 200

Error

See API Error messages

XML Success Response (200-Ok)

<?xml version="1.0" encoding="UTF-8" ?>
<department>
    <id>3</id>
    <link>http://example.com/context/api/5/organisations/departments/3</link>
</department>

 

JSON Success Response (200-Ok)

{
    "id": "1037",
    "link": "https://jigneshkd.local.com/jigneshd_4_live/api/5/organisations/departments/1037"
}

 

Error messages

Summary Ref Code (V4) Ref Code (before V4)

The Organisation ID is invalid

260  

This department name already exists

370  

You do not have the permissions to create a department within this organisation

318  

 

Comments


0 Comments

Last Updated: Jun 09,2023