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
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Request Body
{
"customer": {
"customerId": 0,
"refId": "string"
},
"parkingId": 0,
"planId": 0,
"start": "string"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer.customerId | number | No | The ID of the customer |
| customer.refId | string | Yes | The reference ID of the customer |
| parkingId | number | Yes | The ID of the parking location |
| planId | number | Yes | The ID of the plan |
| start | string | Yes | The start date and time in ISO 8601 format (UTC+0) |
Response
{
"start_booking": "string",
"end_booking": "string",
"parkingId": 0,
"parkingName": "string",
"reservationId": 0
}
| Field | Type | Description |
|---|---|---|
| start_booking | string | The start date and time of the booking |
| end_booking | string | The end date and time of the booking |
| parkingId | number | The ID of the parking location |
| parkingName | string | The name of the parking location |
| reservationId | number | The 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
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Request Body
{
"customer": {
"id": 0,
"refId": "string"
},
"reservationId": 0
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer.id | number | No | The ID of the customer |
| customer.refId | string | Yes | The reference ID of the customer |
| reservationId | number | Yes | The 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
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Request Body
{
"customerId": 0,
"refId": "string",
"start": "string"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | number | No | The ID of the customer |
| refId | string | Yes | The reference ID of the customer |
| start | string | No | The start date and time in ISO 8601 format |
Response
[
{
"id": 0,
"status": "string",
"parking": {
"id": 0,
"name": "string"
},
"times": {
"start": "string",
"end": "string"
}
}
]
| Field | Type | Description |
|---|---|---|
| id | number | The ID of the booking |
| status | string | The status of the booking |
| parking.id | number | The ID of the parking location |
| parking.name | string | The name of the parking location |
| times.start | string | The start date and time |
| times.end | string | The 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