curl -X POST "$BUSINESS_API/connections/{id}/disconnect"\
-H "Authorization: Bearer sk_test_..."\
-H "Content-Type: application/json"\
-d '{
"reason": "Leitura confirmada no local."
}'
# Sem comando CLI equivalente; use cURL ou HTTP directo.
constres=awaitfetch("$BUSINESS_API/connections/{id}/disconnect",{method:"POST",headers:{Authorization:"Bearer sk_test_...","Content-Type":"application/json"},body:JSON.stringify({"reason":"Leitura confirmada no local."})});constdata=awaitres.json();
importrequestsres=requests.post("$BUSINESS_API/connections/{id}/disconnect",headers={"Authorization":"Bearer sk_test_..."},json={"reason":"Leitura confirmada no local."})data=res.json()
body:=strings.NewReader(`{
"reason": "Leitura confirmada no local."
}`)req,_:=http.NewRequest("POST","$BUSINESS_API/connections/{id}/disconnect",body)req.Header.Set("Authorization","Bearer sk_test_...")req.Header.Set("Content-Type","application/json")resp,err:=http.DefaultClient.Do(req)
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
200Service 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
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
201Connection 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
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
200Service 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
curl -X POST "$BUSINESS_API/connections/{id}/suspend"\
-H "Authorization: Bearer sk_test_..."\
-H "Content-Type: application/json"\
-d '{
"reason": "Leitura confirmada no local."
}'
# Sem comando CLI equivalente; use cURL ou HTTP directo.
constres=awaitfetch("$BUSINESS_API/connections/{id}/suspend",{method:"POST",headers:{Authorization:"Bearer sk_test_...","Content-Type":"application/json"},body:JSON.stringify({"reason":"Leitura confirmada no local."})});constdata=awaitres.json();
importrequestsres=requests.post("$BUSINESS_API/connections/{id}/suspend",headers={"Authorization":"Bearer sk_test_..."},json={"reason":"Leitura confirmada no local."})data=res.json()
body:=strings.NewReader(`{
"reason": "Leitura confirmada no local."
}`)req,_:=http.NewRequest("POST","$BUSINESS_API/connections/{id}/suspend",body)req.Header.Set("Authorization","Bearer sk_test_...")req.Header.Set("Content-Type","application/json")resp,err:=http.DefaultClient.Do(req)
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"}
curl -X POST "$BUSINESS_API/connections/{id}/retire"\
-H "Authorization: Bearer sk_test_..."\
-H "Content-Type: application/json"\
-d '{
"reason": "Leitura confirmada no local."
}'
# Sem comando CLI equivalente; use cURL ou HTTP directo.
constres=awaitfetch("$BUSINESS_API/connections/{id}/retire",{method:"POST",headers:{Authorization:"Bearer sk_test_...","Content-Type":"application/json"},body:JSON.stringify({"reason":"Leitura confirmada no local."})});constdata=awaitres.json();
importrequestsres=requests.post("$BUSINESS_API/connections/{id}/retire",headers={"Authorization":"Bearer sk_test_..."},json={"reason":"Leitura confirmada no local."})data=res.json()
body:=strings.NewReader(`{
"reason": "Leitura confirmada no local."
}`)req,_:=http.NewRequest("POST","$BUSINESS_API/connections/{id}/retire",body)req.Header.Set("Authorization","Bearer sk_test_...")req.Header.Set("Content-Type","application/json")resp,err:=http.DefaultClient.Do(req)
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"}
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).
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).