Skip to main content

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

ParameterTypeDescription
company_idstringThe unique identifier of the company to be deleted.

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Request Headers

HeaderTypeDescription
accessTokenstringAccess 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

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true for a successful operation.
messagestringA message conveying the outcome of the operation, e.g., "Company deleted Successfully".

Error Responses

Status CodeDescription
401 UnauthorizedThe access token is invalid or missing.
403 ForbiddenThe user does not have permission to delete the company.
404 Not FoundNo company matches the specified company_id.
500 Internal Server ErrorAn error occurred on the server.

Notes

  • Ensure the company_id in 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.