Block Company
Details#
This endpoint blocks the company specified by companyId. Also disabled all the company's offers using the same adminReason.
URL : /company/:companyId/block
Method :
PUT
info
This is an action that cannot be reverted by the company. If you're looking for a less serious action, check disable.
Authentication
Auth is required to block a Company as an Admin. 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).
adminReason#
Body Parameter
Required
String
Reason for the admin to block the company. This should only be used for admins, it's not intended to show to the company or the public.
Request examples#
Example 1 - Valid Request (Logged-in as Admin)#
Code :
200 OK
- Request
- Response
Example 2 - Missing Admin Reason#
Code :
422 UNPROCESSABLE ENTITY
- Request
- Response
Example 3 - Logged-in as a Company#
Code :
401 UNAUTHORIZED
- Request
- Response
Example 4 - Non-Existing Company#
Code :
422 UNPROCESSABLE ENTITY
- Request
- Response