Obtenir una reserva per ID
crm:booking-services.readhttps://api.holded.com/api/v2/bookings/{bookingId}Retorna una reserva identificada pel seu ID únic.
Paràmetres
Paràmetres de ruta
stringobligatoriID de la reserva (ObjectId hexadecimal de 24 caràcters)
Petició
import requests
url = "https://api.holded.com/api/v2/bookings/{bookingId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
{
"id": "507f1f77bcf86cd799439011",
"start_time": "2024-01-15T10:30:00+00:00",
"end_time": "2024-01-15T11:30:00+00:00",
"duration": 3600,
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-15T10:30:00Z",
"status": "confirmed",
"service": {
"id": "507f1f77bcf86cd799439011",
"name": "string",
"description": "string",
"duration": 3600,
"subtotal": {
"amount": "50.00",
"currency": "EUR"
},
"total": {
"amount": "60.50",
"currency": "EUR"
}
},
"space": {
"id": "507f1f77bcf86cd799439011",
"name": "string"
},
"outcome": {
"document_id": "string",
"type": "string",
"exported_at": "2024-01-15T10:30:00Z"
},
"custom_fields": [
{
"key": "string",
"label": "string",
"type": "string",
"value": "string"
}
]
}Respostes exitoses
200Reserva trobadaapplication/jsonUnique identifier of the booking
Start time in ISO 8601 format
End time in ISO 8601 format
Duration in seconds
Creation timestamp in ISO 8601 format
Last update timestamp in ISO 8601 format
Booking status
confirmedcancelledService associated with this booking
Unique identifier of the service
Name of the service
Description of the service
Duration in seconds
Price before taxes
Price including taxes
Space where the booking takes place
Unique identifier of the space
Name of the space
Exported document linked to this booking
Identifier of the exported document
Document type
Export timestamp in ISO 8601 format
Custom field values associated with the booking
Custom field key
Custom field label
Custom field type
Custom field value
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Reserva no trobadaapplication/json429Límit de sol·licituds exceditapplication/json