PromotedBanner


Banner promocional para mostrar a clientes.

Modelo PromotedBanner

{
    "id": 1,
    "banner_url": "http://127.0.0.1:8000/storage/static/default/cover_company.png",
    "action": "view",
    "target_type": "company",
    "target_id": 3,
    "created_at": "2020-11-09 19:13:53",
    "updated_at": "2020-11-09 19:54:28",
    "in_order": 1,
    "enabled": false,
    "name": "banner_1604949233",
    "description": null,
    "hour_from": "16:00",
    "hour_to": "23:59"
}

Insertar PromotedBanner

Método URI Cabeceras
POST /companies/{companyId}/promoted-banners Authorization
{
    "action": "required|string|in:view",
    "target_type": "required|string|in:company,branch_group,good,branch_category",
    "target_id": "required|integer",
    "in_order": "integer",
    "enabled": "boolean",
    "name": "string|max:64",
    "description": "string|max:255",
    "hour_from": {
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    },
    "hour_to": {
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    },
    "tz": {
        "string": true,
        "regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    }
}

Listar PromotedBanner

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/promoted-banners N/A

Mostrar PromotedBanner

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/promoted-banners/{promotedBannerId} N/A

Actualizar PromotedBanner

Método URI Cabeceras
PATCH /companies/{companyId}/promoted-banners/{promotedBannerId} Authorization
{
    "action": "string|in:view",
    "target_type": "string|in:company,branch_group,good,branch_category",
    "target_id": "integer",
    "in_order": "integer",
    "enabled": "boolean",
    "name": "string|max:64",
    "description": "string|max:255",
    "hour_from": {
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    },
    "hour_to": {
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    },
    "tz": {
        "string": true,
        "regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
    }
}

Vincular PromotedBanner

Vincular PromotedBanner de BranchCategory

Método URI Cabeceras
PUT /companies/{companyId}/branch-categories/{branchCategoryId}/promoted-banners/{promotedBannerId} Authorization

Desvincular PromotedBanner

Desvincular PromotedBanner de BranchCategory

Método URI Cabeceras
DELETE /companies/{companyId}/branch-categories/{branchCategoryId}/promoted-banners/{promotedBannerId} Authorization

Eliminar PromotedBanner

Método URI Cabeceras
DELETE /companies/{companyId}/promoted-banners/{promotedBannerId} Authorization

Acciones de PromotedBanner

Upload Banner

Método URI Cabeceras
POST /companies/{companyId}/promoted-banners/{promotedBannerId}/upload-banner Authorization
{
    "image": "required|image|mimes:jpeg,png,bmp|max:8192|dimensions:min_width=2160,min_height=868"
}

Enlaces de PromotedBanner