The import API can be used to import data into Tycka. It’s generally used upon account setup and initial migration.

The request payloads consists of commands and JSON object. Each command set the type of entity to be imported, while each following JSON-object are the entities to be imported. A single request may contain multiple types of entities.

<aside> 💡 Note that the JSON-objects are new line delimited. That means each entity must be put on a single line.

</aside>

POST <https://api.tycka.io/>{{YOUR ACCOUNT ID}}/import
Tycka-Key: {{YOUR PRIVATE KEY}}

:items
{ id: "my_item", name: "Green Jacket", customFields: { color: "Green" }, imageUrls: ["<https://example.com/image.jpg>"] }
{ id: "my_other_item", name: "Blue Jacket", customFields: { color: "Blue" }, imageUrls: ["<https://example.com/image2.jpg>"] }

:author
{ AuthorId: "author1", name: "Christopher", email: "[email protected]" }

:review
{ id: "1", customFields: { productRating: { value: 0.6, comment: "Super good!"}}, language: "en", authorId: "authro1", itemId: "my_item"}

In the example i have put the items and authors before the reviews since it feels more natural, as the review has a reference to the item and the author. But this is no requirement, the system will not block you from sending in the review before the author or the item is created. When all the data is available it will become publicly available (if published). Reviews where the item or author is missing, will not get published.