API documentation PUT /leads/{id}
Update a lead
PUT https://demo.trafficmanager.com/api/v1/leads/{id}
Alternative endpoint (GET):
If you need to update only the status and/or the notes, you can use this simpler postback in GET:
If you need to update only the status and/or the notes, you can use this simpler postback in GET:
GET https://postback.trafficman.io/lead/?lead={id}&key={key}&status={status}With optional
¬es={notes}
.
GET Parameters:
-
{id}
: Lead ID or UUID
POST Parameters:
Allowed formats for the request body are x-www-form-urlencoded or raw JSON
key
: your advertiser key. It can be found here.status
: new lead status to apply. It must be one of the following:
STATUS_TRASH STATUS_DOUBLE STATUS_POTENTIAL_DOUBLE STATUS_PENDING STATUS_CONFIRMED STATUS_CANCELED STATUS_CALL_BACK STATUS_SHIPPED STATUS_DELIVERED STATUS_RETURNED STATUS_UNREACHABLE
To make it easier to integrate with all the networks, we support also these common aliases (case-insensitive):'pending', 'new' => 'STATUS_PENDING', 'denied', 'declined', 'wrong', 'expired', 'not interested', 'wrong number', 'canceled', 'cancelled', 'reject', 'rejected', 'fail' => 'STATUS_CANCELED', 'confirmed', 'approved', 'confirm' => 'STATUS_CONFIRMED', 'hold', 'call_later', 'call_later_scheduled', 'no_reply', 'no answer', 'call again', 'expect' => 'STATUS_CALL_BACK', 'double', 'duplicated' => 'STATUS_DOUBLE', 'fake', 'trash' => 'STATUS_TRASH', 'shipped' => 'STATUS_SHIPPED', 'delivered' => 'STATUS_DELIVERED', 'return', 'returned' => 'STATUS_RETURNED', 'unreachable' => 'STATUS_UNREACHABLE',
notes
(optional): call center notes. If you do not want to update the notes, do not send this parameter. Sending an empty value will clear the existing notes.
Each offer may require different data, see each offer for details.
For example, for COD offers the name and phone number are usually required, the other ones are optional (but if they're present it's better to improve the conversion rate, especially the address).
For example, for COD offers the name and phone number are usually required, the other ones are optional (but if they're present it's better to improve the conversion rate, especially the address).
name
: Full namegiven-name
: First name / Given namefamily-name
: Last name / Surname / Family name or equivalenttel
: Full telephone number, with or without country codestreet-address
: Full address. Multiple lines of text are allowed. It may include the city, if the user is shown only a single input.address-level2
: The second administrative level, usually the city/town/village. See MDN for more information.address-level1
: The first administrative level in the address: State, country, province or similar.email
: User email addresspostal-code
: A postal code (ZIP code in the United States)- Product variations Some products can have multiple variations (for example, size, color, quantity...).
In that case, it's required to send the variation code and name as you see in the offer page.
Different variations can have different price for the end user and payout for the affiliate.
Response codes:
200
: Operation completed successfully.400
: Invalid request. One or more required fields are missing or not valid.403
: Invalid key for the given lead.404
: Lead not found.
Returned values:
status
: see Response codes above-
message
: one of the following:Nothing to change
: neither the status nor the notes are changed. No operation has been performed.OK
: the leads status and/or notes have been updated.OK - canceled
: the lead status and/or notes have been updated. Additionally, the corresponding conversion has been queued to be canceled.OK - approved
: the lead status and/or notes have been updated. Additionally, the corresponding conversion has been queued to be approved.OK - restored pending
: the lead status and/or notes have been updated. Additionally, the corresponding conversion has been queued to be restored to pending.
Notes: the lead status and call center notes are updated immediately.
If the lead has a corresponding conversion, since conversions are processed asynchronously, the conversion status is not changed immediately, but the operation is queued instead. (This is to make sure that the conversion will be handled correctly in any case, for example when the lead is very new and the conversion is not yet present)
This means that you can receive
All queued operations are processed within one minute.
If the lead has a corresponding conversion, since conversions are processed asynchronously, the conversion status is not changed immediately, but the operation is queued instead. (This is to make sure that the conversion will be handled correctly in any case, for example when the lead is very new and the conversion is not yet present)
This means that you can receive
OK - canceled
or OK - approved
as response
even if the conversion is already canceled/approved, and in this case the conversion will not change, so the operation is completely safe.All queued operations are processed within one minute.
Response example
Success:{ "status": 200, "message": "OK - canceled" }
{ "status": 200, "message": "Nothing to change" }Error:
{ "status": 403, "message": "Invalid key" }