Archive Offer

Details#

This endpoint archives the offer specified by offerId. Archiving an offer is basically deactivating it forever, it should not be active again. This action can be compared to a soft delete, the offer is kept for history purposes.

URL : /offers/:offerId/archive

Method :

PUT

danger

This action is currently irreversible. Use it with caution and make sure your users understand the consequences.

Authentication

Auth is required to hide an Offer as a Company or Admin. Otherwise, if in god mode, god_token must be provided. If the offer was disabled by an admin, then the company cannot enable it.

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).

Request examples#

Example 1 - Valid Request#

Code :

200 OK

/offers/62601cb7cb39d3001b3664d9/archive

Example 2 - Non-Existing Offer#

Code :

422 UNPROCESSABLE ENTITY

/offers/62601cb7cb39d3001b3664d9/archive

Example 3 - Disabled Company#

Code :

403 FORBIDDEN

/offers/62601cb7cb39d3001b3664d9/archive

Example 4 - Logged-in as a Different Company#

Code :

403 FORBIDDEN

/offers/62601cb7cb39d3001b3664d9/archive