palbaseDocs

Palbase IAP · API

POST/iap/offers/{offer_key}/views

Record an offer shown

The app showed the offer to its customer: the first time is counted (GET /iap/offers/stats).

Called by a signed-in user of your app, with their token and the publishable key.

Path

offer_keystring · requiredThe catalog's offer.
curl
curl -X POST "https://<your-ref>.palbase.studio/iap/offers/<offer_key>/views" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN"

Responses

204Counted

400The request is malformed, or a field breaks a rule (the error names which)

401No customer's session (`session_required`): a customer's own is reached with the publishable key and their access token; or the edge refused the key or the token

403The offer is not the customer's to take (`offer_not_open`): it ended or has not started, was taken, or is for an audience they are not in; or the edge refused the key

404The catalog has no such offer (`offer_not_found`)

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation RecordOfferView of iap's contract.