Returns and disputes
Ask for a lead return, or raise a dispute on a call
Needs the returns:write scope. About scopes
A lead return must fall inside the campaign’s return window; one request per lead and per call is open at a time. The account decides in its inbox.
keyheader
AuthorizationBearer <traki_buyer_…>application/json- body
kind*stringValue in
"lead""call"leadId?stringFormat
uuidcallId?stringFormat
uuidreasonKey?stringValue in
"bad_phone""fake""duplicate""out_of_area""never_applied""no_consent""other"reason?stringLength
5 <= length <= 500evidenceUrl?stringFormat
uriLength
length <= 1000Success
application/json- response
id*stringFormat
uuidkind*stringValue in
"lead""call"code*stringstate*stringreason*stringreasonKey*string|nullnote*string|nulllead*|nullcall*|nullcampaign*|nullsource*|nullamount*number|nullcredited*number|nullresolution*string|nullrequestedAt*stringdecidedAt*string|nullwindowClosesAt*string|nullcurl -X POST 'https://api.traki.io/v1/buyer/returns' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: a-unique-id-for-this-change' \ -d '{ "kind": "lead"}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "lead", "code": "string", "state": "string", "reason": "string", "reasonKey": "string", "note": "string", "lead": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string" }, "call": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string" }, "campaign": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "source": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "amount": 0, "credited": 0, "resolution": "string", "requestedAt": "string", "decidedAt": "string", "windowClosesAt": "string"}