curl --request POST \
--url https://api.example.com/billing-thresholds \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"value": 123,
"currency": "<string>"
}
'{
"billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
"name": "Premium",
"description": "Premium threshold",
"value": 50000,
"currency": "BRL",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
Criar um novo limite de faturamento com um valor de limite de gasto e moeda.
curl --request POST \
--url https://api.example.com/billing-thresholds \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"value": 123,
"currency": "<string>"
}
'{
"billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
"name": "Premium",
"description": "Premium threshold",
"value": 50000,
"currency": "BRL",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
billing_threshold:write.USD, BRL, EUR.{
"billingThresholdId": "019525fd-a068-7e7c-d4f0-6a8b0c2e4f6c",
"name": "Premium",
"description": "Premium threshold",
"value": 50000,
"currency": "BRL",
"status": "ACTIVE",
"createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
curl -X POST https://api.awsales.io/admin/billing-thresholds \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Standard Threshold",
"description": "Default billing threshold",
"value": 100000,
"currency": "BRL"
}'
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
422 | billing_threshold.currency_not_compatible | Billing threshold currency is not compatible |
500 | internal_server_error | Ocorreu um erro inesperado |