Check Concurrent Offers

Details#

This endpoint verifies if the company specified by companyId has reached the maximum of concurrent offers between two dates

URL : /company/:companyId/hasReachedMaxConcurrentOffersBetweenDates

Method :

GET

Authentication

Auth is required to check concurrent offers as the Company or 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).

publishDate#

Body Parameter
Optional

Default: Now
Date (ISO8601 String)

The start date to consider when calculating the maximum concurrent offers.

publishEndDate#

Body Parameter
Optional

Default: 6 months after publishDate
Date (ISO8601 String)

The end date to consider when calculating the maximum concurrent offers. Must be after publishDate.

Response#

maxOffersReached#

Response Field
Boolean

Informs if the company has reached the maximum amount of concurrent offers between the specified dates.

Request examples#

Example 1 - Valid Request (max concurrent offers reached)#

Code :

200 OK

{
"publishDate": "2022-01-20T00:00:00+01:00",
"publishEndDate": "2022-02-20T00:00:00+01:00"
}

Example 2 - Valid Request (max concurrent offers not reached)#

Code :

200 OK

{
"publishDate": "2022-01-20T00:00:00+01:00"
}

Example 3 - Non-Existing Company#

Code :

422 UNPROCESSABLE ENTITY

/company/431859ea531e53a45a443de0/hasReachedMaxConcurrentOffersBetweenDates

Example 4 - Logged-in as a Different Company#

Code :

403 FORBIDDEN

/company/62601cb7cb39d3001b3664d9/hasReachedMaxConcurrentOffersBetweenDates

Example 5 - publishEndDate before publishDate#

Code :

422 UNPROCESSABLE ENTITY

{
"publishDate": "2022-02-20T00:00:00+01:00",
"publishEndDate": "2022-01-20T00:00:00+01:00"
}