Pingtree

Offer Campaign APIs

Fetch Form Submission API

GEThttps://api.pingtree.com/api/lead/fetch-response/{campaign-id}

Overview#

The Fetch Form Submission API retrieves the stored response data for a previously submitted lead. Use it to look up the distribution outcome, buyer response, deduplication result, or redirect URL associated with a specific transaction_id. This is useful for debugging integrations, auditing lead outcomes, and building confirmation pages that display post-submission results.

Endpoint#

GET /api/lead/fetch/:sourceID

Replace :sourceID with the source unique ID. The transaction_id is passed as a query parameter to identify the specific lead.

Authentication#

Include your API token in the Authorization header:

Authorization: Bearer <your-api-token>

Request Parameters#

Path Parameters#

ParameterTypeRequiredDescription
sourceIDstringYesThe unique ID of the campaign source

Query Parameters#

ParameterTypeRequiredDescription
transaction_idstringYesThe transaction ID of the lead submission to retrieve

Example Request#

Bash
curl -G "https://api.pingtree.com/api/lead/fetch/src_abc123" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  --data-urlencode "transaction_id=txn_7f3a2b1c-4d56-78ef-9012-abcdef123456"

Example Responses#

Success — Lead Response Found#

JSON
{
  "status": 200,
  "message": "Lead response fetched successfully",
  "data": {
    "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
    "leadStatus": "accepted",
    "redirect_url": "https://thank-you.example.com?tid=txn_7f3a2b1c",
    "isDeDupe": false,
    "cid": "cmp_9z8y7x6w",
    "pid": "src_abc123",
    "createdAt": "2025-08-14T10:32:00.000Z"
  }
}

Success — Duplicate Lead#

JSON
{
  "status": 200,
  "message": "Lead response fetched successfully",
  "data": {
    "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
    "leadStatus": "unsold",
    "isDeDupe": true,
    "cid": "cmp_9z8y7x6w",
    "pid": "src_abc123",
    "createdAt": "2025-08-14T10:35:00.000Z"
  }
}

Error — Lead Not Found#

JSON
{
  "status": 400,
  "message": "No lead found for the provided transaction_id",
  "data": {}
}

Error — Unauthorized#

JSON
{
  "status": 401,
  "message": "Unauthorized"
}

Status Codes#

HTTP CodeDescription
200Lead response retrieved successfully
400Invalid or missing transaction_id, or lead not found
401Invalid or missing API token
500Internal server error

Tips#

  • Immediate availability: Response data is available as soon as the lead submission completes. In most cases, you can fetch it within a few milliseconds of the original POST.
  • Debugging submissions: If a landing page integration is not behaving as expected, use this endpoint to confirm what the platform recorded and returned during distribution.
  • Redirect URL delivery: If your form does not capture the redirect_url from the submission response, you can re-fetch it here and redirect the consumer server-side.
  • Deduplication flag: The isDeDupe field lets you determine whether the consumer had previously submitted through this campaign.