Delete Company

Details#

This endpoint deletes the company specified by companyId, its account and all of its offers. Returns the company before being deleted.

URL : /company/:companyId/delete

Method :

POST

danger

This action is dangerous and permanent, there will be no way to recover the company or its offers. Use this with caution

Authentication

Auth is required as a Company to delete it. Otherwise, if in god mode, god_token must be provided.

Parameters#

god_token#

Body Parameter
Optional
String

If set, will use this for validating the usage of god mode (in case no session details are available, i.e., no logged-in user).

Response#

Object

Object representing the company before being deleted.

Request examples#

Example 1 - Valid Request#

Code :

200 OK

/company/431859ea531e53a45a443de0/delete

Example 2 - Logged-in as an Admin#

Code :

401 UNAUTHORIZED

/company/431859ea531e53a45a443de0/delete

Example 3 - Non-Existing Company#

Code :

422 UNPROCESSABLE ENTITY

/company/62601cb7cb39d3001b3664d9/delete

Example 4 - Logged-in as a Different Company#

Code :

403 FORBIDDEN

/company/62601cb7cb39d3001b3664d9/delete