Referencia API
Všetky adresy API poskladané priamo zo špecifikácie OpenAPI. Názvy polí a podrobné popisy sú po anglicky.
Základná adresa je https://ottoai.sk. Každá požiadavka posiela Authorization: Bearer <kľúč>. Strojovo čitateľná podoba je v openapi.json.
Account
/api/v1/meKto som: firma, plán, funkcie a zoznam udalostí
Odpoveď 200
tenantobjectidstring (uuid)namestring
planstringfeaturesobjectapibooleanwebhooksbooleanwhiteLabelboolean
limitsobjectconversationsPerMonthinteger | null
eventsstring[]
Chyby: 401 403 429
/api/v1/statsPočty a výsledky konverzácií 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.
Parametre
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.
Odpoveď 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/usageSpotreba odpovedí v tomto mesiaci
limit and remaining are null on an unlimited plan.
Odpoveď 200
monthstringconversationsintegerlimitinteger | nullremaininginteger | null
Chyby: 401 403 429
Conversations
/api/v1/conversationsZoznam konverzácií
Newest activity first. Returns no message text, use GET /api/v1/conversations/{id} for that.
Parametre
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é
Odpoveď 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}Jedna konverzácia aj so správami
The only endpoint that returns message text. At most 500 messages, oldest first.
Parametre
idpath · string (uuid)
Odpoveď 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}/messagesOdpovedať 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.
Parametre
idpath · string (uuid)
Telo požiadavky
textstringoperatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpoveď 200
oktruemessageobjectrole"operator"kind"text"textstringauthorstringatstring (date-time)
conversationobjectidstring (uuid)status"human"
Chyby: 400 401 403 404 429
/api/v1/conversations/{id}/notesPridať internú poznámku
The customer never sees notes.
Parametre
idpath · string (uuid)
Telo požiadavky
textstringoperatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpoveď 200
oktruenoteobjectidstringauthorstringtextstringatstring (date-time)
Chyby: 400 401 403 404 429
/api/v1/conversations/{id}/takeoverPrevziať konverzáciu
Otto stops answering. Without operatorId the current assignee stays. Sends the conversation.operator_joined event.
Parametre
idpath · string (uuid)
Telo požiadavky
operatorIdstring (uuid) nepovinné Team member from GET /api/v1/operators. Without it the author is shown as API.
Odpoveď 200
oktrueconversationobjectidstring (uuid)status"human"assigneestring | null (uuid)
Chyby: 400 401 403 404 409 429
/api/v1/conversations/{id}/releaseVrátiť konverzáciu Ottovi
Otto answers on its own again and nobody is assigned.
Parametre
idpath · string (uuid)
Odpoveď 200
oktrueconversationobjectidstring (uuid)status"bot"assigneenull
Chyby: 401 403 404 409 429
/api/v1/conversations/{id}/resolveVyriešiť konverzáciu
Like Resolve in the panel. Sends the conversation.resolved event.
Parametre
idpath · string (uuid)
Odpoveď 200
oktrueconversationobjectidstring (uuid)status"resolved"
Chyby: 401 403 404 429
/api/v1/conversations/{id}/reopenOtvoriť vyriešenú konverzáciu
The conversation returns to human.
Parametre
idpath · string (uuid)
Odpoveď 200
oktrueconversationobjectidstring (uuid)status"human"
Chyby: 401 403 404 429
Leads
/api/v1/leadsKontakty, ktoré zákazníci nechali
Parametre
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é
Odpoveď 200
leadsLead[]idstring (uuid)conversationIdstring | null (uuid)namestringemailstringphonestringnotestringhandledbooleancreatedAtstring (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/leads/{id}Označiť kontakt ako vybavený
Sends the lead.updated event when the value changes.
Parametre
idpath · string (uuid)
Telo požiadavky
handledboolean
Odpoveď 200
oktrueleadobjectidstring (uuid)handledboolean
Chyby: 400 401 403 404 429
Returns
/api/v1/returnsReklamácie a vrátenia
Parametre
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é
Odpoveď 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}Rozhodnúť o reklamácii alebo vrátení
Like the decision in the panel. notify: true emails the customer the decision and your note. Sends the return.updated event.
Parametre
idpath · string
Telo požiadavky
statusnew | approved | rejected | resolvednotestring nepovinnénotifyboolean nepovinné
Odpoveď 200
oktruereturnobjectidstringstatusstring
Chyby: 400 401 403 404 429
Unanswered
/api/v1/unansweredOtázky bez istej odpovede
Parametre
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é
Odpoveď 200
unansweredUnanswered[]idstringconversationIdstring | null (uuid)questionstringatstring (date-time)
nextBeforestring | null
Chyby: 400 401 403 429
/api/v1/unanswered/{id}/dismissSkryť otázku zo zoznamu
Parametre
idpath · string
Odpoveď 200
oktrue
Chyby: 401 403 404 429
Catalogue
/api/v1/productsProdukty, ktoré Otto pozná
Parametre
beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpoveď 200
productsProduct[]idstringexternalIdstring | nulltitlestringurlstring | nullmetaobjectupdatedAtstring (date-time)
nextBeforestring | null
Chyby: 401 403 429
/api/v1/productsPridať alebo zmeniť produkty
Only what you send, nothing is deleted. At most 500 at once. Meant for price and stock changes.
Telo požiadavky
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é
Odpoveď 200
oktrueproductsinteger
Chyby: 400 401 429
/api/v1/products/snapshotNahradiť celý katalóg
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.
Telo požiadavky
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é
Odpoveď 200
oktrueproductsintegerremovedintegercurrencystring | null nepovinnéwarningstring nepovinnéerrcode"prune_skipped" nepovinné
Chyby: 400 401 429
/api/v1/products/{id}Zmazať jeden produkt
Parametre
idpath · string
Odpoveď 200
oktrue
Chyby: 401 404 429
Knowledge
/api/v1/knowledgeZnalosti okrem produktov
source faq was added by you, page was read from your website. Only faq records can be deleted.
Parametre
beforequery · string nepovinné nextBefore from the previous page. Opaque, do not build it yourself.limitquery · integer nepovinné
Odpoveď 200
knowledgeKnowledge[]idstringsourcefaq | pagetitlestringcontentstringurlstring | nullupdatedAtstring (date-time)deletableboolean
nextBeforestring | null
Chyby: 401 403 429
/api/v1/knowledgePridať znalosť
Otto uses it right away.
Telo požiadavky
titlestringcontentstring
Odpoveď 200
oktrueidstring
Chyby: 400 401 403 429
/api/v1/knowledge/{id}Zmazať vlastnú znalosť
Parametre
idpath · string
Odpoveď 200
oktrue
Chyby: 401 403 404 429
Team
/api/v1/operatorsVáš tím
Use id as operatorId in conversation actions.
Odpoveď 200
operatorsOperator[]idstring (uuid)namestringemailstringroleowner | operator
Chyby: 401 403 429
Webhooks
/api/v1/webhooks/deliveriesDoručenia webhookov
Parametre
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é
Odpoveď 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}/resendPoslať udalosť znova
The body is kept 7 days after the last attempt; after that 410.
Parametre
idpath · string (uuid)
Odpoveď 202
oktrueidstring (uuid)
Chyby: 401 403 404 409 410 429
/api/v1/webhooks/testPoslať skúšobnú udalosť
Delivers right away and tells you how your URL answered.
Odpoveď 200
idstring (uuid)statuspending | delivered | failed | cancelledhttpStatusinteger | nullunconfirmedbooleanerrorstring | null
Chyby: 400 401 403 409 429

