v0.9.1

onboarding

Leggere tutte le attività insieme

Per un onboarding multi ancora DRAFT: un onboarding per ogni sito di sites e per ogni nome di fileActivities (letto da files o text), da 1 a 20 in tutto; il primo è questo. Tutti partono con step reading e activities pari al totale, copiano mode, orgType e channels; quelli da file hanno il nome dell'attività nella bozza. Le letture proseguono in background, tre alla volta e un credito AI l'una: ogni onboarding passa a chat con la bozza letta, o a readFailed (anche senza crediti) e si rilegge con extract. Seguire l'avanzamento con GET /api/v1/onboarding/drafts. 409 notMulti, batchStarted o dopo il commit; 422 invalidUrl, nothingToRead, activitiesOutOfRange o filesTooLarge.


https://api.takoconnect.com
POST/api/v1/onboarding/drafts/{id}/batch
Authorization
Path
Body
curl -X POST "https://api.takoconnect.com/api/v1/onboarding/drafts/{id}/batch" \
  -H "Authorization: Bearer $TAKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sites": [
    "sicilysailing.it",
    "etnatrek.it"
  ],
  "fileActivities": [
    "Diving Ustica"
  ],
  "text": "Attività,Prezzo\nDiving Ustica,60"
}'
[
  {
    "id": "entity-id",
    "tenantId": "tenant-id",
    "status": "DRAFT",
    "source": "site",
    "url": "url",
    "step": "step",
    "draft": {
      "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": null,
              "minAge": null,
              "maxAge": null
            }
          ],
          "prices": [
            {
              "type": "ADULT",
              "label": null,
              "amount": null,
              "highAmount": null,
              "maxAge": null
            }
          ],
          "tiers": [
            {
              "maxPax": null,
              "amount": null,
              "highAmount": null
            }
          ],
          "highSeason": {
            "from": "from",
            "to": "to"
          },
          "schedules": [
            {
              "from": null,
              "to": null,
              "weekdays": null,
              "startTimes": null
            }
          ],
          "resourceKeys": [
            "resourceKeys"
          ],
          "sourceUrl": "sourceUrl"
        }
      ],
      "rules": {
        "bookingCutoffHours": 0,
        "freeCancellationHours": 0,
        "instantConfirmation": true,
        "meetingPoint": "meetingPoint"
      },
      "notes": [
        {
          "path": "path",
          "status": "found",
          "quote": "quote",
          "suggestion": "suggestion"
        }
      ]
    },
    "extracted": {
      "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": null,
              "minAge": null,
              "maxAge": null
            }
          ],
          "prices": [
            {
              "type": "ADULT",
              "label": null,
              "amount": null,
              "highAmount": null,
              "maxAge": null
            }
          ],
          "tiers": [
            {
              "maxPax": null,
              "amount": null,
              "highAmount": null
            }
          ],
          "highSeason": {
            "from": "from",
            "to": "to"
          },
          "schedules": [
            {
              "from": null,
              "to": null,
              "weekdays": null,
              "startTimes": null
            }
          ],
          "resourceKeys": [
            "resourceKeys"
          ],
          "sourceUrl": "sourceUrl"
        }
      ],
      "rules": {
        "bookingCutoffHours": 0,
        "freeCancellationHours": 0,
        "instantConfirmation": true,
        "meetingPoint": "meetingPoint"
      },
      "notes": [
        {
          "path": "path",
          "status": "found",
          "quote": "quote",
          "suggestion": "suggestion"
        }
      ]
    },
    "chat": {
      "answers": [
        {
          "path": "path",
          "question": "question",
          "answer": "answer",
          "summary": "summary",
          "applied": true,
          "followUp": {
            "question": "question",
            "suggestions": [
              null
            ]
          }
        }
      ],
      "skipped": [
        "skipped"
      ]
    },
    "channels": [
      "PHONE"
    ],
    "mode": "single",
    "activities": 0,
    "orgType": "AGENCY",
    "feedback": {
      "rating": "EASY",
      "reasons": [
        "questionsUnclear"
      ],
      "text": "text",
      "callMe": true
    },
    "progress": {},
    "createdAt": "2030-06-15T08:00:00.000Z",
    "updatedAt": "2030-06-15T08:00:00.000Z"
  }
]

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

text?string

files?object[]

Mostra proprietà

namestring

mediaTypeenum

application/pdfimage/jpegimage/pngimage/webp

datastring

sitesstring[]

fileActivities?string[]

Risposte

201object[]

Operazione riuscita. Lo schema descrive il JSON restituito.

Mostra schema

idstring

tenantIdstring

statusenum

DRAFTCOMMITTINGDONE

sourceenum

sitetext

urlstring | null

stepstring | null

draftobject | null

Mostra proprietà

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

extractedobject | null

Mostra proprietà

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

chatobject

Mostra proprietà

answersobject[]

Mostra proprietà

pathstring | null

questionstring

answerstring

summarystring

applied?boolean

followUp?object | null

Mostra proprietà

questionstring

minLength 1

suggestionsstring[]

skippedstring[]

channelsenum[]

modeenum | null

singlemulti

activitiesinteger | null

orgTypeenum | null

AGENCYCONSORTIUMRESELLER

feedbackobject | null

Mostra proprietà

ratingenum | null

EASYOKHARD

reasonsenum[]

textstring | null

callMeboolean

progressany | null

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

createdAtdatetime

date-time

updatedAtdatetime

date-time

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.

SuccessivoRispondere a una domanda della chatPOST