Delete Company
This DELETE endpoint removes a company from the system using its unique company ID. Ensure you have adequate permissions to perform this operation.
Endpoint
- URL:
/companies/{company_id} - Method:
DELETE
Path Parameters
| Parameter | Type | Description |
|---|---|---|
company_id | string | The unique identifier of the company to be deleted. |
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
accessToken | string | Access token for authentication. (required) |
Request Body
No request body is needed for this DELETE operation.
Response
- Status Code: 200 OK
Sample Response Body
A successful response will confirm the deletion of the company:
{
"success": true,
"message": "Company deleted successfully"
}
Success Response Body
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates the success status of the request, typically true for a successful operation. |
message | string | A message conveying the outcome of the operation, e.g., "Company deleted Successfully". |
Error Responses
| Status Code | Description |
|---|---|
| 401 Unauthorized | The access token is invalid or missing. |
| 403 Forbidden | The user does not have permission to delete the company. |
| 404 Not Found | No company matches the specified company_id. |
| 500 Internal Server Error | An error occurred on the server. |
Notes
- Ensure the
company_idin the URL is replaced with the actual ID of the company you wish to delete. - Confirm that your access token is valid and has sufficient permissions to execute this operation.
- There is no need to provide a request body since this operation only requires identification through the URL parameters.