solarOSsolarOS Docs

Convert one Lead

Converts a Lead into a Customer, Property, and Opportunity using the documented email and placeId identity rules. Requires Idempotency-Key. Required scope: leads:convert.

POST
/leads/{id}/convert

Converts a Lead into a Customer, Property, and Opportunity using the documented email and placeId identity rules. Requires Idempotency-Key. Required scope: leads:convert.

Authorization

Authorization<token>

Organization API key. Format: Bearer sk_live_...

In: header

Path Parameters

id*string

Lead identifier returned by the Organization API.

Request Body

application/json

JSON request payload for convertLead.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/leads/string/convert" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "firstName": "Ada",      "lastName": "Lovelace",      "email": "ada@example.com"    },    "property": {      "address": "1 Market St",      "city": "San Francisco",      "state": "CA",      "zipCode": "94105"    },    "opportunity": {      "name": "Residential solar consultation",      "salesTypeIds": [        "sales_type_install"      ]    }  }'
{  "data": {    "action": {      "confirmed": true,      "confirmationSignal": "string"    },    "resource": {}  },  "meta": {    "requestId": "string",    "version": "v1",    "timestamp": "2019-08-24T14:15:22Z",    "rateLimit": {      "limit": 0,      "remaining": 0,      "reset": 0    }  }}