Public API

Conversions

Tell PactReach when a click became a signup, sale, or other event. Idempotency-Key is required so retries do not double-count.

When to use this

PactReach already measures qualified clicks on tracked links. Conversion postbacks are for outcomes that happen on your site or in an ad network after the click: purchases, leads, installs. They do not replace escrow settlement. Settlement still uses verified placements and the campaign pricing model. List stored conversions with GET /brand/:brandId/conversion/fetch-postbacks (read scope). Resolve link codes first via GET /brand/:brandId/tracked-link/fetch-links.

Endpoint

curl -sS -X POST 'https://api.pactreach.com/api/v1/brand/{brandId}/conversion/record-postback' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: pr_live_...' \
  -H 'Idempotency-Key: conv:2026-08-13:order-99102' \
  -d '{
    "eventType": "purchase",
    "clickId": "clk_...",
    "linkCode": "ab12cd",
    "valueMinor": 150000,
    "currency": "NGN",
    "metadata": { "orderId": "99102" }
  }'

Headers

  • X-Api-Key (or Bearer) - any valid key for this brand
  • Idempotency-Key - required, 16-128 characters: letters, digits, dash, underscore, or colon

The same key returns HTTP 200 with replay: true and the existing conversionId. A different body with the same key still returns the first conversion and does not increment link stats again. A key that is already in flight (about 2 minutes) returns a conflict; retry shortly.

Body

FieldRequiredNotes
eventTypeYesYour label, for example purchase, lead, signup.
clickIdNoPactReach click identifier when the partner forwarded it.
linkCodeNoShort code from the tracked URL. Must belong to this brand.
valueMinorNoInteger minor units. Defaults to 0.
currencyNoNGN or USD. Defaults to NGN.
metadataNoOpaque JSON for your own ids. Do not put secrets here.

Attribution

If linkCode matches a tracked link on this brand, PactReach stores campaign and deal ids and increments that link's conversion stats. attributed is true when either a link or a clickId was present. Unknown link codes are stored without attribution rather than rejected, so a mistyped code does not drop the conversion.

Webhook

A new conversion (not a replay) fans out conversion.recorded to endpoints that subscribe to it. Subscribe in webhook registration if your CRM should hear about postbacks too.

Throttling

This route is not IP-throttled. Ad networks may retry. Idempotency-Key is the safety net, not a client-side sleep.

Browser-side events: conversion pixel. Full catalogue: API reference.