Skip to navigation

Track a lead

View as Markdown

Called by your server when a customer signs up. The Tracking ID names the directory, so one API key reports for each of your directories. A new customer needs the click ID your site kept in its pp_click cookie and becomes a Partner lead for the partner whose link was clicked, awaiting your approval. One customer ID gives one lead per directory: reporting it again, with or without the click, returns it. A lead the pasted script reported, still awaiting approval, moves to this report’s click. Every call is real: try it on a test directory.

curl -X POST https://v1.api.partnerpage.io/api/deal-registration/private/v1alpha/tracking/lead/ \
-H "Authorization: Token $PARTNERPAGE_API_KEY" -H "Content-Type: application/json" \
-d '{"trackingId":"pp_trk_…","clickId":"<pp_click cookie>","customerId":"user_123","email":"jane@example.com","name":"Jane Doe","company":"Acme","eventName":"Sign up"}'

Authentication

AuthorizationToken

Your API key, sent as Authorization: Token <your API key>

Request

This endpoint expects an object.
customerIdstringRequired1-255 characters

Your own ID for the customer; one lead per customer ID.

emailstringRequiredformat: "email"1-80 characters
trackingIdstringRequiredformat: "^pp_trk_[A-Za-z0-9]{24}$"1-40 characters

The directory’s Tracking ID, from Settings › Partner links (pp_trk_…).

clickIdstring or nullOptionalformat: "uuid"

The click ID the script kept in its pp_click cookie. Required for a customer PartnerPage does not know yet.

namestring or nullOptional<=101 characters
companystring or nullOptional<=255 characters
eventNamestringOptional<=255 charactersDefaults to
Your own name for the event, for example Sign up.

Response

A Partner lead already carries this customer ID
idstringformat: "uuid"
customerIdstring
stateenum
  • submitted - Submitted
  • approved - Approved
  • declined - Declined
  • won - Won
  • lost - Lost
Allowed values:
partnerEntryIdstringformat: "uuid"

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error