Elencare le prenotazioni
Senza limit restituisce un array. Con limit (1–100) restituisce {items,total}; offset parte da 0 ed è ignorato senza limit. Non è un cursore di sincronizzazione. Ordine createdAt decrescente. from/to filtrano startAt, non updatedAt. search cerca nome/email cliente. source è api/v1 o il codice del canale/provider (anche per prenotazioni OCTO). Con updatedSince la risposta è {items,nextCursor}, ordinata per updatedAt/id; usa nextCursor fino a null.
/api/v1/bookingsAuthorization
Query
curl "https://api.takoconnect.com/api/v1/bookings" \
-H "Authorization: Bearer $TAKO_API_KEY"[
{
"id": "entity-id",
"tenantId": "tenant-id",
"uuid": "uu-id",
"supplierId": "supplier-id",
"sourceChannelConnectionId": "source-channel-connection-id",
"productId": "product-id",
"optionId": "option-id",
"source": "source",
"externalId": "external-id",
"status": "ON_HOLD",
"startAt": "2030-06-15T08:00:00.000Z",
"endAt": "2030-06-15T08:00:00.000Z",
"expiresAt": "2030-06-15T08:00:00.000Z",
"customer": {},
"notes": "notes",
"cancellationReason": "cancellationReason",
"idempotencyKey": "idempotencyKey",
"pricingSnapshot": {
"schemaVersion": 1,
"pricingPer": "UNIT",
"currency": "EUR",
"currencyPrecision": 0,
"retail": 0,
"unitPricing": [
{
"unitId": "unit-id",
"quantity": 0,
"retail": 0,
"unitRetail": 0,
"name": "name",
"type": "type",
"paxCount": 0
}
]
},
"resourceUsageSnapshot": {
"schemaVersion": 1,
"items": [
{
"resourceId": "resource-id",
"name": "name",
"capacityPlaces": 0,
"resourceQuantity": 0
}
]
},
"participants": {},
"createdAt": "2030-06-15T08:00:00.000Z",
"updatedAt": "2030-06-15T08:00:00.000Z",
"unitItems": [
{
"id": "entity-id",
"bookingId": "booking-id",
"unitId": "unit-id",
"quantity": 0,
"metadata": {}
}
]
}
]Autorizzazione
AuthorizationBearer <token>
Chiave tenant emessa dalla dashboard o da POST /api-keys, usata come Bearer token.
Scope richiesti: bookings:read
In: header
Query
status?enum
ON_HOLDPENDINGCONFIRMEDCANCELLEDREJECTEDEXPIRED
from?datetime
date-time
to?datetime
date-time
supplierId?string
minLength 1
source?string
minLength 1
search?string
minLength 1
updatedSince?datetime
date-time
cursor?string
minLength 1
limit?integer
min 1max 100
offset?integer
min 0
Risposte
200object[] | object | object
Operazione riuscita. Lo schema descrive il JSON restituito.
Mostra schema
Variante 1
itemsobject[]
Mostra proprietà
idstring
tenantIdstring
uuidstring
supplierIdstring
sourceChannelConnectionIdstring | null
productIdstring
optionIdstring
sourcestring
externalIdstring | null
statusenum
ON_HOLDPENDINGCONFIRMEDCANCELLEDREJECTEDEXPIRED
startAtdatetime
date-time
endAtdatetime | null
date-time
expiresAtdatetime | null
date-time
customerany
Valore JSON libero; non usare per dedurre campi strutturati non documentati.
notesstring | null
cancellationReasonstring | null
idempotencyKeystring | null
pricingSnapshotobject | null
Mostra proprietà
schemaVersionenum | enum
pricingPerenum
UNITRESOURCEBOOKING
currencystring
currencyPrecisioninteger
retailinteger
Importo nelle unità minori della valuta: EUR 1250 = 12,50 EUR.
min 0
unitPricingobject[]
resourceUsageSnapshotobject | null
Mostra proprietà
schemaVersionenum
1
itemsobject[]
participantsany
Valore JSON libero; non usare per dedurre campi strutturati non documentati.
createdAtdatetime
date-time
updatedAtdatetime
date-time
unitItemsobject[]
Mostra proprietà
idstring
bookingIdstring
unitIdstring
quantityinteger
metadataany
Valore JSON libero; non usare per dedurre campi strutturati non documentati.
nextCursorstring | null
400object
Validazione o regola di dominio non soddisfatta; correggere la richiesta.
401object
Credenziale assente, revocata, scaduta o non valida.
403object
Scope, ruolo o tipo di credenziale non consentito.
404object
Risorsa assente o non accessibile nel perimetro risolto.
409object
Conflitto di stato, capacità, versione o riferimenti; rileggere lo stato e correggere.
500object
Errore interno. Prima di ripetere una mutazione verificarne l'esito.