Search

Base URL: $BUSINESS_API

The object

typestring · required

one of customer, account, property, meter, connection, invoice, payment, ticket, work_order, incident, reading_route, organization, …

idstring · required
titlestring · required

What a person recognises, such as a name, invoice number or serial.

subtitlestring · required

One line of context.

statusstring · required
Endpoints
The object
{
  "type": "customer",
  "id": "sea_2IoPVOcVNUC7fuGnj6ErdMyrjuU",
  "title": "Fuga na Rua 3",
  "subtitle": "subtitle",
  "status": "active"
}

Search the authenticated utility tenant

Logs

GET /search

Searches across the resources of the authenticated tenant. The tenant always comes from the token. Lookups run concurrently with a per-request timeout. Sources the caller's scopes exclude are omitted; a source that fails for any other reason is omitted and partial becomes true. Meters match by serial number, by the number of the account they are installed on (only for callers who may read accounts) and by exact meter ID; an exact serial ranks first.

Parameters

qstring · query · required

Search text, trimmed before use.

typesstring · query · optional

Comma-separated subset of [customer, account, property, meter, connection, invoice, payment, ticket, work_order, incident, reading_route]. Defaults to all of them; an unknown type is rejected.

limitinteger · query · optional

Maximum results per type (default 5, larger values are clamped to 20).

Returns

200 Matching resources, grouped by type in a stable order

Show attributes
dataarray of SearchResult · required
Show child attributes
typestring · required

one of customer, account, property, meter, connection, invoice, payment, ticket, work_order, incident, reading_route, organization, …

idstring · required
titlestring · required

What a person recognises, such as a name, invoice number or serial.

subtitlestring · required

One line of context.

statusstring · required
querystring · required

The trimmed search text.

partialboolean · required

True when at least one source failed and its results are missing.

Errors 400 · 401

Permissions business:accounts:read, business:customers:read, business:metadata:read, business:meters:read, business:properties:read, business:reading-routes:read, connections:read, invoices:read, operations:read, payments:read, support:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/search" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "data": [
    {
      "type": "customer",
      "id": "sea_2IoPVOcVNUC7fuGnj6ErdMyrjuU",
      "title": "Fuga na Rua 3",
      "subtitle": "subtitle",
      "status": "active"
    }
  ],
  "query": "query",
  "partial": true
}