PT EN

Ligações

URL base: $BUSINESS_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
O objecto
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Cortar uma ligação por falta de pagamento

Registos

POST /connections/{id}/disconnect

Cut a connection for non-payment (service_status cut_for_debt)

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to cut; it must be active or suspended, otherwise the request fails with 400.

Corpo application/json

reasonstring · opcional

Devolve

200 Disconnected connection

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/disconnect" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 200

Disconnected connection

Listar ligações

Registos

GET /connections

Returns the tenant's service connections one cursor page at a time (limit defaults to 20, maximum 100). Besides paging, the handler accepts the filters customer_id, property_id, account_id, meter_id, category, status, service_status and q (free-text search that also matches account holders). Requires the connections:read permission in the authenticated utility tenant; a missing permission returns 403.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Service connections in the authenticated utility tenant

Mostrar atributos
dataarray of WaterConnection · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
has_moreboolean · obrigatório
next_cursorstring · opcional
total_countinteger · opcional

Erros 403

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/connections" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
      "customer_name": "Ana Matsinhe",
      "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
      "property_address": "Av. Julius Nyerere 1420, Maputo",
      "property_holder_name": "Ana Matsinhe",
      "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
      "account_number": "ACC-2026-000142",
      "account_holder_name": "Ana Matsinhe",
      "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
      "meter_holder_name": "Ana Matsinhe",
      "meter_serial": "meter serial",
      "category": "residential",
      "diameter_mm": 1,
      "pipe_diameter_mm": 1,
      "pipe_material": "pipe material",
      "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
      "status": "draft",
      "service_status": "pending_install",
      "estimated_cost_cents": 1,
      "currency": "MZN",
      "gps_coordinates": "gps coordinates",
      "address": "Av. Julius Nyerere 1420, Maputo",
      "notes": "Leitura confirmada no local.",
      "rejection_reason": "rejection reason",
      "applied_at": "2026-11-19T09:30:00Z",
      "approved_at": "2026-11-19T09:30:00Z",
      "installed_at": "2026-11-19T09:30:00Z",
      "activated_at": "2026-11-19T09:30:00Z",
      "suspended_at": "2026-11-19T09:30:00Z",
      "retired_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z",
      "updated_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor",
  "total_count": 125000
}

Criar uma ligação

Registos

POST /connections

Requires connections:write in the authenticated utility tenant. customer_id and property_id are required; omitted category defaults to residential and omitted or non-positive diameter_mm defaults to 15.

Corpo application/json

property_idstring · obrigatório
customer_idstring · obrigatório
categorystring · opcional

um de residential, commercial, industrial, institutional, government

diameter_mminteger · opcional
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional

Devolve

201 Connection created

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local."
}'
Resposta 201
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Obter uma ligação

Registos

GET /connections/{id}

Returns one connection of the authenticated tenant with its application status, service status, and linked customer, property, account and meter. Requires connections:read. Returns 404 when no connection with that ID exists in the tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection in the authenticated tenant.

Devolve

200 Service connection details

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 403 · 404

Permissões connections:read · Funções: admin, analyst, customer_service, operations, owner, viewer

curl -X GET "$BUSINESS_API/connections/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Actualizar uma ligação

Registos

PATCH /connections/{id}

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to update in the authenticated tenant.

Corpo application/json

pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
meter_idstring · opcional
account_idstring · opcional
notesstring · opcional
gps_coordinatesstring · opcional

Devolve

200 Updated connection

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X PATCH "$BUSINESS_API/connections/{id}" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "notes": "Leitura confirmada no local.",
  "gps_coordinates": "gps coordinates"
}'
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Aprovar ou rejeitar um pedido de ligação

Registos

POST /connections/{id}/review

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection application to review; it must be in the submitted or inspecting status, otherwise the request fails with 400.

Corpo application/json

approvedboolean · obrigatório
estimated_cost_centsinteger (int64) · opcional
currencystring · opcional
rejection_reasonstring · opcional
notesstring · opcional

Devolve

200 Reviewed connection application

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/review" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "approved": true,
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "rejection_reason": "rejection reason",
  "notes": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Agendar a instalação de uma ligação

Registos

POST /connections/{id}/schedule-install

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to schedule; it must be in the approved status, otherwise the request fails with 400.

Devolve

200 Installation scheduled

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/schedule-install" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Activar uma ligação

Registos

POST /connections/{id}/activate

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to activate; it must be in the approved or installing status, otherwise the request fails with 400.

Corpo application/json

meter_idstring · opcional
account_idstring · opcional

Devolve

200 Activated connection

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/activate" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP"
}'
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Suspender uma ligação

Registos

POST /connections/{id}/suspend

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to suspend; it must be active, otherwise the request fails with 400.

Corpo application/json

reasonstring · opcional

Devolve

200 Suspended connection

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/suspend" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Religar uma ligação

Registos

POST /connections/{id}/reconnect

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to restore; it must be suspended or disconnected, otherwise the request fails with 400.

Devolve

200 Reconnected service

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/reconnect" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Desactivar uma ligação de vez

Registos

POST /connections/{id}/retire

Requires connections:write in the authenticated utility tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection to retire; a connection that is already retired returns 400.

Corpo application/json

reasonstring · opcional

Devolve

200 Retired connection

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

property_idstring · obrigatório
property_addressstring · opcional

Address line of the referenced property. Omitted when unknown.

property_holder_namestring · opcional

Display name of the customer who holds the referenced property. Omitted when unknown.

account_idstring · opcional
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

meter_idstring · opcional
meter_holder_namestring · opcional

Display name of the customer who holds the account the meter is installed on. Omitted when unknown.

meter_serialstring · opcional
categorystring · obrigatório

um de residential, commercial, industrial, institutional, government

diameter_mminteger · obrigatório
pipe_diameter_mminteger · opcional
pipe_materialstring · opcional
pressure_zone_idstring · opcional
statusstring · obrigatório

um de draft, submitted, inspecting, approved, rejected, installing, active, suspended, disconnected, retired

service_statusstring · obrigatório

um de pending_install, active, cut_for_debt, suspended_customer_request, abandoned

estimated_cost_centsinteger (int64) · obrigatório
currencystring · obrigatório
gps_coordinatesstring · opcional
addressstring · opcional
notesstring · opcional
rejection_reasonstring · opcional
applied_atstring (date-time) · obrigatório
approved_atstring (date-time) · opcional
installed_atstring (date-time) · opcional
activated_atstring (date-time) · opcional
suspended_atstring (date-time) · opcional
retired_atstring (date-time) · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 400 · 403 · 404

Permissões connections:write · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/connections/{id}/retire" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "wat_2E6F9Umzh4yLHuavzusVNMqJHiS",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "property_id": "prp_2ZbuIh1k2RvWMVPQCJD2yPrsOJ3",
  "property_address": "Av. Julius Nyerere 1420, Maputo",
  "property_holder_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
  "meter_holder_name": "Ana Matsinhe",
  "meter_serial": "meter serial",
  "category": "residential",
  "diameter_mm": 1,
  "pipe_diameter_mm": 1,
  "pipe_material": "pipe material",
  "pressure_zone_id": "pre_2Ww5XCYxHs6jv2K53SI3fu47RkI",
  "status": "draft",
  "service_status": "pending_install",
  "estimated_cost_cents": 1,
  "currency": "MZN",
  "gps_coordinates": "gps coordinates",
  "address": "Av. Julius Nyerere 1420, Maputo",
  "notes": "Leitura confirmada no local.",
  "rejection_reason": "rejection reason",
  "applied_at": "2026-11-19T09:30:00Z",
  "approved_at": "2026-11-19T09:30:00Z",
  "installed_at": "2026-11-19T09:30:00Z",
  "activated_at": "2026-11-19T09:30:00Z",
  "suspended_at": "2026-11-19T09:30:00Z",
  "retired_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Obter os metadados de uma ligação

Registos

GET /connections/{id}/metadata

Returns the free-form key-value metadata the tenant has stored on a connection, as a resource_type, resource_id and metadata object. A connection without metadata returns an empty map. Requires business:metadata:read; returns 404 when the connection does not exist in the tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection whose metadata is read (at most 120 characters).

Devolve

200 Metadata

Mostrar atributos
resource_typestring · opcional
resource_idstring · opcional
metadataobject · opcional

Erros 404

Permissões business:metadata:read · Funções: admin, customer_service, owner

curl -X GET "$BUSINESS_API/connections/{id}/metadata" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "metadata": {
    "key": "value"
  }
}

Actualizar os metadados de uma ligação

Registos

PUT /connections/{id}/metadata

Merge metadata; an empty value deletes the key

Merges the supplied keys into the connection's existing metadata and returns the full result; keys not in the request stay unchanged. A request may set at most 50 keys, each key at most 40 characters with no square brackets or control characters, and each value at most 500 characters; a resource may hold at most 50 keys in total. Requires business:metadata:write; invalid keys or values return 400 listing each offending field, and an unknown connection returns 404.

Parâmetros

idstring · caminho · obrigatório

Identifier of the connection whose metadata is merged (at most 120 characters).

Corpo application/json

metadataobject · obrigatório

Devolve

200 Resulting metadata

Mostrar atributos
resource_typestring · opcional
resource_idstring · opcional
metadataobject · opcional

Erros 400 · 404

Permissões business:metadata:write · Funções: admin, owner

curl -X PUT "$BUSINESS_API/connections/{id}/metadata" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "key": "value"
  }
}'
Resposta 200
{
  "resource_type": "resource type",
  "resource_id": "res_2iAXhMsJzmqPnY6X5cMTJ6OBTSG",
  "metadata": {
    "key": "value"
  }
}