/utilities


GET /durationEstimate

You can estimate the number of hours worked from a surface

Query Parameters

Result

Returns a JSON Object with the following properties

Example

Request :

GET https://dev.tidybear.fr:8443/tidybear/utilities/durationEstimate?surface=40

Response :

{
    "duration": 2.5,
    "surface": 40
}

GET /priceEstimate

You can estimate the price from the number of hours worked

Query Parameters

Result

Returns a JSON Object with the following properties

Examples

Request :

GET https://dev.tidybear.fr:8443/tidybear/utilities/priceEstimate?duration=4

Response :

{
    "duration": 4,
    "price": 8000
}

Request :

GET https://dev.tidybear.fr:8443/tidybear/utilities/priceEstimate?duration=4&discountCode=TIDYCODE&bookingTime=1464101990000

Response :

{
    "duration": 4,
    "price": 6000
}

GET /durationByPartnerEstimate

You can estimate the number of necessary Tidybear partners to make the work

Query Parameters

Result

Returns a JSON Object with the following properties

Example

Request :

GET https://dev.tidybear.fr/tidybear/utilities/durationByPartnerEstimate?duration=6

Response :

{
    "totalDuration": 6,
    "nbPartners": 2,
    "durationByPartner": 3
}

GET /discountValidity

You can know whether a discount code is valid for a specific booking time

Query Parameters

Result

Returns nothing, you need to take a look to the HTTP response code

Example

Request :

GET https://dev.tidybear.fr/tidybear/utilities/discountValidity?discountCode=TIDYCODE&bookingTime=1464103050000

Response :