Cupons de desconto
Includes disponíveis: customer, categories, collections, brand, products, payments
Listar cupons
GET https://api.dooki.com.br/v2/{alias}/pricing/promocodes
Request
{
"code": "TEST",
"customer_id": null,
"active": true,
"discount_type": "p",
"newsletter": false,
"ignore_promotion_products": false,
"free_shipment": false,
"abandoned_cart": false,
"once_per_customer": false,
"for_the_price_of": false,
"accumulate": false,
"min_value": 99.99,
"value": 10,
"price_products": 0,
"quantity": 100000,
"start_at": "2017-09-09 00:00:00",
"end_at": "2017-09-13 00:00:00",
"payments_ids": [1, 2, 3, 4],
"restrictions": {
"include": {
"products_ids": [1,2,3,4,5,6],
"brands_ids": [],
"collections_ids": [],
"categories_ids": []
},
"exclude": {
"products_ids": [10,12],
"brands_ids": [],
"collections_ids": [],
"categories_ids": []
},
}
}
Response
{
"data": [
{
"id": 1,
"code": "TEST",
"customer_id": null,
"active": true,
"discount_type": "p",
"newsletter": false,
"ignore_promotion_products": false,
"free_shipment": false,
"abandoned_cart": false,
"once_per_customer": false,
"for_the_price_of": false,
"accumulate": false,
"min_value": 99.99,
"value": 10,
"price_products": 0,
"quantity": 100000,
"used": 22,
"use_percent": 0.02,
"expired": true,
"total_customers_used": 22,
"start_at": {
"date": "2016-05-09 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2016-12-31 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"customer": {
"data": []
},
"payments": {
"data": []
},
"restrictions": {
"include": {
"products_ids": [1,2,3,4,5,6],
"brands_ids": [],
"collections_ids": [],
"categories_ids": []
},
"exclude": {
"products_ids": [10,12],
"brands_ids": [],
"collections_ids": [],
"categories_ids": []
},
"include_ids": [1,2,3,4,5],
"exclude_ids": [1,2,3,4,5],
}
},
]
}
Criar cupom
POST https://api.dooki.com.br/v2/{alias}/pricing/promocodes
Visualizar cupom
GET https://api.dooki.com.br/v2/{alias}/pricing/promocodes/{id}
Atualizar cupom
PUT https://api.dooki.com.br/v2/{alias}/pricing/promocodes/{id}
Excluir cupom
DELETE https://api.dooki.com.br/v2/{alias}/pricing/promocodes/{id}
Lista de clientes que usaram o cupom
GET https://api.dooki.com.br/v2/{alias}/pricing/promocodes/{id}/customers
Frete grátis
Listar regras de frete grátis
GET https://api.dooki.com.br/v2/{alias}/pricing/free-shipment
Request
{
"rules": [
{
"uf": "SP",
"min": 199,
"shipment_service_id": 6,
"service_name": "pac"
},
{
"uf": "MG",
"min": 199,
"shipment_service_id": 6,
"service_name": "sedex"
}
]
}
Response
{
"data": [
{
"id": 2,
"shipment_service_id": 6,
"service_name": "sedex",
"min": 199,
"uf": "MG"
},
{
"id": 1,
"shipment_service_id": 6,
"service_name": "pac",
"min": 199,
"uf": "SP"
}
],
"excluded_brands_ids": [],
"excluded_categories_ids": [],
"excluded_products_ids": [
31055
],
// Este objeto retorna todos os IDS dos produtos reunidos.
"excluded_products_ids_merged": [
31055
],
}
Criar ou atualizar regras de frete grátis
POST https://api.dooki.com.br/v2/{alias}/pricing/free-shipment
Desconto progressivo
Listar descontos progressivos
GET https://api.dooki.com.br/v2/{alias}/pricing/progressive-discounts
Request
{
"active": true,
"min_value": 0,
"max_value": 100,
"start_at": "2017-07-02 10:00",
"end_at": "2018-08-17 12:00",
"percent": 5
}
Response
{
"data": {
"id": 1,
"active": true,
"min_value": 0,
"max_value": 100,
"start_at": "2017-07-02 10:00",
"end_at": "2018-08-17 12:00",
"percent": 5
}
}
Criar desconto progressivo
POST https://api.dooki.com.br/v2/{alias}/pricing/progressive-discounts
Promoções de produtos
Includes disponíveis: categories, collections, brands, products, banners
Listar promoções
GET https://api.dooki.com.br/v2/{alias}/pricing/promotions
Request
{
"active": true,
"all_products": false,
"utm_only": true,
"utm_source": "google",
"utm_campaign": "adwords",
"name": "Test",
"start_at": "2017-08-08 00:00:00",
"end_at": "2017-08-08 00:00:00",
"banners_ids": [1, 2, 3, 4],
}
Response
{
"data": [
{
"active": true,
"all_products": false,
"utm_only": true,
"utm_source": "google",
"utm_campaign": "adwords",
"name": "Test",
"start_at": "2017-08-08 00:00:00",
"end_at": "2017-08-08 00:00:00",
"expired": true,
"url": "https://www.domain.com/promocoes/test",
"start_at": {
"date": "2016-05-09 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2016-12-31 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"banners": {
"data": []
}
},
]
}
Criar promoção
POST https://api.dooki.com.br/v2/{alias}/pricing/promotions
Visualizar promoção
GET https://api.dooki.com.br/v2/{alias}/pricing/promotions/{id}
Atualizar promoção
PUT https://api.dooki.com.br/v2/{alias}/pricing/promotions/{id}
Excluir promoção
DELETE https://api.dooki.com.br/v2/{alias}/pricing/promotions/{id}
Lista de produtos da promoção
GET https://api.dooki.com.br/v2/{alias}/pricing/promotions/{id}/products
Combos (compre junto)
Includes disponíveis: products
Listar combos
GET https://api.dooki.com.br/v2/{alias}/pricing/combos
Request
{
"active": true,
"discount_type": "p",
"name": "Combo test",
"start_at": "2017-08-08 00:00:00",
"end_at": "2017-08-08 00:00:00",
"discount_value": 10,
"products_ids": [1, 2, 3, 4],
}
Response
{
"data": [
{
"id": 1,
"active": true,
"type_increment_value": "p",
"discount_value": 10,
"name": "Combo test",
"description": null,
"expired": true,
"total_products": 4,
"start_at": {
"date": "2016-05-09 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2016-12-31 09:51:00.000000",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"products": {
"data": []
},
},
]
}
Criar combo
POST https://api.dooki.com.br/v2/{alias}/pricing/combos
Visualizar combo
GET https://api.dooki.com.br/v2/{alias}/pricing/combos/{id}
Atualizar combo
PUT https://api.dooki.com.br/v2/{alias}/pricing/combos/{id}
Excluir combo
DELETE https://api.dooki.com.br/v2/{alias}/pricing/combos/{id}