Skip to main content

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

HeaderTypeDescription
Content-TypestringMust be application/json.
accessTokenstringAccess token for authentication. (required)

Path Parameters

ParameterTypeDescriptionRequired
idstringThe 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 CodeDescription
400 Bad RequestThe request contains invalid data.
401 UnauthorizedThe access token is invalid or missing.
404 Not FoundThe corporate record with the specified ID was not found.
500 Internal Server ErrorAn error occurred on the server.

Notes

  • Ensure that a valid accessToken is 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.