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"
}
Atualizar o limite de faturamento atribuido a assinatura de uma organizacao.
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"
}
billing_threshold:write.{
"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"
}
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"
}'
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | organization.not_found | Organizacao nao encontrada |
404 | subscription.not_found | Assinatura nao encontrada |
422 | billing_threshold.currency_not_compatible | Billing threshold currency is not compatible |
500 | internal_server_error | Ocorreu um erro inesperado |