Before you start
You need two things from Telepatia:- An API key with the publisher permission. The key carries
library:notify:<publisher>, for examplelibrary:notify:moc. A key without this permission gets403. A key can notify for one publisher only. - The agreed document id. Every document has one
externalId: your own id for it. Telepatia and you agree on the format of this id once. Telepatia stores it on each document.
Send a notice
Send one request each time a document changes:
A
202 Accepted response means that Telepatia queued the notice:
What Telepatia does
- Telepatia fetches the document from your API.
- When the content is the same as the version that Telepatia serves, nothing changes.
- When the content is different, Telepatia stores it as a new version and prepares it. The current version stays in service until the new version is ready.
- When Telepatia does not have the document yet, Telepatia adds it to the library.
Retries
- A retry with the same
eventIdis safe. Telepatia processes eacheventIdonce. - On
503, retry with the sameeventId. Use a backoff, for example 1, 5 and 30 minutes. - Do not retry on
400,401or403. Fix the request or the key first.