POST
/api/v1/offersCriar Oferta
Cria uma nova oferta vinculada a um dos seus produtos. Slug normalizado automaticamente.
Escopowrite + offers
Corpo da requisição
| Parâmetro | Tipo | Descrição |
|---|---|---|
product_id required | uuid | ID do produto. |
name required | string | Nome interno. |
price required | number | Preço final. |
checkout_url required | string | Slug do checkout (será normalizado: a-z, 0-9 e hífens). |
description | string | Descrição opcional. |
allow_pix | boolean | Padrão true. |
allow_credit_card | boolean | Padrão true. |
allow_boleto | boolean | Padrão false. |
require_address | boolean | Padrão false. |
max_installments | integer | Padrão 12. |
installments_without_interest | integer | Até quantas parcelas sem juros (padrão 1). |
interest_rate | number | Juros mensal % (padrão 0). |
min_installment_value | number | Padrão 5. |
is_subscription | boolean | Padrão false. |
subscription_interval | string | monthly | quarterly | semiannual | annual. |
Exemplo de requisição
bash
curl -X POST https://devexpay-v3.vercel.app/api/v1/offers \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"product_id": "252735b3-...",
"name": "Curso Python — Black Friday",
"price": 297.00,
"checkout_url": "curso-python-bf"
}'Resposta
json
{
"id": "cdc93c57-...",
"product_id": "252735b3-...",
"name": "Curso Python — Black Friday",
"price": 297.00,
"checkout_url": "curso-python-bf",
"allow_pix": true,
"allow_credit_card": true,
"status": "active",
"created_at": "2026-06-08T11:00:00Z"
}Erros possíveis
| Status | Descrição |
|---|---|
| 400 | Campos obrigatórios faltando. |
| 404 | product_id não pertence à sua conta. |