Produtos

Filtros

Pode-se utilizar filtros para restringir o retorno de dados. São utilizados, passando um parâmetro na URL requisitada. Observe a tabela de possíveis filtros abaixo

ParamDescriçãoTipoValoresEx
idsFiltra pedidos pelo idstring
?ids=1,2,3
nameFiltra produto pelo nomestring?name=produto
activeFiltra produto ativostring?active=1
category_idFiltra produto pelo ID da categoriastring?category_id=29

Criar Produto

POST https://api.dooca.store/products

Body
{
    "category_default_id": "1",
    "brand_id": null,
    "hotsite_id": null,
    "name": "Produto teste",
    "description": "Descrição do produto",
    "short_description": "short desc",
    "relevance": "1",
    "tags": "oi,produto,sei,la",
    "min_quantity": "1",
    "sell_in_kit_only": "0",
    "meta_title": "teste",
    "meta_description": "teste",
    "meta_keywords": "teste",
    "kit": "0",
    "kit_markup": "1",
    "weight": "1.222",
    "depth": "2.0",
    "width": "3.0",
    "height": "4.0",
    "sell_out_of_stock": "1",
    "price_out_of_stock": "20.00",
    "additional_time_out_of_stock": "2",
    "price": "15.00",
    "price_compare": "19.90",
    "billet_discount": "10",
    "warranty": "não tem garantia",
    "model": "modelo dooca",
    "gender": "male",
    "stock_location": "sem localizacao",
    "active": "1",
    "images": [{
    	"src": "http://imagens.sharkshop.com.br/tramontina/20048040EBM001B.jpg"
    },{
    	"src": "https://imgcentauro-a.akamaihd.net/900x900/911552NH/tenis-nike-star-runner-feminino-infantil-img.jpg"
    }],
    "variations": [{
		"color_id": null,
		"attribute_value_id": null,
		"reference": "referencia",
		"price": "10.00",
		"price_compare": "14.90",
		"balance": "5",
		"active": 0
    }],
    "category_ids": [1,2,3],
    "feature_ids": [1,2,3],
    "carrie_exclude_ids": [1,2,3]
}
Status: 201

Criar Produto (KIT)

POST https://api.dooca.store/products

Body
{
    "name": "Kit teste",
    "kit": 1,
    "active": true,
    "#components": [{
        "grid_id": "1-2"
    },{
        "grid_id": "2-7"
    },{
        "grid_id": "3-7"
    },{
        "grid_id": "4-2"
    }],
    "components": [{
        "grid_id": "1-2",
        "product_component_group_id": "1",
        "quantity": "1"
    },{
        "grid_id": "2-7",
        "product_component_group_id": "1",
        "quantity": "1"
    },{
        "grid_id": "3-7",
        "product_component_group_id": "1",
        "quantity": "1",
        "default": "1"
    },{
        "grid_id": "4-2",
        "product_component_group_id": "1",
        "quantity": "1"
    },{
        "grid_id": "7",
        "product_component_group_id": "1",
        "quantity": "1"
    },{
        "grid_id": "8-11",
        "product_component_group_id": "3",
        "quantity": "1"
    },{
        "grid_id": "10",
        "product_component_group_id": "3",
        "quantity": "1"
    },{
        "grid_id": "13-14",
        "product_component_group_id": "3",
        "quantity": "1"
    },{
        "grid_id": "14-3",
        "product_component_group_id": "3",
        "quantity": "1",
        "default": "1"
    },{
        "grid_id": "17",
        "product_component_group_id": "3",
        "quantity": "1"
    },{
        "grid_id": "18-8",
        "product_component_group_id": "3",
        "quantity": "1"
    },{
        "grid_id": "25-12",
        "product_component_group_id": "7",
        "quantity": "1"
    },{
        "grid_id": "25-12",
        "product_component_group_id": "7",
        "quantity": "2"
    },{
        "grid_id": "25-12",
        "product_component_group_id": "7",
        "quantity": "4",
        "default": "1"
    }]
}
Status: 201

Editar Produto

PUT https://api.dooca.store/products/:id

Parâmetro: O ID do produto.

A edição do registro pode ser parcial ou total.

{
  "name": "Novo nome do Produto"
}
Status: 200

Deletar Produto

DELETE https://api.dooca.store/products/:id

Parâmetro: O ID do produto.

Response: 204

Consultar Produto

GET https://api.dooca.store/products/:id

Parâmetro: O ID do produto.

HTTP STATUS: 200 OK
{
    "id": 163,
    "external_id": null,
    "category_default_id": 32,
    "brand_id": 1,
    "hotsite_id": null,
    "name": "Cópia de bola de futebol",
    "slug": "copia-de-bola-de-futebol",
    "url": "http://loja.dooca.local/copia-de-bola-de-futebol",
    "description": "<p>bola de futebol</p>",
    "short_description": null,
    "relevance": 1,
    "tags": null,
    "min_quantity": 1,
    "max_quantity": null,
    "sell_in_kit_only": false,
    "meta_title": null,
    "meta_description": null,
    "meta_keywords": null,
    "kit": false,
    "kit_markup": 1,
    "is_virtual": false,
    "images": [],
    "attachments": [],
    "video": null,
    "weight": null,
    "depth": null,
    "width": null,
    "height": null,
    "sell_out_of_stock": false,
    "price_out_of_stock": null,
    "additional_time_out_of_stock": null,
    "price": "30.00",
    "price_compare": "50.00",
    "billet_discount": null,
    "warranty": null,
    "model": null,
    "gender": null,
    "age_group": null,
    "stock_location": null,
    "st": false,
    "ncm": null,
    "ipi": null,
    "active": true,
    "has_gift_wrapping": true,
    "created_at": "2020-03-19 17:18:31",
    "updated_at": "2020-03-23 14:07:45",
    "brand": {
        "id": 1,
        "external_id": null,
        "hotsite_id": null,
        "name": "Nike",
        "slug": "nike",
        "description": null,
        "short_description": null,
        "image": null,
        "banner": null,
        "meta_title": null,
        "meta_keywords": null,
        "meta_description": null,
        "position": 1,
        "url": "http://loja.dooca.local/nike",
        "active": true,
        "created_at": "2020-01-29 11:54:06",
        "updated_at": "2020-01-29 11:54:06"
    },
    "category_default": {
        "id": 32,
        "parent_id": null,
        "hotsite_id": null,
        "external_id": null,
        "name": "string",
        "slug": "string",
        "description": null,
        "image": null,
        "banner": null,
        "banner_link": null,
        "position": null,
        "depth": 1,
        "breadcrumb": "string",
        "google_taxonomy_id": null,
        "meta_title": null,
        "meta_keywords": null,
        "meta_description": null,
        "url": "http://loja.dooca.local/string",
        "active": true,
        "created_at": "2020-03-09 16:06:30",
        "updated_at": "2020-03-09 16:06:30"
    },
    "categories": [
        {
            "id": 32,
            "parent_id": null,
            "hotsite_id": null,
            "external_id": null,
            "name": "string",
            "slug": "string",
            "description": null,
            "image": null,
            "banner": null,
            "banner_link": null,
            "position": null,
            "depth": 1,
            "breadcrumb": "string",
            "google_taxonomy_id": null,
            "meta_title": null,
            "meta_keywords": null,
            "meta_description": null,
            "url": "http://loja.dooca.local/string",
            "active": true,
            "created_at": "2020-03-09 16:06:30",
            "updated_at": "2020-03-09 16:06:30"
        },
        {
            "id": 34,
            "parent_id": 32,
            "hotsite_id": null,
            "external_id": null,
            "name": "string2",
            "slug": "string2",
            "description": null,
            "image": null,
            "banner": null,
            "banner_link": null,
            "position": null,
            "depth": 2,
            "breadcrumb": "string > string2",
            "google_taxonomy_id": 772,
            "meta_title": null,
            "meta_keywords": null,
            "meta_description": null,
            "url": "http://loja.dooca.local/string2",
            "active": true,
            "created_at": "2020-03-12 15:17:45",
            "updated_at": "2020-03-12 15:17:45"
        }
    ],
    "features": [
        {
            "id": 1,
            "external_id": null,
            "name": "estilo",
            "slug": "estilo",
            "image": null,
            "active": true,
            "created_at": "2020-03-12 18:13:23",
            "updated_at": "2020-03-18 08:54:39",
            "values": [
                {
                    "id": 4,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "couro",
                    "slug": "couro",
                    "image": null,
                    "position": 1,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                },
                {
                    "id": 5,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "ouro",
                    "slug": "ouro",
                    "image": null,
                    "position": 3,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                },
                {
                    "id": 6,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "metal",
                    "slug": "metal",
                    "image": null,
                    "position": 2,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                }
            ]
        },
        {
            "id": 3,
            "external_id": null,
            "name": "Linha",
            "slug": "linha",
            "image": null,
            "active": true,
            "created_at": "2020-03-20 14:23:52",
            "updated_at": "2020-03-20 14:23:52",
            "values": [
                {
                    "id": 7,
                    "feature_id": 3,
                    "external_id": null,
                    "name": "Jovem",
                    "slug": "jovem",
                    "image": null,
                    "position": 1,
                    "active": true,
                    "created_at": "2020-03-20 14:23:52",
                    "updated_at": "2020-03-20 14:23:52"
                }
            ]
        }
    ],
    "exclude_carriers": [],
    "components": [],
    "variations": [
        {
            "id": 173,
            "product_id": 163,
            "color_id": 1,
            "grid_id": "163-1",
            "color_secondary_id": null,
            "attribute_value_id": 1,
            "attribute_value_secondary_id": null,
            "external_id": null,
            "reference": null,
            "sku": null,
            "gtin": "234234",
            "mpn": "2342",
            "price": "30.00",
            "price_compare": null,
            "additional_shipping_time": null,
            "images": null,
            "position": null,
            "created_at": "2020-03-19 17:18:31",
            "updated_at": "2020-03-23 14:07:45",
            "active": true,
            "balance": 0,
            "reserved_balance": 0,
            "color": {
                "id": 1,
                "external_id": null,
                "name": "cor cinza",
                "slug": "cor-cinza",
                "hexadecimal": "#acadae",
                "image": null,
                "position": null,
                "active": true,
                "created_at": "2020-03-12 18:08:34",
                "updated_at": "2020-03-12 18:08:34"
            },
            "attribute": {
                "id": 1,
                "attribute_id": 2,
                "attribute_name": "peso",
                "external_id": null,
                "name": "2kg",
                "slug": "2kg",
                "position": 1,
                "active": true,
                "created_at": "2020-03-12 16:52:32",
                "updated_at": "2020-03-12 16:52:32"
            },
            "attribute_secondary": null,
            "url": "http://loja.dooca.local/copia-de-bola-de-futebol/cor-cinza"
        },
        {
            "id": 178,
            "product_id": 163,
            "color_id": 3,
            "grid_id": "163-3",
            "color_secondary_id": null,
            "attribute_value_id": 1,
            "attribute_value_secondary_id": null,
            "external_id": null,
            "reference": null,
            "sku": null,
            "gtin": null,
            "mpn": null,
            "price": null,
            "price_compare": null,
            "additional_shipping_time": null,
            "images": null,
            "position": null,
            "created_at": "2020-03-20 15:16:42",
            "updated_at": "2020-03-20 15:57:25",
            "active": true,
            "balance": 0,
            "reserved_balance": 0,
            "color": {
                "id": 3,
                "external_id": null,
                "name": "preto",
                "slug": "preto",
                "hexadecimal": "#3e120c",
                "image": null,
                "position": null,
                "active": true,
                "created_at": "2020-03-16 17:45:49",
                "updated_at": "2020-03-16 17:45:49"
            },
            "attribute": {
                "id": 1,
                "attribute_id": 2,
                "attribute_name": "peso",
                "external_id": null,
                "name": "2kg",
                "slug": "2kg",
                "position": 1,
                "active": true,
                "created_at": "2020-03-12 16:52:32",
                "updated_at": "2020-03-12 16:52:32"
            },
            "attribute_secondary": null,
            "url": "http://loja.dooca.local/copia-de-bola-de-futebol/preto"
        }
    ]
}

Listar Produtos

GET https://api.dooca.store/products

HTTP STATUS: 200 OK  
{
    "id": 163,
    "external_id": null,
    "category_default_id": 32,
    "brand_id": 1,
    "hotsite_id": null,
    "name": "Cópia de bola de futebol",
    "slug": "copia-de-bola-de-futebol",
    "url": "http://loja.dooca.local/copia-de-bola-de-futebol",
    "description": "<p>bola de futebol</p>",
    "short_description": null,
    "relevance": 1,
    "tags": null,
    "min_quantity": 1,
    "max_quantity": null,
    "sell_in_kit_only": false,
    "meta_title": null,
    "meta_description": null,
    "meta_keywords": null,
    "kit": false,
    "kit_markup": 1,
    "is_virtual": false,
    "images": [],
    "attachments": [],
    "video": null,
    "weight": null,
    "depth": null,
    "width": null,
    "height": null,
    "sell_out_of_stock": false,
    "price_out_of_stock": null,
    "additional_time_out_of_stock": null,
    "price": "30.00",
    "price_compare": "50.00",
    "billet_discount": null,
    "warranty": null,
    "model": null,
    "gender": null,
    "age_group": null,
    "stock_location": null,
    "st": false,
    "ncm": null,
    "ipi": null,
    "active": true,
    "has_gift_wrapping": true,
    "created_at": "2020-03-19 17:18:31",
    "updated_at": "2020-03-23 14:07:45",
    "brand": {
        "id": 1,
        "external_id": null,
        "hotsite_id": null,
        "name": "Nike",
        "slug": "nike",
        "description": null,
        "short_description": null,
        "image": null,
        "banner": null,
        "meta_title": null,
        "meta_keywords": null,
        "meta_description": null,
        "position": 1,
        "url": "http://loja.dooca.local/nike",
        "active": true,
        "created_at": "2020-01-29 11:54:06",
        "updated_at": "2020-01-29 11:54:06"
    },
    "category_default": {
        "id": 32,
        "parent_id": null,
        "hotsite_id": null,
        "external_id": null,
        "name": "string",
        "slug": "string",
        "description": null,
        "image": null,
        "banner": null,
        "banner_link": null,
        "position": null,
        "depth": 1,
        "breadcrumb": "string",
        "google_taxonomy_id": null,
        "meta_title": null,
        "meta_keywords": null,
        "meta_description": null,
        "url": "http://loja.dooca.local/string",
        "active": true,
        "created_at": "2020-03-09 16:06:30",
        "updated_at": "2020-03-09 16:06:30"
    },
    "categories": [
        {
            "id": 32,
            "parent_id": null,
            "hotsite_id": null,
            "external_id": null,
            "name": "string",
            "slug": "string",
            "description": null,
            "image": null,
            "banner": null,
            "banner_link": null,
            "position": null,
            "depth": 1,
            "breadcrumb": "string",
            "google_taxonomy_id": null,
            "meta_title": null,
            "meta_keywords": null,
            "meta_description": null,
            "url": "http://loja.dooca.local/string",
            "active": true,
            "created_at": "2020-03-09 16:06:30",
            "updated_at": "2020-03-09 16:06:30"
        },
        {
            "id": 34,
            "parent_id": 32,
            "hotsite_id": null,
            "external_id": null,
            "name": "string2",
            "slug": "string2",
            "description": null,
            "image": null,
            "banner": null,
            "banner_link": null,
            "position": null,
            "depth": 2,
            "breadcrumb": "string > string2",
            "google_taxonomy_id": 772,
            "meta_title": null,
            "meta_keywords": null,
            "meta_description": null,
            "url": "http://loja.dooca.local/string2",
            "active": true,
            "created_at": "2020-03-12 15:17:45",
            "updated_at": "2020-03-12 15:17:45"
        }
    ],
    "features": [
        {
            "id": 1,
            "external_id": null,
            "name": "estilo",
            "slug": "estilo",
            "image": null,
            "active": true,
            "created_at": "2020-03-12 18:13:23",
            "updated_at": "2020-03-18 08:54:39",
            "values": [
                {
                    "id": 4,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "couro",
                    "slug": "couro",
                    "image": null,
                    "position": 1,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                },
                {
                    "id": 5,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "ouro",
                    "slug": "ouro",
                    "image": null,
                    "position": 3,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                },
                {
                    "id": 6,
                    "feature_id": 1,
                    "external_id": null,
                    "name": "metal",
                    "slug": "metal",
                    "image": null,
                    "position": 2,
                    "active": true,
                    "created_at": "2020-03-18 08:54:39",
                    "updated_at": "2020-03-18 08:54:39"
                }
            ]
        },
        {
            "id": 3,
            "external_id": null,
            "name": "Linha",
            "slug": "linha",
            "image": null,
            "active": true,
            "created_at": "2020-03-20 14:23:52",
            "updated_at": "2020-03-20 14:23:52",
            "values": [
                {
                    "id": 7,
                    "feature_id": 3,
                    "external_id": null,
                    "name": "Jovem",
                    "slug": "jovem",
                    "image": null,
                    "position": 1,
                    "active": true,
                    "created_at": "2020-03-20 14:23:52",
                    "updated_at": "2020-03-20 14:23:52"
                }
            ]
        }
    ],
    "exclude_carriers": [],
    "components": [],
    "variations": [
        {
            "id": 173,
            "product_id": 163,
            "color_id": 1,
            "grid_id": "163-1",
            "color_secondary_id": null,
            "attribute_value_id": 1,
            "attribute_value_secondary_id": null,
            "external_id": null,
            "reference": null,
            "sku": null,
            "gtin": "234234",
            "mpn": "2342",
            "price": "30.00",
            "price_compare": null,
            "additional_shipping_time": null,
            "images": null,
            "position": null,
            "created_at": "2020-03-19 17:18:31",
            "updated_at": "2020-03-23 14:07:45",
            "active": true,
            "balance": 0,
            "reserved_balance": 0,
            "color": {
                "id": 1,
                "external_id": null,
                "name": "cor cinza",
                "slug": "cor-cinza",
                "hexadecimal": "#acadae",
                "image": null,
                "position": null,
                "active": true,
                "created_at": "2020-03-12 18:08:34",
                "updated_at": "2020-03-12 18:08:34"
            },
            "attribute": {
                "id": 1,
                "attribute_id": 2,
                "attribute_name": "peso",
                "external_id": null,
                "name": "2kg",
                "slug": "2kg",
                "position": 1,
                "active": true,
                "created_at": "2020-03-12 16:52:32",
                "updated_at": "2020-03-12 16:52:32"
            },
            "attribute_secondary": null,
            "url": "http://loja.dooca.local/copia-de-bola-de-futebol/cor-cinza"
        },
        {
            "id": 178,
            "product_id": 163,
            "color_id": 3,
            "grid_id": "163-3",
            "color_secondary_id": null,
            "attribute_value_id": 1,
            "attribute_value_secondary_id": null,
            "external_id": null,
            "reference": null,
            "sku": null,
            "gtin": null,
            "mpn": null,
            "price": null,
            "price_compare": null,
            "additional_shipping_time": null,
            "images": null,
            "position": null,
            "created_at": "2020-03-20 15:16:42",
            "updated_at": "2020-03-20 15:57:25",
            "active": true,
            "balance": 0,
            "reserved_balance": 0,
            "color": {
                "id": 3,
                "external_id": null,
                "name": "preto",
                "slug": "preto",
                "hexadecimal": "#3e120c",
                "image": null,
                "position": null,
                "active": true,
                "created_at": "2020-03-16 17:45:49",
                "updated_at": "2020-03-16 17:45:49"
            },
            "attribute": {
                "id": 1,
                "attribute_id": 2,
                "attribute_name": "peso",
                "external_id": null,
                "name": "2kg",
                "slug": "2kg",
                "position": 1,
                "active": true,
                "created_at": "2020-03-12 16:52:32",
                "updated_at": "2020-03-12 16:52:32"
            },
            "attribute_secondary": null,
            "url": "http://loja.dooca.local/copia-de-bola-de-futebol/preto"
        }
    ],
.    "links": {
        "first": "http://api.dooca.local/products?page=1",
        "last": "http://api.dooca.local/products?page=15",
        "prev": null,
        "next": "http://api.dooca.local/products?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 15,
        "path": "http://api.dooca.local/products",
        "per_page": 25,
        "to": 25,
        "total": 1
    }
}

Marcadores