curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "custom",
"title": "Oferta antes de fechar",
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "iframe",
"title": "Oferta parceira",
"iframe": { "type": "card", "url": "https://presell.cliente.digital/" }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"title": "Combo promocional",
"simple": {
"button_text": "Quero o combo",
"button_url": "https://loja.cliente.digital/combo"
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
{
"success": true,
"message": "Presell criado com sucesso",
"data": {
"id": "9e8d7c6b-5a4f-3e2d-1c0b-a9f8e7d6c5b4",
"type": "custom",
"title": "Oferta antes de fechar",
"description": null,
"display_order": 0,
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
},
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:00:00.000Z"
}
}
Presells
Criar presell
Cria uma promoção de presell (simple, custom ou iframe) em uma ação
POST
/
v1
/
raffles
/
{id}
/
presells
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "custom",
"title": "Oferta antes de fechar",
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "iframe",
"title": "Oferta parceira",
"iframe": { "type": "card", "url": "https://presell.cliente.digital/" }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"title": "Combo promocional",
"simple": {
"button_text": "Quero o combo",
"button_url": "https://loja.cliente.digital/combo"
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
{
"success": true,
"message": "Presell criado com sucesso",
"data": {
"id": "9e8d7c6b-5a4f-3e2d-1c0b-a9f8e7d6c5b4",
"type": "custom",
"title": "Oferta antes de fechar",
"description": null,
"display_order": 0,
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
},
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:00:00.000Z"
}
}
Cria um presell na ação — uma promoção exibida na página de seleção do pedido, antes do pagamento. Máximo de 10 presells por ação.
Presell não suporta o tipo
redirect. Redirecionar o comprador enquanto ele monta o pedido interromperia a compra. Tipos válidos: simple, custom e iframe — com o mesmo contrato dos upsells.Path params
string
required
ID da ação (UUID).
Body — campos comuns
string
default:"simple"
simple, custom ou iframe. Omitido = simple.string
required
Título (1–255 caracteres).
string | null
Descrição (máx. 1000).
number
default:"0"
Ordem de exibição (menor = primeiro).
boolean
default:"true"
Se o presell é exibido.
Body — por tipo
simple
object
required
custom
object
required
Show custom
Show custom
string
required
card (dentro da página de seleção) ou fullscreen (tela inteira).string
required
HTML (1–50.000 caracteres). Sanitizado no servidor com as mesmas regras dos upsells: tags de conteúdo,
<style>, class/style e imagens http(s) mantidos; <script>, <iframe>, event handlers e URLs javascript:/data: removidos.string
required
Marcador no formato
{{NOME}}, ex.: {{PRESELL_URL}}. Precisa aparecer no content.string
required
URL http(s) que substituirá o placeholder na renderização.
iframe
object
required
Erros
| HTTP | Código | Quando ocorre |
|---|---|---|
404 | RAFFLE_NOT_FOUND | Ação inexistente ou de outra conta |
400 | PRESELL_LIMIT_REACHED | Já existem 10 presells na ação |
400 | PRESELL_SIMPLE_FIELDS_REQUIRED | tipo simple sem o objeto simple completo |
400 | PRESELL_CUSTOM_CONFIG_REQUIRED | custom sem o objeto custom |
400 | PRESELL_IFRAME_CONFIG_REQUIRED | iframe sem o objeto iframe |
400 | PRESELL_CONFIG_TYPE_MISMATCH | Objeto de configuração não corresponde ao type |
400 | PRESELL_CUSTOM_CONTENT_EMPTY | HTML vazio após sanitização |
400 | PRESELL_PLACEHOLDER_NOT_FOUND | Placeholder não aparece no content |
422 | VALIDATION | Formato inválido — inclusive type: "redirect", que não existe em presells |
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "custom",
"title": "Oferta antes de fechar",
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "iframe",
"title": "Oferta parceira",
"iframe": { "type": "card", "url": "https://presell.cliente.digital/" }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
curl -u "pb_xxx:sk_xxx" -X POST \
-H "Content-Type: application/json" \
-d '{
"title": "Combo promocional",
"simple": {
"button_text": "Quero o combo",
"button_url": "https://loja.cliente.digital/combo"
}
}' \
"https://api.sortify.com.br/v1/raffles/{id}/presells"
{
"success": true,
"message": "Presell criado com sucesso",
"data": {
"id": "9e8d7c6b-5a4f-3e2d-1c0b-a9f8e7d6c5b4",
"type": "custom",
"title": "Oferta antes de fechar",
"description": null,
"display_order": 0,
"custom": {
"type": "card",
"content": "<h1>Leve mais por menos!</h1><a href=\"{{PRESELL_URL}}\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">Aproveitar</a>",
"url": { "placeholder": "{{PRESELL_URL}}", "value": "https://presell.cliente.digital/" }
},
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:00:00.000Z"
}
}