Reference API
Všechny adresy API složené přímo ze specifikace OpenAPI. Názvy polí a podrobné popisy jsou anglicky.
Základní adresa je https://ottoai.sk. Každý požadavek posílá Authorization: Bearer <klíč>. Strojově čitelná podoba je v openapi.json.
Account
/api/v1/meOprávnění readKdo jsem: firma, plán, funkce a seznam událostí
Odpověď 200
tenantobjectidstring (uuid)namestring
planstringfeaturesobjectapibooleanwebhooksbooleanwhiteLabelboolean
limitsobjectconversationsPerMonthinteger | null
eventsstring[]
Chyby: 401 403 429
/api/v1/statsOprávnění readPočty a výsledky konverzací v čase
Without parameters: the last 30 days by day in Europe/Bratislava. The range is at most 400 days. resolvedByOtto + unanswered are the conversations Otto handled alone, which the panel shows as solved by Otto.
Parametry
sincequery · string (date-time) nepovinné Created at or after this time.untilquery · string (date-time) nepovinné Created before this time.intervalquery · day | week | month nepovinné Weeks start on Monday.timezonequery · string nepovinné IANA time zone for the series boundaries.
Odpověď 200
conversationsTotalintegerconversationsMonthintegerproductsintegerrangeobjectsincestring (date-time)untilstring (date-time)intervalday | week | monthtimezonestringtotalsobjectconversationsintegerresolvedByOttointegerunansweredintegerhandedOffintegermissedintegerratingUpintegerratingDownintegerleadsintegerreturnsinteger
seriesobject[]datestring (date) First day of the interval in the given time zone.conversationsintegerresolvedByOttointegerunansweredintegerhandedOffintegermissedintegerratingUpintegerratingDowninteger
Chyby: 400 401 403 429
/api/v1/usageOprávnění readSpotřeba odpovědí v tomto měsíci
limit and remaining are null on an unlimited plan.
Odpověď 200
monthstringconversationsintegerlimitinteger | nullremaininginteger | null
Chyby: 401 403 429
Conversations
/api/v1/conversationsOprávnění readSeznam konverzací
Newest activity first. Returns no message text, use GET /api/v1/conversations/{id} for that.
Parametry
statusquery · bot | human | resolved nepovinnéoutcomequery · resolved_by_otto | unanswered | handed_off | missed nepovinnélangquery · string nepovinné Two-letter language code, for example sk, cs or en.sincequery · string (date-time) nepovinné Created at or after this time.untilquery · string (date-time) nepovinné Created before this time.updatedSincequery · string (date-time) nepovinné Changed at or after this time.beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
conversationsConversation[]idstring (uuid)statusbot | human | resolvedoutcomeresolved_by_otto | unanswered | handed_off | missedlangstring | nulltagsstring[]rating1 | -1 | nullcreatedAtstring (date-time)lastAtstring | null (date-time)updatedAtstring (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/conversations/{id}Oprávnění readJedna konverzace i se zprávami
The only endpoint that returns message text. At most 500 messages, oldest first.
Parametry
idpath · string (uuid)
Odpověď 200
conversationConversationDetailidstring (uuid)statusbot | human | resolvedoutcomeresolved_by_otto | unanswered | handed_off | missedlangstring | nulltagsstring[]rating1 | -1 | nullcreatedAtstring (date-time)lastAtstring | null (date-time)
messagesMessage[]roleuser | bot | operatorkindstring | nulltextstringatstring (date-time)
Chyby: 401 403 404 429
/api/v1/conversations/{id}/messagesOprávnění writeOdpovědět zákazníkovi
Sends a message as a colleague, exactly like replying in the panel. The conversation switches to human and Otto stays quiet in it. A customer who is not on the site gets the reply by email.
Parametry
idpath · string (uuid)
Tělo požadavku
textstringoperatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpověď 200
oktruemessageobjectrole"operator"kind"text"textstringauthorstringatstring (date-time)
conversationobjectidstring (uuid)status"human"
Chyby: 400 401 403 404 429
/api/v1/conversations/{id}/notesOprávnění writePřidat interní poznámku
The customer never sees notes.
Parametry
idpath · string (uuid)
Tělo požadavku
textstringoperatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpověď 200
oktruenoteobjectidstringauthorstringtextstringatstring (date-time)
Chyby: 400 401 403 404 429
/api/v1/conversations/{id}/takeoverOprávnění writePřevzít konverzaci
Otto stops answering. Without operatorId the current assignee stays. Sends the conversation.operator_joined event.
Parametry
idpath · string (uuid)
Tělo požadavku
operatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpověď 200
oktrueconversationobjectidstring (uuid)status"human"assigneestring | null (uuid)
Chyby: 400 401 403 404 409 429
/api/v1/conversations/{id}/releaseOprávnění writeVrátit konverzaci Ottovi
Otto answers on its own again and nobody is assigned.
Parametry
idpath · string (uuid)
Odpověď 200
oktrueconversationobjectidstring (uuid)status"bot"assigneenull
Chyby: 401 403 404 409 429
/api/v1/conversations/{id}/resolveOprávnění writeVyřešit konverzaci
Like Resolve in the panel. Sends the conversation.resolved event.
Parametry
idpath · string (uuid)
Odpověď 200
oktrueconversationobjectidstring (uuid)status"resolved"
Chyby: 401 403 404 429
/api/v1/conversations/{id}/reopenOprávnění writeOtevřít vyřešenou konverzaci
The conversation returns to human.
Parametry
idpath · string (uuid)
Odpověď 200
oktrueconversationobjectidstring (uuid)status"human"
Chyby: 401 403 404 429
Leads
/api/v1/leadsOprávnění readKontakty, které zákazníci nechali
Parametry
sincequery · string (date-time) nepovinné Created at or after this time.untilquery · string (date-time) nepovinné Created before this time.beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
leadsLead[]idstring (uuid)conversationIdstring | null (uuid)namestringemailstringphonestringnotestringhandledbooleancreatedAtstring (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/leads/{id}Oprávnění writeOznačit kontakt jako vyřízený
Sends the lead.updated event when the value changes.
Parametry
idpath · string (uuid)
Tělo požadavku
handledboolean
Odpověď 200
oktrueleadobjectidstring (uuid)handledboolean
Chyby: 400 401 403 404 429
Returns
/api/v1/returnsOprávnění readReklamace a vrácení
Parametry
statusquery · new | approved | rejected | resolved nepovinnékindquery · claim | withdrawal nepovinnésincequery · string (date-time) nepovinné Created at or after this time.untilquery · string (date-time) nepovinné Created before this time.updatedSincequery · string (date-time) nepovinné Changed at or after this time.beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
returnsReturn[]idstringkindclaim | withdrawalstatusnew | approved | rejected | resolvedorderIdstringissuestringwantstringnamestringemailstringconversationIdstring | null (uuid)createdAtstring (date-time)decidedAtstring | null (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/returns/{id}Oprávnění writeRozhodnout o reklamaci nebo vrácení
Like the decision in the panel. notify: true emails the customer the decision and your note. Sends the return.updated event.
Parametry
idpath · string
Tělo požadavku
statusnew | approved | rejected | resolvednotestring nepovinnénotifyboolean nepovinné
Odpověď 200
oktruereturnobjectidstringstatusstring
Chyby: 400 401 403 404 429
Unanswered
/api/v1/unansweredOprávnění readOtázky bez jisté odpovědi
Parametry
sincequery · string (date-time) nepovinné Created at or after this time.untilquery · string (date-time) nepovinné Created before this time.beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
unansweredUnanswered[]idstringconversationIdstring | null (uuid)questionstringatstring (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/unanswered/{id}/dismissOprávnění writeSkrýt otázku ze seznamu
Parametry
idpath · string
Odpověď 200
oktrue
Chyby: 401 403 404 429
Catalogue
/api/v1/productsOprávnění readProdukty, které Otto zná
Parametry
beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
productsProduct[]idstringexternalIdstring | nulltitlestringurlstring | nullmetaobjectupdatedAtstring (date-time)
nextBeforestring | null
Chyby: 401 403 429
/api/v1/productsOprávnění cataloguePřidat nebo změnit produkty
Only what you send, nothing is deleted. At most 500 at once. Meant for price and stock changes.
Tělo požadavku
productsProductInput[]idstring Your product id. externalId works too.titlestring name works too.descriptionstring nepovinnéurlstring nepovinnéimagestring nepovinné imageUrl works too.pricenumber nepovinnécurrencystring nepovinnéavailabilitystring nepovinnécategorystring nepovinnémanufacturerstring nepovinnéparamsobject nepovinné
Odpověď 200
oktrueproductsinteger
Chyby: 400 401 403 429
/api/v1/products/snapshotOprávnění catalogueNahradit celý katalog
Products missing from the snapshot are deleted. At most 5000 at once and 12 times per hour. If you send far fewer products than we hold, we delete nothing and add warning with errcode prune_skipped.
Tělo požadavku
productsProductInput[]idstring Your product id. externalId works too.titlestring name works too.descriptionstring nepovinnéurlstring nepovinnéimagestring nepovinné imageUrl works too.pricenumber nepovinnécurrencystring nepovinnéavailabilitystring nepovinnécategorystring nepovinnémanufacturerstring nepovinnéparamsobject nepovinné
Odpověď 200
oktrueproductsintegerremovedintegercurrencystring | null nepovinnéwarningstring nepovinnéerrcode"prune_skipped" nepovinné
Chyby: 400 401 403 429
/api/v1/products/{id}Oprávnění catalogueSmazat jeden produkt
Parametry
idpath · string
Odpověď 200
oktrue
Chyby: 401 403 404 429
Knowledge
/api/v1/knowledgeOprávnění readZnalosti kromě produktů
source faq was added by you, page was read from your website. Only faq records can be deleted.
Parametry
beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
knowledgeKnowledge[]idstringsourcefaq | pagetitlestringcontentstringurlstring | nullupdatedAtstring (date-time)deletableboolean
nextBeforestring | null
Chyby: 401 403 429
/api/v1/knowledgeOprávnění writePřidat znalost
Otto uses it right away.
Tělo požadavku
titlestringcontentstring
Odpověď 200
oktrueidstring
Chyby: 400 401 403 429
/api/v1/knowledge/{id}Oprávnění writeSmazat vlastní znalost
Parametry
idpath · string
Odpověď 200
oktrue
Chyby: 401 403 404 429
Team
/api/v1/operatorsOprávnění readVáš tým
Use id as operatorId in conversation actions.
Odpověď 200
operatorsOperator[]idstring (uuid)namestringemailstringroleowner | operator
Chyby: 401 403 429
Webhooks
/api/v1/webhooks/deliveriesOprávnění webhooksDoručení webhooků
Parametry
statusquery · pending | delivered | failed | cancelled nepovinnéeventquery · string nepovinnébeforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpověď 200
deliveriesDelivery[]idstring (uuid)eventstringstatuspending | delivered | failed | cancelledhttpStatusinteger | nullattemptsintegererrorstring | nullunconfirmedbooleantestbooleancreatedAtstring (date-time)lastAttemptAtstring | null (date-time)nextAttemptAtstring | null (date-time)canResendboolean
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/webhooks/deliveries/{id}/resendOprávnění webhooksPoslat událost znovu
The body is kept 7 days after the last attempt; after that 410.
Parametry
idpath · string (uuid)
Odpověď 202
oktrueidstring (uuid)
Chyby: 401 403 404 409 410 429
/api/v1/webhooks/testOprávnění webhooksPoslat zkušební událost
Delivers right away and tells you how your URL answered.
Odpověď 200
idstring (uuid)statuspending | delivered | failed | cancelledhttpStatusinteger | nullunconfirmedbooleanerrorstring | null
Chyby: 400 401 403 409 429

