Delete Corporate
This DELETE endpoint is used to remove a specific corporate record from the system. The request must include the corporate ID in the URL.
Endpoint
- URL:
/api/corporates/:id - Method:
DELETE
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
Content-Type | string | Must be application/json. |
accessToken | string | Access token for authentication. (required) |
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | string | The unique identifier of the corporate entity. | Yes |
Sample Request
DELETE /api/corporates/637e18fc741020de0693227a HTTP/1.1
Host: yourapi.com
Content-Type: application/json
Authorization: Bearer <ACCESS-TOKEN>
Response
- Status Code: 200 OK
Success Response Body
{
"success": true,
"message": "Corporate deleted successfully"
}
Error Responses
| Status Code | Description |
|---|---|
| 400 Bad Request | The request contains invalid data. |
| 401 Unauthorized | The access token is invalid or missing. |
| 404 Not Found | The corporate record with the specified ID was not found. |
| 500 Internal Server Error | An error occurred on the server. |
Notes
- Ensure that a valid
accessTokenis provided in the request header. - The corporate entity and its associated records will be removed from the system.
- This operation is irreversible. Ensure you have the correct corporate ID before proceeding.