> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pingtree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Click Listing API

> The Click Listing API retrieves click listing data or offers linked to leads. This is particularly useful for showcasing available offers or tracking user interactions with campaigns.

## Overview

The Click Listing API retrieves the set of offers (click listings) associated with a consumer's lead submission. It is called after a lead has been accepted and returns a list of offers the consumer can click on, typically displayed on a results or thank-you page. Each offer includes a click-redirect URL, branding, and call-to-action details.

This endpoint powers the offer wall that consumers see after form submission. It can be called directly from JavaScript or consumed server-side to build a custom offer display.

## Endpoint

```
GET /api/click/list/{cid}/{transaction_id}
```

| Segment            | Description                                          |
| ------------------ | ---------------------------------------------------- |
| `{cid}`            | The campaign unique ID                               |
| `{transaction_id}` | The transaction ID returned from the lead submission |

## Authentication

No token-based authentication is required. The `cid` and `transaction_id` pair authenticates the request by scope.

## Request Parameters

### Path Parameters

| Parameter        | Type   | Required | Description                                      |
| ---------------- | ------ | -------- | ------------------------------------------------ |
| `cid`            | string | Yes      | Campaign unique ID                               |
| `transaction_id` | string | Yes      | Transaction ID from the lead submission response |

### Query Parameters

| Parameter | Type   | Required | Description                                 |
| --------- | ------ | -------- | ------------------------------------------- |
| `pid`     | string | No       | Source unique ID for attribution tracking   |
| `device`  | string | No       | Consumer device type: `desktop` or `mobile` |

## Example Request

```bash theme={null}
curl "https://api.pingtree.com/api/click/list/cmp_9z8y7x6w/txn_7f3a2b1c-4d56-78ef-9012-abcdef123456"
```

## Example Response

```json theme={null}
{
  "status": 200,
  "message": "Click listing retrieved successfully",
  "data": {
    "offers": [
      {
        "clickListingId": "cl_001",
        "title": "Get Your Free Debt Quote",
        "description": "See offers from top-rated lenders in minutes.",
        "logoUrl": "https://cdn.example.com/logos/lender-a.png",
        "clickUrl": "https://api.pingtree.com/api/click/cl_001/cmp_9z8y7x6w/src_abc123/txn_7f3a2b1c",
        "callToAction": "Check My Rate",
        "displayOrder": 1,
        "device": "both"
      },
      {
        "clickListingId": "cl_002",
        "title": "Compare Loan Options",
        "description": "Match with lenders who fund within 24 hours.",
        "logoUrl": "https://cdn.example.com/logos/lender-b.png",
        "clickUrl": "https://api.pingtree.com/api/click/cl_002/cmp_9z8y7x6w/src_abc123/txn_7f3a2b1c",
        "callToAction": "View Offers",
        "displayOrder": 2,
        "device": "both"
      }
    ],
    "totalOffers": 2
  }
}
```

### Response — No Offers Available

```json theme={null}
{
  "status": 200,
  "message": "No offers available for this lead",
  "data": {
    "offers": [],
    "totalOffers": 0
  }
}
```

### Error — Invalid Transaction ID

```json theme={null}
{
  "status": 400,
  "message": "Invalid or expired transaction_id"
}
```

## Click Redirect URL Structure

Each offer's `clickUrl` follows this pattern:

```
GET /api/click/{clickListingId}/{cid}/{pid}/{transactionId}
```

When the consumer clicks an offer link, this URL records the click event and redirects to the advertiser's landing page. The redirect URL is resolved based on the offer configuration and the consumer's device type.

## Status Codes

| HTTP Code | Description                        |
| --------- | ---------------------------------- |
| 200       | Offer list returned (may be empty) |
| 400       | Invalid `cid` or `transaction_id`  |
| 500       | Internal server error              |

## Tips

* **Call after lead submission.** The click listing is populated once a lead is accepted. Call this endpoint immediately after receiving a successful submission response.
* **Device targeting.** Pass the `device` parameter (`desktop` or `mobile`) to receive only offers configured for that device type. Offers with `device: "both"` are always included.
* **Tracking clicks.** Each offer's `clickUrl` automatically records the click and handles the redirect — do not modify or reconstruct this URL. Clicks are tracked per impression and used for revenue reporting.
* **Iframe alternative.** If you prefer a managed display, embed the [Click Listing iFrame](/api-explore/offer-campaign/click-listing-iframe) instead of building a custom offer wall with this API.
* **CORS.** This endpoint supports cross-origin requests, so it can be called directly from browser JavaScript on your landing page domain.


## OpenAPI

````yaml GET /click/list/{cid}/{transaction_id}
openapi: 3.1.0
info:
  title: Pingtree API Explore
  description: >-
    The Pingtree API Explore is a comprehensive guide designed to help you
    understand and integrate the Pingtree API effectively. It provides detailed
    insights into API endpoints, request parameters, and response structures to
    facilitate seamless lead distribution and tracking. Whether you're building
    custom integrations, automating lead flows, or optimizing campaign
    performance, this guide empowers you with the knowledge to leverage
    Pingtree's capabilities for enhanced lead management and improved results.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.pingtree.com
security: []
paths:
  /click/list/{cid}/{transaction_id}:
    get:
      description: >-
        The Click Listing API retrieves click listing data or offers linked to
        leads. This is particularly useful for showcasing available offers or
        tracking user interactions with campaigns.
      parameters:
        - name: cid
          required: true
          in: path
          description: Your campaign unique ID
          schema:
            type: string
        - name: transaction_id
          required: true
          in: path
          description: >-
            Lead's Transaction ID, Which was generate from click script of
            Pingtree
          schema:
            type: string
      responses:
        '201':
          description: Offer successfully received
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status code of API response
                  type:
                    type: string
                    description: Type of API response which can be success or error
                  message:
                    type: string
                    description: Message of API response
                  offerList:
                    type: object
                    description: Array of offer list
        '400':
          description: >-
            Unexpected error, transaction_id or cid not found in the requested
            data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lead-response'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lead-response'
components:
  schemas:
    lead-response:
      type: object
      properties:
        status:
          type: string
          description: Status code of API response
        type:
          type: string
          description: Type of API response which can be success or error
        message:
          type: string
          description: Message of API response

````