curl --request POST \
--url https://api.example.com/plans \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"highlight": true,
"features": [
{
"description": "<string>",
"type": "<string>"
}
],
"intervals": [
{
"interval": "<string>",
"amount": 123,
"currency": "<string>"
}
]
}
'{
"planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f",
"externalRef": "prod_stripe_ent",
"name": "Enterprise",
"description": "For large teams.",
"features": [
{ "description": "Unlimited users", "type": "INCLUDE" }
],
"intervals": [
{ "planIntervalId": "019525fd-7e40-7c5a-b2d8-4e6f8a0c2e4a", "planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f", "externalRef": "price_stripe_m7", "interval": "MONTHLY", "amount": 19900, "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" }
],
"highlight": false,
"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 plano de billing com intervalos de preco e definicoes de funcionalidades.
curl --request POST \
--url https://api.example.com/plans \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"highlight": true,
"features": [
{
"description": "<string>",
"type": "<string>"
}
],
"intervals": [
{
"interval": "<string>",
"amount": 123,
"currency": "<string>"
}
]
}
'{
"planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f",
"externalRef": "prod_stripe_ent",
"name": "Enterprise",
"description": "For large teams.",
"features": [
{ "description": "Unlimited users", "type": "INCLUDE" }
],
"intervals": [
{ "planIntervalId": "019525fd-7e40-7c5a-b2d8-4e6f8a0c2e4a", "planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f", "externalRef": "price_stripe_m7", "interval": "MONTHLY", "amount": 19900, "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" }
],
"highlight": false,
"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"
}
plan:write.{
"planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f",
"externalRef": "prod_stripe_ent",
"name": "Enterprise",
"description": "For large teams.",
"features": [
{ "description": "Unlimited users", "type": "INCLUDE" }
],
"intervals": [
{ "planIntervalId": "019525fd-7e40-7c5a-b2d8-4e6f8a0c2e4a", "planId": "019525fd-6b2c-7a1e-9d4f-3c5e7a9b1d3f", "externalRef": "price_stripe_m7", "interval": "MONTHLY", "amount": 19900, "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" }
],
"highlight": false,
"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/plans \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro",
"description": "For growing teams",
"highlight": true,
"features": [
{
"description": "Unlimited projects",
"type": "INCLUDE"
}
],
"intervals": [
{
"interval": "MONTHLY",
"amount": 2999,
"currency": "BRL"
}
]
}'
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
500 | internal_server_error | Ocorreu um erro inesperado |