Skip to the page
Sections

Seebait mapping

For the Castle Lite microsite and the BA portal: what each of Seebait's replies becomes on this API, so a port can replace its own matching of Swahili text with a message_key.

Note:

How to use this table

A submission to a Seebait campaign is classified by the function this table is built from. Port your reply handling against it and test with the code sentinels, which give every row below. A reply the function does not recognise is unknown, never a success.

What a port does today

Seebait always answers HTTP 200. The outcome is in body.code, which is only ever 200 or 415, and every kind of rejection is a 415: the reason is only in the Swahili message. So today's frontends match phrases. After the port they read state and message_key, and show message.

Reply to message key

Seebait body.codeHow to tellMeaningstatemessage_keyDefault copy shown
200starts "Hongera"Entered in the drawacceptedenteredUmeingia. Kila la heri!
200"Umejishindia TZS <amount>"Instant win, paid by mobile moneyacceptedinstant_winUmeshinda zawadi ya papo hapo!
415"imeshatumika"Code already redeemed, on any channelrejectedalready_usedNamba hiyo imeshatumika.
415"sio sahihi"Code not validrejectedinvalidNamba hiyo si sahihi. Ikague kisha ujaribu tena.
415"kikomo cha kuwasilisha"The phone's daily limit at Seebaitrejecteddaily_limitUmefikia kikomo cha leo. Jaribu tena kesho.
415"Huwezi kutumia huduma hii"The phone is blockedrejectedblockedNamba hii haiwezi kushiriki kwa sasa.
200a 200 that does not start "Hongera"Unrecognised: never treated as successunknowncheckingTunakagua ushiriki wako. Unaweza kufunga ukurasa huu; matokeo yatapatikana punde.
415a 415 with none of the phrases aboveUnrecognised: never treated as a rejection we can nameunknowncheckingTunakagua ushiriki wako. Unaweza kufunga ukurasa huu; matokeo yatapatikana punde.
no replytimeout, network error, HTTP 5xx, empty or non-JSON bodyNo usable replyunknowncheckingTunakagua ushiriki wako. Unaweza kufunga ukurasa huu; matokeo yatapatikana punde.

What changes for the port

  • No reply is not a failure to show. A timeout, a 5xx or an unrecognised reply becomes state: "unknown" with message_key: "checking": the consumer is told the entry is being checked, and the submission is settled afterwards. It is never reported as success.
  • Do not resend to find out. Each rejection at Seebait costs the phone one of its rationed attempts ("Umebakiza nafasi N"). A retry with the same Idempotency-Key, or the same code and phone, returns the stored submission and makes no second call to Seebait.
  • Instant wins arrive as message_key: "instant_win" with the prize in instant_win. Seebait's own text is under upstream.message.
  • upstream is unstable. It carries Seebait's code and message for support and logs. Never branch on it; that is the matching this port removes.
  • Phones go in as the consumer typed them (+255…, 255… or 0…). The server sends Seebait the local 0… form.
  • The short code that selects the campaign at Seebait is the server's concern. It comes from the campaign the key belongs to; a frontend never sends it.