Search companies

Companies that match a search term, with their ID, status and main contact details.

GET https://cotlet.dev/api/v1/teamleader/companies/search

read

Searches companies by name, VAT number, email or phone number. Returns one page of companies, 20 by default. The company ID from here is what list_deals and list_invoices take as customer_id. Deactivated companies are only returned if you ask for them.

Parameters

Parameters: search_companies
NameTypeDescription
term string required string Name, VAT number, email or phone number to search for.
status enum enum active or deactivated. Default: active.
page integer integer Page number, starting at 1. Default: 1.
page_size integer integer Items per page. Default: 20.

Request

cURL
curl "https://cotlet.dev/api/v1/teamleader/companies/search?term=term" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("teamleader", "search_companies", {"term":"term"})
Node.js
const result = await cotlet.call('teamleader', 'search_companies', {"term":"term"});
CLI
cotlet call teamleader search_companies --data '{"term":"term"}'

Example response

JSON

{
  "companies": [
    {
      "company_id": "c4a7e2d1-5b36-4f08-a9c3-7e1d2f4b6a80",
      "name": "Northwind Studio",
      "vat_number": "BE0123456749",
      "email": "accounts@northwind.example",
      "status": "active"
    }
  ],
  "page": 1,
  "total_matches": 1
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.