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

# Convert lead

> Convert a lead to a customer

## Endpoint

```
GET https://api.partnero.com/v1/leads/convert
```

## Query Parameters

| Parameter                       | Type    | Required | Description                                   |
| ------------------------------- | ------- | -------- | --------------------------------------------- |
| `id`                            | integer | Yes      | Lead ID to convert                            |
| `commission_transaction_amount` | number  | Yes      | Transaction amount for commission calculation |

## Request

```bash cURL theme={null}
curl --location 'https://api.partnero.com/v1/leads/convert?id=44&commission_transaction_amount=500' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": 44,
      "status": "converted",
      "created_at": "2025-05-16",
      "lead_info": {
        "name": "Alice Brown",
        "email": "alice.brown@partnero.com"
      },
      "converted_to": {
        "key": "NSpBI1qWSE4J",
        "name": "Alice Brown",
        "email": "alice.brown@partnero.com"
      },
      "submitter": {
        "id": "partner_123",
        "name": "John Doe",
        "email": "john.doe@partnero.com"
      },
      "submission_form": [
        {
          "question": "Name",
          "answer": "Alice Brown"
        },
        {
          "question": "Email address",
          "answer": "alice.brown@partnero.com"
        }
      ],
      "can_be_converted": false,
      "can_be_rejected": false
    },
    "status": 1
  }
  ```
</ResponseExample>

### Response Fields

| Field                     | Type   | Description               |
| ------------------------- | ------ | ------------------------- |
| `data.converted_to`       | object | The created customer      |
| `data.converted_to.key`   | string | New customer's unique key |
| `data.converted_to.name`  | string | Customer name             |
| `data.converted_to.email` | string | Customer email            |

<Note>
  After conversion, the lead's `status` changes to `converted` and `can_be_converted` becomes `false`.
</Note>

## Reject a Lead

To reject a lead instead of converting:

```bash theme={null}
GET https://api.partnero.com/v1/leads/reject?id=44
```

| Parameter | Type    | Required | Description       |
| --------- | ------- | -------- | ----------------- |
| `id`      | integer | Yes      | Lead ID to reject |

This marks the lead as rejected without creating a customer.
