Saltar al contingut principal
GET

Llistat de reserves

Scope:crm:booking-services.read
https://api.holded.com/api/v2/bookings

Retorna una llista paginada de reserves del teu compte.

Paràmetres

Paràmetres de consulta

start_datestring<date-time>opcional

Filtrar reserves a partir d'aquesta data (ISO 8601)

end_datestring<date-time>opcional

Filtrar reserves fins a aquesta data (ISO 8601)

service_idstringopcional

Filtrar per identificador de servei

sort_fieldstringopcional

Camp pel qual ordenar

"start_time""created_at"
sort_orderstringopcional

Adreça d'ordenació

"asc""desc"
cursorstringopcional

Cursor opac per a la paginació

limitintegeropcional= 50

Nombre d'elements per pàgina

Petició

python
import requests

url = "https://api.holded.com/api/v2/bookings?start_date=2024-01-01T00:00:00+00:00&end_date=2024-12-31T23:59:59+00:00&service_id=value"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "items": [
    {
      "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": "...",
          "currency": "..."
        },
        "total": {
          "amount": "...",
          "currency": "..."
        }
      },
      "space": {
        "id": "507f1f77bcf86cd799439011",
        "name": "string"
      },
      "outcome": {
        "document_id": "string",
        "type": "string",
        "exported_at": "2024-01-15T10:30:00Z"
      },
      "custom_fields": [
        {
          "key": "...",
          "label": "...",
          "type": "...",
          "value": "..."
        }
      ]
    }
  ],
  "cursor": "string",
  "has_more": false
}

Respostes exitoses

200Llistat de reservesapplication/json
object
items[]object[]
idstring

Unique identifier of the booking

start_timestring<date-time>

Start time in ISO 8601 format

end_timestring<date-time>

End time in ISO 8601 format

durationinteger

Duration in seconds

created_atstring<date-time>

Creation timestamp in ISO 8601 format

updated_atstring<date-time> | null

Last update timestamp in ISO 8601 format

statusstring

Booking status

Enum:confirmedcancelled
serviceobject

Service associated with this booking

spaceobject

Space where the booking takes place

outcomeobject | null

Exported document linked to this booking

custom_fields[]object[]

Custom field values associated with the booking

cursorstring | null
has_moreboolean

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json