v0.3.0

options

Leggere opzione, unità, risorse e periodi


https://api.takoconnect.com
GET/api/v1/options/{id}
Authorization
Path
curl "https://api.takoconnect.com/api/v1/options/{id}" \
  -H "Authorization: Bearer $TAKO_API_KEY"
{
  "id": "entity-id",
  "tenantId": "tenant-id",
  "name": "name",
  "reference": "tour-di-esempio",
  "createdAt": "2030-06-15T08:00:00.000Z",
  "updatedAt": "2030-06-15T08:00:00.000Z",
  "productId": "product-id",
  "isDefault": true,
  "durationMinutes": 0,
  "sortOrder": 0,
  "pricingPer": "UNIT",
  "cancellationCutoffAmount": 0,
  "cancellationCutoffUnit": "cancellationCutoffUnit",
  "bookingCutoffMinutes": 0,
  "requiredContactFields": [
    "requiredContactFields"
  ],
  "restrictions": {},
  "metadata": {},
  "units": [
    {
      "id": "entity-id",
      "tenantId": "tenant-id",
      "name": "name",
      "reference": "tour-di-esempio",
      "createdAt": "2030-06-15T08:00:00.000Z",
      "updatedAt": "2030-06-15T08:00:00.000Z",
      "optionId": "option-id",
      "type": "ADULT",
      "requiredContactFields": [
        "requiredContactFields"
      ],
      "restrictions": {},
      "metadata": {},
      "deletedAt": "2030-06-15T08:00:00.000Z"
    }
  ],
  "resourceRequirements": [
    {
      "id": "entity-id",
      "tenantId": "tenant-id",
      "optionId": "option-id",
      "resourceId": "resource-id",
      "quantity": 0,
      "maxQuantity": 0
    }
  ],
  "availabilityPeriods": [
    {
      "id": "entity-id",
      "tenantId": "tenant-id",
      "optionId": "option-id",
      "startMonthDay": "startMonthDay",
      "endMonthDay": "endMonthDay",
      "weekdays": [
        0
      ],
      "startTimes": [
        "startTimes"
      ],
      "label": "label",
      "createdAt": "2030-06-15T08:00:00.000Z",
      "updatedAt": "2030-06-15T08:00:00.000Z",
      "active": true,
      "pricingBasis": "pricingBasis",
      "currency": "EUR",
      "prices": {}
    }
  ],
  "pricingPeriods": [
    {
      "id": "entity-id",
      "tenantId": "tenant-id",
      "optionId": "option-id",
      "startMonthDay": "startMonthDay",
      "endMonthDay": "endMonthDay",
      "weekdays": [
        0
      ],
      "startTimes": [
        "startTimes"
      ],
      "label": "label",
      "createdAt": "2030-06-15T08:00:00.000Z",
      "updatedAt": "2030-06-15T08:00:00.000Z",
      "color": "color",
      "retailPrices": {
        "unit-id": 0
      },
      "retailPriceTiers": [
        {
          "minQuantity": 0,
          "maxQuantity": 0,
          "retail": 0
        }
      ]
    }
  ]
}

Autorizzazione

AuthorizationBearer <token>

Chiave tenant emessa dalla dashboard o da POST /api-keys, usata come Bearer token.

Scope richiesti: catalog:read

In: header

Parametri di percorso

idstring

Risposte

200object

Operazione riuscita. Lo schema descrive il JSON restituito.

Mostra schema

idstring

tenantIdstring

namestring

referencestring

createdAtdatetime

date-time

updatedAtdatetime

date-time

productIdstring

isDefaultboolean

durationMinutesinteger

sortOrderinteger

pricingPerenum | null

UNITRESOURCEBOOKING

cancellationCutoffAmountinteger

cancellationCutoffUnitstring

bookingCutoffMinutesinteger

requiredContactFieldsstring[]

restrictionsany

Valore JSON libero; non usare per dedurre campi strutturati non documentati.

metadataany

Valore JSON libero; non usare per dedurre campi strutturati non documentati.

unitsobject[]

Mostra proprietà

idstring

tenantIdstring

namestring

referencestring

createdAtdatetime

date-time

updatedAtdatetime

date-time

optionIdstring

typeenum

ADULTYOUTHCHILDINFANTFAMILYSENIORSTUDENTMILITARYOTHER

requiredContactFieldsstring[]

restrictionsany

Valore JSON libero; non usare per dedurre campi strutturati non documentati.

metadataany

Valore JSON libero; non usare per dedurre campi strutturati non documentati.

deletedAtdatetime | null

date-time

resourceRequirementsobject[]

Mostra proprietà

idstring

tenantIdstring

optionIdstring

resourceIdstring

quantityinteger

maxQuantityinteger | null

availabilityPeriodsobject[]

Mostra proprietà

idstring

tenantIdstring

optionIdstring

startMonthDaystring

endMonthDaystring

weekdaysinteger[]

startTimesstring[]

labelstring | null

createdAtdatetime

date-time

updatedAtdatetime

date-time

activeboolean

pricingBasisstring

Campo legacy; leggere i prezzi da pricing-periods.

currencystring

Campo legacy; la valuta corrente è tenant.defaultCurrency.

pricesany

Valore JSON libero; non usare per dedurre campi strutturati non documentati.

pricingPeriodsobject[]

Mostra proprietà

idstring

tenantIdstring

optionIdstring

startMonthDaystring

endMonthDaystring

weekdaysinteger[]

startTimesstring[]

labelstring | null

createdAtdatetime

date-time

updatedAtdatetime

date-time

colorstring | null

retailPricesobject

retailPriceTiersobject[] | null

Mostra proprietà

minQuantityinteger

maxQuantityinteger

retailinteger

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

min 0

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.

SuccessivoModificare un'opzionePATCH