Server-side API

Attribute sales to creators on Server-side API — Report from your own backend. No browser, no cookies, no blockers.

Yonto attributes sales to the individual creator who drove them. On Server-side API that works several ways, and the honest summary is that server-side api does most of the work:

Server-side API — primary on this platform
Your backend reports the order to our API with a secret key. The most reliable path, and the most work.
Discount code
The shopper types the creator's code at checkout. Works on every platform and survives a refused cookie, but only catches shoppers who use it.

Setting it up#

Every campaign has its own tracking code. The snippets below use YOUR_TRACKING_CODE as a placeholder — copy the real ones from the campaign's Setup screen, which fills them in for you.

Conversions are reported from: Your order-processing code.

  1. 1
    Create an API key
    Settings → API keys. The secret is shown once and stored only as a hash, so if you lose it you create another rather than recovering it.
  2. 2
    Capture the click id
    The tracked link lands on your site with ?ref=<click_id>. Persist it with the session or the cart so it is still available when the order is placed.
  3. 3
    POST the conversion when the order is paid
    From your backend, never from the browser — the key must not reach a page.
    bash
    curl -X POST https://yontosales.com/api/v0/conversions \
      -H 'Authorization: Bearer yonto_sk_your_key' \
      -H 'Content-Type: application/json' \
      -d '{
        "tracking_code": "YOUR_TRACKING_CODE",
        "order_id": "ORDER-1234",
        "order_value": 49.90,
        "currency": "GBP",
        "click_id": "the ref you captured"
      }'

What this can and cannot see#

Attribution is never complete, on any platform. You are about to pay a creator on the strength of these numbers, so here is exactly what is behind them on Server-side API.

Counted
  • Every order your backend knows about — no cookie, no consent prompt, no ad blocker in the way.
  • Orders from any device, because you hold the click id server-side rather than in a browser.
  • Orders that used the creator's discount code, whatever the shopper's cookie settings.
  • Refunds, if you report them.
Not counted
  • Any order your own code does not tell us about. This path is exactly as complete as your integration.
  • Clicks you failed to persist — if ?ref is dropped at the session boundary, the sale attributes by discount code or not at all.

This is why every figure Yonto reports is described as a confident floor rather than a total. The sales in the right-hand column happened; we simply cannot prove the creator caused them, and we would rather undercount than invent.

Worth knowing#

  • This endpoint is v0 and invite-only while design partners shake it out. It is not yet a stable public contract, and it may change with notice to the people using it.

Making it more accurate#

  • Ask the creator to lead with the discount code. It is the only method that survives a shopper refusing cookies, and it converts better anyway.
  • Report refunds. Server-side API does not tell us when you refund an order, so a refunded sale stays counted unless you reverse it yourself.
  • Use one discount code per campaign. Codes are matched before click ids, and a code shared across campaigns resolves to whichever matches first.