Marketing

Banners

Includes disponíveis: categories, collections, promotions, product

Listar banners

GET https://api.dooki.com.br/v2/{alias}/marketing/banners

Request

{
    "active": true,
    "home": true,
    "name": "Banner test",
    "link": "http://link.com",
    "image_url": "https://image-url.com/image.jpg",
    "start_at": "2017-05-06 00:00:00",
    "end_at": "2017-05-06 00:00:00",
    "categories_ids": [1, 2, 3],
    "collections_ids": [1, 2, 3],
    "promotions_ids": [1, 2, 3]
}

Response

{
    "data": {
        "id": 41,
        "active": true,
        "home": true,
        "name": "Banner test",
        "slug": "banner-test",
        "image_url": "https://image-url.com/image.jpg",
        "link": "http://link.com",
        "expired": true,
        "start_at": {
            "date": "2014-06-03 23:57:00.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "end_at": {
            "date": "2020-06-03 23:57:00.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
    }
}

Criar banner

POST https://api.dooki.com.br/v2/{alias}/marketing/banners

Ordenar banners

PUT https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}

Request de ordenação de banners

{
    "sorting": [
        {
            "group": "categories",
            "resource_id": 1,
            "orders": [1234, 123, 12334]
        },
        {
            "group": "promotions",
            "resource_id": 5,
            "orders": [1234, 123, 12334]
        }
    ]
}

Visualizar banner

GET https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}

Atualizar banner

PUT https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}

Excluir banner

DELETE https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}

Lista de promoções que o banner pertence

GET https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}/promotions

Lista de coleções que o banner pertence

GET https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}/collections

Lista de categorias que o banner pertence

GET https://api.dooki.com.br/v2/{alias}/marketing/banners/{id}/categories

Atualizado