Skip to main content
PATCH
/
organizations
/
{organizationId}
/
subscriptions
/
billing-threshold
Atualizar Limite de Faturamento
curl --request PATCH \
  --url https://api.example.com/organizations/{organizationId}/subscriptions/billing-threshold \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "billingThresholdId": "<string>"
}
'
{
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
  "iamExternalRef": "org_workos_abc123",
  "billingExternalRef": "cus_stripe_abc123",
  "name": "Acme Inc",
  "email": "billing@acme.com",
  "currency": "BRL",
  "phone": "+5511999999999",
  "address": {
    "line1": "Av Paulista 1000",
    "line2": null,
    "city": "Sao Paulo",
    "state": "SP",
    "postalCode": "01310-100",
    "country": "BR"
  },
  "taxId": "12345678000100",
  "taxType": "CNPJ",
  "offboardingStatus": "ACTIVE",
  "createdAt": "2026-01-15T10:00:00.000Z",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}
Requer permissao billing_threshold:write.

Headers

Authorization
string
required
Bearer token.

Parametros de Path

organizationId
string
required
UUID da organizacao.

Corpo da Requisicao

billingThresholdId
string
required
Novo ID do limite de faturamento. Must match org currency.

Resposta

organizationId
string
UUID da organizacao.
billingThresholdId
string
ID do limite de faturamento.
subscriptionId
string
O ID da assinatura ativa.
iamExternalRef
string
Referencia externa do provedor de identidade.
billingExternalRef
string
Referencia externa do provedor de pagamento.
name
string
Nome da organizacao.
email
string
Email de billing.
currency
string
Codigo da moeda.
phone
string
Numero de telefone.
address
object
Endereco de billing.
taxId
string
Identificador fiscal.
taxType
string
Tipo de identificador fiscal.
offboardingStatus
string
O status de offboarding da organizacao.
createdAt
string
Timestamp de criacao.
updatedAt
string
Timestamp da ultima atualizacao.
{
  "organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
  "iamExternalRef": "org_workos_abc123",
  "billingExternalRef": "cus_stripe_abc123",
  "name": "Acme Inc",
  "email": "billing@acme.com",
  "currency": "BRL",
  "phone": "+5511999999999",
  "address": {
    "line1": "Av Paulista 1000",
    "line2": null,
    "city": "Sao Paulo",
    "state": "SP",
    "postalCode": "01310-100",
    "country": "BR"
  },
  "taxId": "12345678000100",
  "taxType": "CNPJ",
  "offboardingStatus": "ACTIVE",
  "createdAt": "2026-01-15T10:00:00.000Z",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}

Exemplos de Codigo

curl -X PATCH https://api.awsales.io/admin/organizations/019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2/subscriptions/billing-threshold \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c"
}'

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
404organization.not_foundOrganizacao nao encontrada
404subscription.not_foundAssinatura nao encontrada
422billing_threshold.currency_not_compatibleBilling threshold currency is not compatible
500internal_server_errorOcorreu um erro inesperado