PT EN

Pedidos de associação

URL base: $BUSINESS_API

O objecto

idstring · opcional
tenant_idstring · opcional
account_idstring · opcional
account_holder_namestring · opcional

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

identity_idstring · opcional
account_numberstring · opcional
phonestring · opcional
statusstring · opcional

um de pending, approved, rejected, cancelled

reasonstring · opcional
O objecto
{
  "id": "acc_2EuRxSyNd8kv1G6pXooBRwCv7KW",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_holder_name": "Ana Matsinhe",
  "identity_id": "ide_2W4tFuAzbOoV5aORlgwJHqwRdkg",
  "account_number": "ACC-2026-000142",
  "phone": "+258841234567",
  "status": "pending",
  "reason": "Leitura confirmada no local."
}

Listar pedidos de associação

Registos

GET /account-link-requests

Returns the workspace's queue of requests from people asking to be linked to a customer account. By default only pending requests are listed; status accepts pending, approved, rejected or cancelled. Results are paginated with limit (default 20, maximum 100) and the after cursor. Requires the business:accounts:link-requests:read permission.

Parâmetros

limitinteger · consulta · opcional

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

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

statusstring · consulta · opcional

pending (default), approved or rejected

Devolve

200 Link requests

Mostrar atributos
dataarray of AccountLinkRequest · opcional
Mostrar atributos filhos
idstring · opcional
tenant_idstring · opcional
account_idstring · opcional
account_holder_namestring · opcional

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

identity_idstring · opcional
account_numberstring · opcional
phonestring · opcional
statusstring · opcional

um de pending, approved, rejected, cancelled

reasonstring · opcional
has_moreboolean · opcional
next_cursorstring · opcional

Permissões business:accounts:link-requests:read · Funções: admin, customer_service, owner

curl -X GET "$BUSINESS_API/account-link-requests" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "acc_2EuRxSyNd8kv1G6pXooBRwCv7KW",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
      "account_holder_name": "Ana Matsinhe",
      "identity_id": "ide_2W4tFuAzbOoV5aORlgwJHqwRdkg",
      "account_number": "ACC-2026-000142",
      "phone": "+258841234567",
      "status": "pending",
      "reason": "Leitura confirmada no local."
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Aprovar um pedido de associação

Registos

POST /account-link-requests/{id}/approve

Approves a pending link request and, in the same change, gives the requesting person an active holder membership on the account with the standard holder permissions. Returns the updated request. A request already decided returns 409, and one from another workspace returns 404. Requires the business:accounts:link-requests:decide permission.

Parâmetros

idstring · caminho · obrigatório

Resource identifier

Devolve

200 Request

Mostrar atributos
idstring · opcional
tenant_idstring · opcional
account_idstring · opcional
account_holder_namestring · opcional

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

identity_idstring · opcional
account_numberstring · opcional
phonestring · opcional
statusstring · opcional

um de pending, approved, rejected, cancelled

reasonstring · opcional

Permissões business:accounts:link-requests:decide · Funções: admin, customer_service, owner

curl -X POST "$BUSINESS_API/account-link-requests/{id}/approve" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "acc_2EuRxSyNd8kv1G6pXooBRwCv7KW",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_holder_name": "Ana Matsinhe",
  "identity_id": "ide_2W4tFuAzbOoV5aORlgwJHqwRdkg",
  "account_number": "ACC-2026-000142",
  "phone": "+258841234567",
  "status": "pending",
  "reason": "Leitura confirmada no local."
}

Rejeitar um pedido de associação

Registos

POST /account-link-requests/{id}/reject

Refuses a resident's pending request to link a service account to their identity, recording the reason, the staff member who decided and the time. No account membership is created, and the request keeps the reason so the resident can see why. A missing reason returns 400; a request of another utility, or one without a matched account, returns 404. Requires business:accounts:link-requests:decide.

Parâmetros

idstring · caminho · obrigatório

Resource identifier

Corpo application/json

reasonstring · obrigatório

Devolve

200 Request

Mostrar atributos
idstring · opcional
tenant_idstring · opcional
account_idstring · opcional
account_holder_namestring · opcional

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

identity_idstring · opcional
account_numberstring · opcional
phonestring · opcional
statusstring · opcional

um de pending, approved, rejected, cancelled

reasonstring · opcional

Permissões business:accounts:link-requests:decide · Funções: admin, customer_service, owner

curl -X POST "$BUSINESS_API/account-link-requests/{id}/reject" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 200
{
  "id": "acc_2EuRxSyNd8kv1G6pXooBRwCv7KW",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_holder_name": "Ana Matsinhe",
  "identity_id": "ide_2W4tFuAzbOoV5aORlgwJHqwRdkg",
  "account_number": "ACC-2026-000142",
  "phone": "+258841234567",
  "status": "pending",
  "reason": "Leitura confirmada no local."
}