PT EN

Pesquisa

URL base: $CONSUMER_API

O objecto

typestring · obrigatório

um de customer, account, property, meter, connection, invoice, payment, ticket, work_order, incident, reading_route, organization, …

idstring · obrigatório
titlestring · obrigatório

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

subtitlestring · obrigatório

One line of context.

statusstring · obrigatório
Operações
O objecto
{
  "type": "customer",
  "id": "sea_2IoPVOcVNUC7fuGnj6ErdMyrjuU",
  "title": "Fuga na Rua 3",
  "subtitle": "subtitle",
  "status": "active"
}

Pesquisar

Registos

GET /search

Searches only the accounts the consumer holds a membership on and the resources reachable through those memberships, plus tickets the consumer opened. 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.

Parâmetros

qstring · consulta · obrigatório

Search text, trimmed before use.

typesstring · consulta · opcional

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

limitinteger · consulta · opcional

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

Devolve

200 Matching resources, grouped by type in a stable order

Mostrar atributos
dataarray of SearchResult · obrigatório
Mostrar atributos filhos
typestring · obrigatório

um de customer, account, property, meter, connection, invoice, payment, ticket, work_order, incident, reading_route, organization, …

idstring · obrigatório
titlestring · obrigatório

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

subtitlestring · obrigatório

One line of context.

statusstring · obrigatório
querystring · obrigatório

The trimmed search text.

partialboolean · obrigatório

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

Erros 400 · 401

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