Skip to main content
PATCH
/
billing-thresholds
/
{billingThresholdId}
Atualizar Limite de Faturamento
curl --request PATCH \
  --url https://api.example.com/billing-thresholds/{billingThresholdId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "value": 123
}
'
{
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "name": "Basic Updated",
  "description": "Basic threshold for small orgs",
  "value": 15000,
  "currency": "BRL",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}
Requer permissao billing_threshold:write.

Headers

Authorization
string
required
Bearer token.

Parametros de Path

billingThresholdId
string
required
ID do limite de faturamento.

Corpo da Requisicao

name
string
Nome atualizado.
description
string
Descricao atualizada.
value
integer
Valor atualizado em centavos.

Resposta

billingThresholdId
string
ID do limite de faturamento.
name
string
Nome do limite.
description
string
Descricao do limite.
value
integer
Valor do limite em centavos.
currency
string
Codigo da moeda.
status
string
Status do limite.
createdBy
string
ID do usuario que criou o limite.
createdAt
string
Timestamp de criacao.
updatedBy
string
ID do usuario que atualizou o limite por ultimo.
updatedAt
string
Timestamp da ultima atualizacao.
{
  "billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
  "name": "Basic Updated",
  "description": "Basic threshold for small orgs",
  "value": 15000,
  "currency": "BRL",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:30:00.000Z"
}

Exemplos de Codigo

curl -X PATCH https://api.awsales.io/admin/billing-thresholds/019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Premium Threshold",
  "value": 200000
}'

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
404billing_threshold.not_foundLimite de faturamento nao encontrado
500internal_server_errorOcorreu um erro inesperado