Saltar al contenido principal

Booking API

The Booking API provides endpoints for managing parking reservations and bookings.

Create Booking

Creates a new booking for a specific parking location.

Endpoint

POST /api/v3/business/booking/create

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Request Body

{
"customer": {
"customerId": 0,
"refId": "string"
},
"parkingId": 0,
"planId": 0,
"start": "string"
}
ParameterTypeRequiredDescription
customer.customerIdnumberNoThe ID of the customer
customer.refIdstringYesThe reference ID of the customer
parkingIdnumberYesThe ID of the parking location
planIdnumberYesThe ID of the plan
startstringYesThe start date and time in ISO 8601 format (UTC+0)

Response

{
"start_booking": "string",
"end_booking": "string",
"parkingId": 0,
"parkingName": "string",
"reservationId": 0
}
FieldTypeDescription
start_bookingstringThe start date and time of the booking
end_bookingstringThe end date and time of the booking
parkingIdnumberThe ID of the parking location
parkingNamestringThe name of the parking location
reservationIdnumberThe ID of the created reservation

Example

curl -X POST \
'https://api.parkup.cl/api/v3/business/booking/create' \
-H 'Authorization: Bearer \{your_access_token\}' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"refId": "AAAABBB0001"
},
"parkingId": 1,
"planId": 1,
"start": "2025-02-19T14:15:00.000Z"
}'

Cancel Booking

Cancels an existing booking.

Endpoint

PUT /api/v3/business/booking/cancel

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Request Body

{
"customer": {
"id": 0,
"refId": "string"
},
"reservationId": 0
}
ParameterTypeRequiredDescription
customer.idnumberNoThe ID of the customer
customer.refIdstringYesThe reference ID of the customer
reservationIdnumberYesThe ID of the reservation to cancel

Response

{
"process": "ok"
}

Example

curl -X PUT \
'https://api.parkup.cl/api/v3/business/booking/cancel' \
-H 'Authorization: Bearer \{your_access_token\}' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"refId": "AAAABBB0001"
},
"reservationId": 1
}'

Get Booking List

Retrieves a list of bookings for a customer.

Endpoint

POST /api/v3/business/booking/list

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Request Body

{
"customerId": 0,
"refId": "string",
"start": "string"
}
ParameterTypeRequiredDescription
customerIdnumberNoThe ID of the customer
refIdstringYesThe reference ID of the customer
startstringNoThe start date and time in ISO 8601 format

Response

[
{
"id": 0,
"status": "string",
"parking": {
"id": 0,
"name": "string"
},
"times": {
"start": "string",
"end": "string"
}
}
]
FieldTypeDescription
idnumberThe ID of the booking
statusstringThe status of the booking
parking.idnumberThe ID of the parking location
parking.namestringThe name of the parking location
times.startstringThe start date and time
times.endstringThe end date and time

Example

curl -X POST \
'https://api.parkup.cl/api/v3/business/booking/list' \
-H 'Authorization: Bearer \{your_access_token\}' \
-H 'Content-Type: application/json' \
-d '{
"refId": "AAAABBB0001",
"start": "2025-02-18T00:00:00.000Z"
}'

Error Responses

401 Unauthorized

{
"statusCode": 401,
"message": "Unauthorized"
}

409 Conflict

{
"statusCode": 409,
"message": "Ya tiene reservas en fecha o hora seleccionada",
"error": "Conflict"
}

This error occurs when:

  • There are existing bookings for the selected date/time
  • The booking with the specified ID was not found