v0.3.0

bookings

Cancellare una prenotazione e liberare capacità

Imposta CANCELLED. Questa operazione management non applica il cancellation cutoff. Ripetere su CANCELLED o altri stati finali produce 409; dopo un timeout rileggere GET. Nessun rimborso o pagamento viene eseguito.


https://api.takoconnect.com
POST/api/v1/bookings/{id}/cancel
Authorization
Path
curl -X POST "https://api.takoconnect.com/api/v1/bookings/{id}/cancel" \
  -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:write

In: header

Parametri di percorso

idstring

Risposte

201object

Operazione riuscita. Lo schema descrive il JSON restituito.

Mostra schema

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[]

Mostra proprietà

unitIdstring

quantityinteger

retailinteger

Importo nelle unità minori della valuta: EUR 1250 = 12,50 EUR.

min 0

unitRetail?integer

Importo nelle unità minori della valuta: EUR 1250 = 12,50 EUR.

min 0

name?string

type?string

paxCount?integer

resourceUsageSnapshotobject | null

Mostra proprietà

schemaVersionenum

1

itemsobject[]

Mostra proprietà

resourceIdstring

namestring

capacityPlacesinteger

resourceQuantity?integer

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.

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.

SuccessivoElencare i webhook del gestionaleGET