Update a Client Sub Organization Type
This endpoint allows modification to the name and description of a specific sub-organization type by providing the sub-organization type ID.
HTTP Method and URL
PUT {{host}}/api/v2/sub-organization/types/:subOrgTypeId?user_type=ENTERPRISE_API
Authentication Requirements
Requires Bearer Token in the 'Authorization' header.
Path and Query Parameters
-
Path Parameter:
- subOrgTypeId (required): The ID of the sub-organization type to update (e.g., 1)
-
Query Parameter:
- user_type (required): Set to 'ENTERPRISE_API'
Request Body
Content-Type: multipart/form-data
-
name (string, required): New name for the sub-organization type (e.g., 'Tech', 'Human Resources')
-
description (string, optional): New description for the sub-organization type (e.g., 'The Technology Department')
Example Request
PUT {{host}}/api/v2/sub-organization/types/1?user_type=ENTERPRISE_API
Headers:
Authorization: Bearer {{user-token}}
Content-Type: multipart/form-data
Body:
name=Tech
description=The Technology Department
Example Successful Response
Status: 200 OK
{
"id": 1,
"name": "Tech",
"description": "The Technology Department",
"updated_at": "2024-06-01T12:00:00Z"
}
Error Responses
-
400 Bad Request: Invalid input or missing required fields.
-
401 Unauthorized: Missing or invalid authentication token.
-
404 Not Found: Sub-organization type not found.
-
409 Conflict: Sub-organization type name already exists.
Usage Notes
-
The 'name' field must be unique among sub-organization types.
-
Only users with appropriate permissions can update sub-organization types.
-
Refer to saved examples for variations in request and response payloads.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
