Saltar al contenido principal

Door Events Report

This endpoint provides information about door events and access activities for a specific parking location within a given time period.

Description

The Door Events report helps you track access events such as entries and exits, including RFID access and manual door operations. This is useful for monitoring parking access patterns and security events.

Endpoint

POST /api/v3/business/report/event/door

Authentication

This endpoint requires authentication using a Bearer token.

Headers

KeyValue
AuthorizationBearer Token

Request Parameters

Body

{
"customerId": 2847, // Optional - Customer ID
"refId": "CB6150", // Ref User ID
"from": "2025-06-01T00:00:00.000Z", // Start date and time (UTC)
"until": "2025-06-23T23:59:00.000Z" // End date and time (UTC)
}
ParameterTypeRequiredDescription
customerIdnumberNoCustomer ID for filtering events
refIdstringYesRed User ID for identifying the user
fromstringYesStart date and time in ISO 8601 format (UTC)
untilstringYesEnd date and time in ISO 8601 format (UTC)

Response

The response is an array of door event records.

Success Response (200 OK)

[
{
"id": 653851,
"resultEvent": "Ejecutado",
"createdAt": "2025-06-09T12:03:10.000Z",
"parkingId": 95,
"description": "Ha entrado"
},
{
"id": 657245,
"resultEvent": "Ejecutado",
"createdAt": "2025-06-09T16:52:37.000Z",
"parkingId": 95,
"description": "Salida permitida"
},
{
"id": 690692,
"resultEvent": "Ejecutado",
"createdAt": "2025-06-16T12:06:14.000Z",
"parkingId": 95,
"description": "Ha entrado RFID"
}
]

Response Fields

FieldTypeDescription
idnumberUnique identifier for the door event record
resultEventstringStatus of the event execution (e.g., "Ejecutado")
createdAtstringTimestamp when the event occurred (ISO 8601)
parkingIdnumberID of the parking location where event occurred
descriptionstringDescription of the door event (entry, exit, RFID, etc.)

Example Usage

cURL

curl -X POST \
'{{Url_Base}}/api/v3/business/report/event/door' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"customerId": 2847,
"refId": "CB6150",
"from": "2025-06-01T00:00:00.000Z",
"until": "2025-06-23T23:59:00.000Z"
}'

JavaScript

const response = await fetch('{{Url_Base}}/api/v3/business/report/event/door', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: 2847,
refId: 'CB6150',
from: '2025-06-01T00:00:00.000Z',
until: '2025-06-23T23:59:00.000Z'
})
});

const data = await response.json();

Error Responses

400 Bad Request

{
"error": "Invalid date range or missing required parameters"
}

401 Unauthorized

{
"error": "Invalid or missing authentication token"
}

404 Not Found

{
"error": "User or parking location not found"
}

500 Internal Server Error

{
"error": "Internal server error"
}