PT EN

Espaço de trabalho

URL base: $BUSINESS_API

O objecto

statusstring · obrigatório
verification_requirementsarray of string · obrigatório
catalogarray of VerificationRequirementDefinition · obrigatório
Mostrar atributos filhos
keystring · obrigatório
label_keystring · obrigatório
labelsobject · opcional

Localized labels for configured custom requirements.

applies_toarray of string · obrigatório
checked_bystring · obrigatório
requirementsobject · obrigatório
Mostrar atributos filhos
currently_duearray of string · opcional
eventually_duearray of string · opcional
past_duearray of string · opcional
pending_verificationarray of string · opcional
errorsarray of object · opcional
Mostrar atributos filhos
requirementstring · opcional
codestring · opcional

um de information_requested, document_rejected

reasonstring · opcional
capabilitiesobject · obrigatório
Mostrar atributos filhos
configurestring · opcional

um de inactive, pending, active, restricted

customersstring · opcional

um de inactive, pending, active, restricted

metersstring · opcional

um de inactive, pending, active, restricted

draft_billingstring · opcional

um de inactive, pending, active, restricted

invoicesstring · opcional

um de inactive, pending, active, restricted

paymentsstring · opcional

um de inactive, pending, active, restricted

messagesstring · opcional

um de inactive, pending, active, restricted

public_profilestring · opcional

um de inactive, pending, active, restricted

custom_domainstring · opcional

um de inactive, pending, active, restricted

live_apistring · opcional

um de inactive, pending, active, restricted

sandboxstring · opcional

um de inactive, pending, active, restricted

billingstring · opcional

um de inactive, pending, active, restricted

field_operationsstring · opcional

um de inactive, pending, active, restricted

statesobject · opcional
reasonsobject · opcional

Actionable reason for each non-active capability.

O objecto
{
  "status": "active",
  "verification_requirements": [
    "verification requirement"
  ],
  "catalog": [
    {
      "key": "key",
      "label_key": "label key",
      "labels": {
        "key": "value"
      },
      "applies_to": [
        "2026-11-19"
      ],
      "checked_by": "checked by"
    }
  ],
  "requirements": {
    "currently_due": [
      "currently due"
    ],
    "eventually_due": [
      "eventually due"
    ],
    "past_due": [
      "past due"
    ],
    "pending_verification": [
      "pending verification"
    ],
    "errors": [
      {
        "requirement": "requirement",
        "code": "information_requested",
        "reason": "Leitura confirmada no local."
      }
    ]
  },
  "capabilities": {
    "configure": "inactive",
    "customers": "inactive",
    "meters": "inactive",
    "draft_billing": "inactive",
    "invoices": "inactive",
    "payments": "inactive",
    "messages": "inactive",
    "public_profile": "inactive",
    "custom_domain": "inactive",
    "live_api": "inactive",
    "sandbox": "inactive",
    "billing": "inactive",
    "field_operations": "inactive",
    "states": {
      "key": "inactive"
    },
    "reasons": {
      "key": {
        "code": "requirements_due",
        "requirements": [
          "requirement"
        ]
      }
    }
  }
}

Obter os requisitos de verificação

Registos

GET /workspace/verification/requirements

Get the active workspace verification requirements and capability states

Returns the verification picture of the caller's workspace: the onboarding status, the verification requirement codes that apply to it under its policy, the catalogue definitions of those requirements, the requirement states (currently due, eventually due, past due, pending verification, errors) and the capabilities enabled so far with the reasons blocking the rest. An onboarding application is created on first read if the workspace has none. Requires business onboarding read access.

Devolve

200 Requirement progress and capability states for the active workspace

Mostrar atributos
statusstring · obrigatório
verification_requirementsarray of string · obrigatório
catalogarray of VerificationRequirementDefinition · obrigatório
Mostrar atributos filhos
keystring · obrigatório
label_keystring · obrigatório
labelsobject · opcional

Localized labels for configured custom requirements.

applies_toarray of string · obrigatório
checked_bystring · obrigatório
requirementsobject · obrigatório
Mostrar atributos filhos
currently_duearray of string · opcional
eventually_duearray of string · opcional
past_duearray of string · opcional
pending_verificationarray of string · opcional
errorsarray of object · opcional
Mostrar atributos filhos
requirementstring · opcional
codestring · opcional

um de information_requested, document_rejected

reasonstring · opcional
capabilitiesobject · obrigatório
Mostrar atributos filhos
configurestring · opcional

um de inactive, pending, active, restricted

customersstring · opcional

um de inactive, pending, active, restricted

metersstring · opcional

um de inactive, pending, active, restricted

draft_billingstring · opcional

um de inactive, pending, active, restricted

invoicesstring · opcional

um de inactive, pending, active, restricted

paymentsstring · opcional

um de inactive, pending, active, restricted

messagesstring · opcional

um de inactive, pending, active, restricted

public_profilestring · opcional

um de inactive, pending, active, restricted

custom_domainstring · opcional

um de inactive, pending, active, restricted

live_apistring · opcional

um de inactive, pending, active, restricted

sandboxstring · opcional

um de inactive, pending, active, restricted

billingstring · opcional

um de inactive, pending, active, restricted

field_operationsstring · opcional

um de inactive, pending, active, restricted

statesobject · opcional
reasonsobject · opcional

Actionable reason for each non-active capability.

Erros 401

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

curl -X GET "$BUSINESS_API/workspace/verification/requirements" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "status": "active",
  "verification_requirements": [
    "verification requirement"
  ],
  "catalog": [
    {
      "key": "key",
      "label_key": "label key",
      "labels": {
        "key": "value"
      },
      "applies_to": [
        "2026-11-19"
      ],
      "checked_by": "checked by"
    }
  ],
  "requirements": {
    "currently_due": [
      "currently due"
    ],
    "eventually_due": [
      "eventually due"
    ],
    "past_due": [
      "past due"
    ],
    "pending_verification": [
      "pending verification"
    ],
    "errors": [
      {
        "requirement": "requirement",
        "code": "information_requested",
        "reason": "Leitura confirmada no local."
      }
    ]
  },
  "capabilities": {
    "configure": "inactive",
    "customers": "inactive",
    "meters": "inactive",
    "draft_billing": "inactive",
    "invoices": "inactive",
    "payments": "inactive",
    "messages": "inactive",
    "public_profile": "inactive",
    "custom_domain": "inactive",
    "live_api": "inactive",
    "sandbox": "inactive",
    "billing": "inactive",
    "field_operations": "inactive",
    "states": {
      "key": "inactive"
    },
    "reasons": {
      "key": {
        "code": "requirements_due",
        "requirements": [
          "requirement"
        ]
      }
    }
  }
}

Pedir o encerramento da conta

Registos

POST /workspace/close

Close the active workspace and begin its configured recovery period

Owner only. Name another active owner as successor. Writes stop immediately. The response includes the existing compliance export endpoint and the configured deletion due date; this request does not delete tenant data.

Corpo application/json

successor_member_idstring · obrigatório

Active tenant owner membership that will retain ownership after closure

Devolve

202 Workspace closed for use; data remains available for export during the grace period

Mostrar atributos
tenantobject · obrigatório
Mostrar atributos filhos
idstring · obrigatório
owner_organization_idstring · obrigatório
slugstring · obrigatório
namestring · obrigatório
statusstring · obrigatório

um de provisioning, active, suspended, closed

kindstring · obrigatório

um de live, sandbox

workspace_statestring · obrigatório

um de sandbox_only, unverified, verifying, live, restricted, suspended, closed, sandbox

parent_tenant_idstring · opcional
copied_from_tenant_idstring · opcional
template_keystring · opcional
closed_atstring · opcional · anulável
deletion_due_atstring · opcional · anulável
country_codestring · opcional
localestring · obrigatório
currencystring · obrigatório
timezonestring · obrigatório
export_pathstring · obrigatório
deletion_due_atstring (date-time) · obrigatório

Erros 401 · 403 · 409

Permissões business:organization:read, business:team:read · Funções: admin, owner

curl -X POST "$BUSINESS_API/workspace/close" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "successor_member_id": "suc_2jVWyrdmOLjMKhhC2nXY4nnW4nZ"
}'
Resposta 202
{
  "tenant": {
    "id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "owner_organization_id": "own_2Hj8Qbz4glBOQR5aWPneq1JWux7",
    "slug": "slug",
    "name": "Ana Matsinhe",
    "status": "provisioning",
    "kind": "live",
    "workspace_state": "sandbox_only",
    "parent_tenant_id": "par_21NQMtrA6ldIklFucB3eoRxCqDB",
    "copied_from_tenant_id": "cop_2sEl3AsnbMmfvSknXeeX3YMH7WK",
    "template_key": "template key",
    "closed_at": "2026-11-19T09:30:00Z",
    "deletion_due_at": "2026-11-19T09:30:00Z",
    "country_code": "MZ",
    "locale": "pt",
    "currency": "MZN",
    "timezone": "Africa/Maputo"
  },
  "export_path": "$BUSINESS_API/export/compliance",
  "deletion_due_at": "2026-11-19T09:30:00Z"
}

Anular o encerramento da conta

Registos

POST /workspace/close/reverse

Reopen the active workspace during its configured recovery period

Owner only. Restores the lifecycle and verification state that existed before closure. The operation is refused after the deletion due date.

Devolve

200 Workspace reopened

Mostrar atributos
tenantobject · obrigatório
Mostrar atributos filhos
idstring · obrigatório
owner_organization_idstring · obrigatório
slugstring · obrigatório
namestring · obrigatório
statusstring · obrigatório

um de provisioning, active, suspended, closed

kindstring · obrigatório

um de live, sandbox

workspace_statestring · obrigatório

um de sandbox_only, unverified, verifying, live, restricted, suspended, closed, sandbox

parent_tenant_idstring · opcional
copied_from_tenant_idstring · opcional
template_keystring · opcional
closed_atstring · opcional · anulável
deletion_due_atstring · opcional · anulável
country_codestring · opcional
localestring · obrigatório
currencystring · obrigatório
timezonestring · obrigatório

Erros 401 · 403 · 409

Permissões business:organization:read · Funções: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X POST "$BUSINESS_API/workspace/close/reverse" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "tenant": {
    "id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "owner_organization_id": "own_2Hj8Qbz4glBOQR5aWPneq1JWux7",
    "slug": "slug",
    "name": "Ana Matsinhe",
    "status": "provisioning",
    "kind": "live",
    "workspace_state": "sandbox_only",
    "parent_tenant_id": "par_21NQMtrA6ldIklFucB3eoRxCqDB",
    "copied_from_tenant_id": "cop_2sEl3AsnbMmfvSknXeeX3YMH7WK",
    "template_key": "template key",
    "closed_at": "2026-11-19T09:30:00Z",
    "deletion_due_at": "2026-11-19T09:30:00Z",
    "country_code": "MZ",
    "locale": "pt",
    "currency": "MZN",
    "timezone": "Africa/Maputo"
  }
}