Step 2 of 4

Send your first lead

Send one lead on Demo and check that it arrived.

Steps

  1. 1

    Where your lead goes

    Your API key is bound to a lead source; the lead source belongs to a marketplace — every lead you send with this key lands there. GET /account shows which.

    Response (excerpt)
    {
      "keyName": "My CRM",
      "permissions": ["api:provider:lead:write"],
      "leadSource": {
        "id": "00000000-0000-4000-8000-000000000001",
        "name": "Website form",
        "marketplace": {
          "id": "00000000-0000-4000-8000-000000000002",
          "name": "My Marketplace"
        }
      },
      "environment": "demo"
    }
  2. 2

    Send a lead

    Send the required fields plus street and city, which the API also needs for most addresses — with your own test values, not the example names.

    curl
    curl -X POST https://demo.api.lead.zolar.tech/api/public/v2/leads \
      -H "Authorization: Bearer sk_[YOUR DEMO KEY]" \
      -H "Content-Type: application/json" \
      -d '{
        "firstName": "[YOUR TEST FIRST NAME]",
        "lastName": "[YOUR TEST LAST NAME]",
        "email": "[YOUR TEST EMAIL]",
        "mobilePhone": "[YOUR TEST MOBILE NUMBER]",
        "street": "[STREET AND HOUSE NUMBER]",
        "city": "[CITY]",
        "postalCode": "[POSTAL CODE]",
        "properties": {
          "interest": { "pv": "interestNew" },
          "building": { "type": "residential" }
        }
      }'

    street may be left out only when your lead source allows approximate locations, or for a Dutch address (postal code like 1234 AB plus houseNumber); city only for a Dutch address.

    If you send properties, it must contain building; send interest too, or installers won't see the lead. Other optional fields, such as leadIdLeadPartner (your own ID), are listed under Create a new lead.

    Use a new name, email and phone for every test: duplicates are checked across the whole platform, including other partners' Demo leads, so a reused or sample name returns 409. Sample names such as "Mustermann" and example.com addresses are flagged as test leads and never offered to installers.

  3. 3

    Check it arrived

    A 201 returns the new lead's id and a warnings list (empty when everything was understood).

    Response
    {
      "id": "[LEAD ID]",
      "warnings": []
    }

    Fetch it by ID (needs Read leads), or open My Marketplaces → Dashboard, pick the marketplace and look under Active Projects.

    curl
    curl -X POST https://demo.api.lead.zolar.tech/api/public/v2/leads/bulk \
      -H "Authorization: Bearer sk_[YOUR DEMO KEY]" \
      -H "Content-Type: application/json" \
      -d '{ "ids": ["[LEAD ID]"] }'
  4. 4

    Update it

    Optional

    Change leadIdLeadPartner or properties.marketplace.maxOfferCount (needs Update leads or Insert leads). A new lead only becomes READY after verification; until then a PATCH returns 400.

    maxOfferCount is at least 1; lowering it to or below the number of times the lead was already bought takes the lead off the marketplace (OFFLINE).

    curl
    curl -X PATCH https://demo.api.lead.zolar.tech/api/public/v2/leads/[LEAD ID] \
      -H "Authorization: Bearer sk_[YOUR DEMO KEY]" \
      -H "Content-Type: application/json" \
      -d '{ "leadIdLeadPartner": "crm-4711" }'

Rate limit: 60 requests per rolling 60 seconds per key, including the try-it console. Over the limit you get 429.

NextErrors