curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/upsells \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '{
"active": true,
"name": "Combo Protetor + Película",
"description": "Aproveite e proteja seu smartphone com esse combo especial",
"email_subject": "Não perca essa oferta especial para seu produto!",
"sms": "Aproveite 20% OFF no combo protetor + película para seu smartphone! Clique aqui: {link}",
"type": "product",
"context": "before",
"discount_type": "percentage",
"discount_amount": 20,
"product_price": 40,
"product_quantity": 2,
"purchased_product_id": 30562853,
"suggested_product_id": 34025022
}'
{
"data": [
{
"id": 123,
"purchased_product_id": 123,
"suggested_product_id": 123,
"active": true,
"context": "<string>",
"product_price": 123,
"product_quantity": 123,
"name": "<string>",
"description": "<string>",
"email_subject": "<string>",
"sms": "<string>",
"views": 123
}
]
}
Cria um novo upsell
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/pricing/upsells \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '{
"active": true,
"name": "Combo Protetor + Película",
"description": "Aproveite e proteja seu smartphone com esse combo especial",
"email_subject": "Não perca essa oferta especial para seu produto!",
"sms": "Aproveite 20% OFF no combo protetor + película para seu smartphone! Clique aqui: {link}",
"type": "product",
"context": "before",
"discount_type": "percentage",
"discount_amount": 20,
"product_price": 40,
"product_quantity": 2,
"purchased_product_id": 30562853,
"suggested_product_id": 34025022
}'
{
"data": [
{
"id": 123,
"purchased_product_id": 123,
"suggested_product_id": 123,
"active": true,
"context": "<string>",
"product_price": 123,
"product_quantity": 123,
"name": "<string>",
"description": "<string>",
"email_subject": "<string>",
"sms": "<string>",
"views": 123
}
]
}
Alias da loja
Upsell criado com sucesso
The response is of type object
.
Was this page helpful?