V3 API

Authentication

Authentication is performed by including an HTTP header

curl -H "key: {token}" https://v3padel.com/{tenant}/booking.api?id={id}

Errors

The API uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a reservation failed, etc.).

Dates

Dates are always expected and returned in the tenant local time. The date format is ISO 8601. For example:

2022-08-29T10:00:00

Endpoints

Bookings

Book a facility

Method POST

Argument Type Required Description
rate string yes The rate code
start datetime yes The start date of the reservation

Example:

curl -H "key: {token}" https://v3padel.com/{tenant}/book.api \
 -d rate=60m \
 -d start=2022-08-29T10:00:00

Response:

{
    "minutes":60,
    "price":25,
    "ref":"AZ6H3",
    "start":"2022-08-29T10:00:00+02:00",
    "timeout":null
}

Validate a booking

Check if a code corresponds to an active booking at the current time.

Method GET

Argument Type Required Description
code string yes Numeric code included in the confirmation email

Example:

curl -H "key: {token}" https://v3padel.com/{tenant}/validateBooking.api?code=00001

Response

{
    "minutes":60,
    "price":25,
    "ref":"ALCHI",
    "start":"2022-08-29T10:00:00+02:00",
    "timeout":null
}

Errors:

Invalid code

HTTP/2 400 Bad Request
Date: Mon, 29 Aug 2022 18:01:19 GMT
Content-Length: 23
Content-Type: text/plain; charset=utf-8

invalid code. Not found