curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{
"type": "redirect",
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{ "is_active": false }' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
{
"success": true,
"message": "Upsell atualizado com sucesso",
"data": {
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"type": "redirect",
"title": "Oferta relâmpago",
"description": null,
"display_order": 0,
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 },
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:10:00.000Z"
}
}
Upsells
Atualizar upsell
Atualiza um upsell da ação, incluindo troca de tipo
PUT
/
v1
/
raffles
/
{id}
/
upsells
/
{upsell_id}
curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{
"type": "redirect",
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{ "is_active": false }' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
{
"success": true,
"message": "Upsell atualizado com sucesso",
"data": {
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"type": "redirect",
"title": "Oferta relâmpago",
"description": null,
"display_order": 0,
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 },
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:10:00.000Z"
}
}
Atualização parcial: envie apenas os campos que deseja alterar. Aceita os mesmos campos do criar upsell, todos opcionais.
Regras de tipo e configuração:
- Os objetos
redirect/custom/iframesão substituição total — envie o objeto completo, nunca parcial. - Trocar o
typeexige a configuração do novo tipo na mesma requisição (a configuração armazenada pertence ao tipo antigo). Ex.: mudar pararedirectsem enviarredirect: {...}retornaUPSELL_REDIRECT_CONFIG_REQUIRED; mudar parasimpleexige o objetosimple: { button_text, button_url }. - Enviar um objeto de configuração que não corresponde ao tipo (atual ou enviado) retorna
UPSELL_CONFIG_TYPE_MISMATCH.
Path params
string
required
ID da ação (UUID).
string
required
ID do upsell (UUID).
Erros
| HTTP | Código | Quando ocorre |
|---|---|---|
404 | UPSELL_NOT_FOUND | Upsell inexistente, de outra ação ou de outra conta |
400 | NO_FIELDS_TO_UPDATE | Nenhum campo enviado |
400 | demais códigos UPSELL_* | Mesmas regras de validação do criar |
curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{
"type": "redirect",
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 }
}' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
curl -u "pb_xxx:sk_xxx" -X PUT \
-H "Content-Type: application/json" \
-d '{ "is_active": false }' \
"https://api.sortify.com.br/v1/raffles/{id}/upsells/{upsell_id}"
{
"success": true,
"message": "Upsell atualizado com sucesso",
"data": {
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"type": "redirect",
"title": "Oferta relâmpago",
"description": null,
"display_order": 0,
"redirect": { "to": "https://upsell.cliente.digital", "timeout": 0 },
"is_active": true,
"created_at": "2026-07-06T12:00:00.000Z",
"updated_at": "2026-07-06T12:10:00.000Z"
}
}