v0.9.1

onboarding

Leggere sito o descrizione in una bozza

Risposta text/plain in streaming: il JSON della bozza mentre viene scritto (AI SDK useObject). Almeno uno tra url, text e files (max 3 PDF/JPEG/PNG/WebP in base64, 5 MB l'uno); 422 nothingToRead, invalidUrl, o siteUnreachable se il sito non risponde e non c'è altro da leggere. Header X-Onboarding-Site (read, unreachable, none) e X-Onboarding-Pages (pagine lette). A fine stream la bozza, già raggruppata in prodotti, è salvata come draft ed extracted: rileggerla con GET. 409 stillReading mentre la lettura in background di un batch è in corso.


https://api.takoconnect.com
POST/api/v1/onboarding/drafts/{id}/extract
Authorization
Path
Body
curl -X POST "https://api.takoconnect.com/api/v1/onboarding/drafts/{id}/extract" \
  -H "Authorization: Bearer $TAKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "example.com",
  "text": "Tour in barca alle 10:00, 3 ore, 65 € a persona."
}'
{
  "business": {
    "name": "name",
    "city": "city",
    "timezone": "timezone",
    "email": "email",
    "phone": "phone",
    "website": "website"
  },
  "resources": [
    {
      "key": "key",
      "name": "name",
      "kind": "SEATS",
      "quantity": 0,
      "capacity": 0
    }
  ],
  "experiences": [
    {
      "key": "key",
      "name": "name",
      "product": "product",
      "include": true,
      "durationMinutes": 0,
      "pricing": "PERSON",
      "participantTypes": [
        {
          "type": "ADULT",
          "name": "name",
          "minAge": 0,
          "maxAge": 0
        }
      ],
      "prices": [
        {
          "type": "ADULT",
          "label": "label",
          "amount": 0,
          "highAmount": 0,
          "maxAge": 0
        }
      ],
      "tiers": [
        {
          "maxPax": 0,
          "amount": 0,
          "highAmount": 0
        }
      ],
      "highSeason": {
        "from": "from",
        "to": "to"
      },
      "schedules": [
        {
          "from": "from",
          "to": "to",
          "weekdays": [
            0
          ],
          "startTimes": [
            "startTimes"
          ]
        }
      ],
      "resourceKeys": [
        "resourceKeys"
      ],
      "sourceUrl": "sourceUrl"
    }
  ],
  "rules": {
    "bookingCutoffHours": 0,
    "freeCancellationHours": 0,
    "instantConfirmation": true,
    "meetingPoint": "meetingPoint"
  },
  "notes": [
    {
      "path": "path",
      "status": "found",
      "quote": "quote",
      "suggestion": "suggestion"
    }
  ]
}

Autorizzazione

AuthorizationBearer <token>

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

Scope richiesti: suppliers:writecatalog:writeresources:write

In: header

Parametri di percorso

idstring

Body

Content-Type: application/json

url?string

text?string

files?object[]

Mostra proprietà

namestring

mediaTypeenum

application/pdfimage/jpegimage/pngimage/webp

datastring

Risposte

201object

Operazione riuscita. Lo schema descrive il JSON restituito.

Mostra schema

businessobject

Mostra proprietà

namestring | null

citystring | null

timezonestring | null

emailstring | null

phonestring | null

websitestring | null

resourcesobject[]

Mostra proprietà

keystring

minLength 1

namestring

minLength 1

kindenum

SEATSPERSONEQUIPMENT

quantityinteger | null

min 0

capacityinteger | null

min 0

experiencesobject[]

Mostra proprietà

keystring

minLength 1

namestring

minLength 1

productstring | null

includeboolean

durationMinutesinteger | null

min 0

pricingenum

PERSONRESOURCE

participantTypesobject[]

Mostra proprietà

typeenum

ADULTYOUTHCHILDINFANTSENIOROTHER

namestring

minLength 1

minAgeinteger | null

min 0

maxAgeinteger | null

min 0

pricesobject[]

Mostra proprietà

typeenum

ADULTYOUTHCHILDINFANTSENIOROTHER

labelstring

minLength 1

amountnumber

min 0

highAmountnumber | null

min 0

maxAgeinteger | null

min 0

tiersobject[]

Mostra proprietà

maxPaxinteger

min 0

amountnumber

min 0

highAmountnumber | null

min 0

highSeasonobject | null

Mostra proprietà

fromstring

tostring

schedulesobject[]

Mostra proprietà

fromstring | null

tostring | null

weekdaysinteger[] | null

startTimesstring[]

resourceKeysstring[]

sourceUrlstring | null

rulesobject

Mostra proprietà

bookingCutoffHoursinteger | null

min 0

freeCancellationHoursinteger | null

min 0

instantConfirmationboolean | null

meetingPointstring | null

notesobject[]

Mostra proprietà

pathstring

statusenum

foundguessedmissing

quotestring | null

suggestionstring | 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.

413object

Corpo JSON oltre il limite di 15 MB.

500object

Errore interno. Prima di ripetere una mutazione verificarne l'esito.

SuccessivoElencare le attività di un listinoPOST