FAQ
If the answer isn’t here, write to us: how and where is on the Support page.
Connecting
Section titled “Connecting”Where do I get a test key? Sign up in the Zirva cabinet: test mode opens at once, and you issue the API key aapp_test_…, the event signing secret and the webhook secret yourself under Developers. It’s free. More on the Support page.
How is test different from live? Only by the key: the key sets the mode, the API address is shared, and the modes’ data never mix. See Test and live modes.
Do I need to create a user in advance? No. The first event creates the user, and no progress is lost (U1). POST /v1/users is for when attributes, such as the seller type, are known before the first event.
Can I pass an email or phone number in user_ref? No. user_ref is the user’s internal id on your site: Latin letters, digits and _ . : -, up to 128 characters. We don’t need personal data.
How many requests per second can I send? Up to 50 per client. Over the limit, 429 with a Retry-After header.
Events and progress
Section titled “Events and progress”The event was accepted (202), but there’s no progress. Why? 202 means the event is written; it’s counted in the background, usually within seconds. GET /v1/events/{event_id} shows what happened to it: processed, ignored with the reason in reason, or still accepted. The reasons are covered in the reference under the IgnoreReason schema.
Can I send events out of order or late? Yes. Events are counted by occurred_at; the order of arrival doesn’t matter, and a late event takes its proper place (E8). There’s one limit: occurred_at no more than 5 minutes in the future.
What happens if I send one event twice? A repeat with the same event_id and the same body gets 202 again and changes nothing (E2). With a different body, 409 event_id_conflict.
Why does the user’s status have no scenarios? Possible reasons: the user is in the control group for all their scenarios (group: "control"), isn’t in the audience by attributes, or the scenario’s budget ran out (R6). See Users and the control group and Program rules.
Discounts
Section titled “Discounts”What if Zirva didn’t answer at checkout? Place the order without the discount: checkout must not depend on us. After a failed reserve, send release twice, the second time no sooner than 60 seconds later. See Checkout.
Why did an available discount go back to pending? The purchase the scenario completion relied on was refunded, and a later one took its place whose delay hasn’t passed yet (F3). When the delay passes, reward.available comes again. There’s no need to create a second coupon.
The buyer returned an order in which they used the discount. What happens to the discount? Nothing: a redeemed reward stays redeemed (R3).
Do I need to call redeem if the coupon lives on our side? Yes. Without redeem the pilot reports are wrong, and the discount stays available for the next order.
Webhooks
Section titled “Webhooks”A webhook came twice or out of order. That happens: delivery is at least once, without an order guarantee. Drop duplicates by webhook-id and stale messages by version. See Receiving webhooks.
We can’t accept webhooks. How do we learn about discounts? Poll the GET /v1/rewards/feed feed: it has the same reward messages that go out as webhooks. Take badges from the user status, and public ones from GET /v1/badges.
Our receiver was down for a day. Are the messages lost? We retry every message for 24 hours. After that it counts as undelivered, and at your request the operator sends it again. Reward messages are in the GET /v1/rewards/feed feed in any case.
Reference and versions
Section titled “Reference and versions”What language is the reference in? The master is the Russian contract. The Azerbaijani and English references are translated from it; if the texts differ, the Russian one is correct.
How do I find out what changed in the API? In the changelog. It also has the compatibility rules: what can change without a new path version.