Places vs Available Report
This endpoint provides information about available parking spaces and their status for a specific parking location within a given time period.
Description
The Places vs Available report helps you track the availability status of parking spaces, including information about when spaces are not available and why. This is useful for monitoring parking capacity and identifying patterns in space availability.
Endpoint
POST /api/v3/business/report/available
Authentication
This endpoint requires authentication using a Bearer token.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer Token |
Request Parameters
Body
{
"parkingId": 95, // ID of the parking location
"from": "2025-05-30T04:00:00.000Z", // Start date and time (UTC)
"until": "2025-05-31T03:59:59.999Z" // End date and time (UTC)
}
| Parameter | Type | Description |
|---|---|---|
| parkingId | number | Unique identifier of the parking location |
| from | string | Start date and time in ISO 8601 format (UTC) |
| until | string | End date and time in ISO 8601 format (UTC) |
Response
The response is an array of availability records.
Success Response (200 OK)
[
{
"id": 52734,
"dayisStart": "23/06/2025 07:00",
"dayisEnd": "23/06/2025 21:00",
"start_booking": "2025-06-23T11:00:00.000Z",
"end_booking": "2025-06-24T01:00:13.000Z",
"last_entry_booking": null,
"parkingSuscriptionId": 121,
"email": "email@email.com",
"ParkingName": "Name Parking",
"Amount": 0,
"userId": 2904,
"City": "Santiago",
"Plate": "AAOO90",
"StatusBooking": "Aceptada"
},
]
Response Fields
| Field | Type | Description |
|---|---|---|
| id | number | Unique identifier for the availability record |
| dayisStart | string | Start date and time of the booking period |
| dayisEnd | string | End date and time of the booking period |
| start_booking | string | Start booking timestamp in ISO 8601 format |
| end_booking | string | End booking timestamp in ISO 8601 format |
| last_entry_booking | string | Last entry booking timestamp (can be null) |
| parkingSuscriptionId | number | ID of the parking subscription |
| string | Email address of the user | |
| ParkingName | string | Name of the parking location |
| Amount | number | Amount charged for the booking |
| userId | number | ID of the user associated with the record |
| City | string | City where the parking is located |
| Plate | string | License plate of the vehicle |
| StatusBooking | string | Status of the booking (e.g., "Aceptada") |
Example Usage
cURL
curl -X POST \
'https://api.example.com/api/v3/business/report/available' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"parkingId": 95,
"from": "2025-05-30T04:00:00.000Z",
"until": "2025-05-31T03:59:59.999Z"
}'
JavaScript
const response = await fetch('https://api.example.com/api/v3/business/report/available', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
parkingId: 95,
from: '2025-05-30T04:00:00.000Z',
until: '2025-05-31T03:59:59.999Z'
})
});
const data = await response.json();
Error Responses
400 Bad Request
{
"error": "Invalid date range"
}
401 Unauthorized
{
"error": "Invalid or missing authentication token"
}
404 Not Found
{
"error": "Parking location not found"
}