BranchGood


Representa a una Asociación de un Good con un Branch. Esto permite a un Branch poder listar sus propios productos. Cuando un Branch es asignado a un Good, todas las Properties asociadas son asignadas en cascada, tomando los valores por defecto definidos en la entidad GoodProperty. A diferencia del Good, un BranchGood posee datos de stock y precio de venta personalizado según el cliente que solicita la lista (véase BranchPriceList).

Modelo BranchGood

{
    "id": 1,
    "min_price_e2": 2800000,
    "rating_e2": 0,
    "rating_sum": 0,
    "rating_count": 0,
    "available": true,
    "provider_fee_e2": 0,
    "provider_fee_prc": 0,
    "created_at": "2020-08-06 02:58:47",
    "updated_at": "2020-08-24 16:30:41",
    "branch_id": 2,
    "good_id": 1,
    "branch_group_id": 2,
    "eta": "35",
    "promo_id": null,
    "promo_info": null,
    "last_sync_id": null,
    "quantity_real": null,
    "good_type_id": null,
    "sku": null,
    "type": 0,
    "name": "Rol de canela",
    "unit": "und",
    "max_quantity": null,
    "limit_type": null,
    "details": "Delicioso rol de canela para ricos",
    "short_details": "n/a",
    "picture_urls": [
        "http://127.0.0.1:8000/storage/companies/46/good/good_1_0_1550072987.jpg",
        "http://127.0.0.1:8000/storage/companies/46/good/good_1_0_1550073197.jpg"
    ],
    "vertical_picture_urls": [
        "http://127.0.0.1:8000/storage/static/default/product_category_logo_portrait.png"
    ],
    "notes_enabled": true,
    "custom_data": {
        "client_id": null,
        "branch_price_list_id": 27,
        "list_price_e2": 4242424242425,
        "display_price_e2": 4242424242425,
        "price_e2": 4242424242425,
        "currency": {
            "id": 29,
            "enabled": true,
            "iso": "USD",
            "symbol": "$",
            "conversion_factor": 1,
            "related_iso": "USD",
            "decimals_count": 2,
            "format": "$ 0.00",
            "decimal_point": ".",
            "use_thousands_separator": true,
            "thousands_separator": ",",
            "is_local": false,
            "is_international": true,
            "created_at": "2021-02-18 15:35:23",
            "updated_at": "2021-02-18 15:35:23",
            "company_id": 3,
            "is_custom": false,
            "branch_id": 2,
            "use_conversion": false,
            "available": true,
            "related_iso_expected": "VES",
            "related_iso_error": true
        },
        "conversion": {
            "list_price_e2": 2800000,
            "display_price_e2": 2800000,
            "price_e2": 2800000,
            "currency": {
                "id": 27,
                "enabled": true,
                "iso": "VES",
                "symbol": "Bs.S",
                "conversion_factor": 6.6e-7,
                "related_iso": "USD",
                "decimals_count": 2,
                "format": "$ 0.00",
                "decimal_point": ".",
                "use_thousands_separator": true,
                "thousands_separator": ",",
                "is_local": true,
                "is_international": false,
                "created_at": "2020-08-06 02:58:46",
                "updated_at": "2021-02-18 15:28:47",
                "company_id": 3,
                "is_custom": false,
                "branch_id": 2,
                "use_conversion": true,
                "available": true,
                "related_iso_expected": "VES",
                "related_iso_error": true
            }
        }
    },
    "quantity": null,
    "unit_config": null,
    "has_stock_for_selling": true
}

Insertar BranchGood

Insertar Branch Good

Insertar BranchGood

Asocia un Good con un Branch. Cuando un BranchGood es insertado, el API automáticamente asocia las GoodProperties del producto asociado y crea los registros de BranchProperty para manejar el stock y precios.

{info} Si no se especifica algún atributo, se usa el valor del Good. En caso de min_price_e2 se utiliza el atributo price_e2 del Good.

Método URI Cabeceras
PUT /companies/{companyId}/branches/{branchId}/goods/{goodId} Authorization
{
    "eta": "string|max:32",
    "min_price_e2": "integer|min:0",
    "provider_fee_e2": "integer",
    "provider_fee_prc": "float",
    "quantity": "integer",
    "quantity_real": "float"
}

Listar BranchGood

Listar BranchGood de Branch

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

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/branch-goods N/A

Listar Branch Category

{info} Soporta: Paginación Filters

Muestra las categorías que están siendo usadas por los BranchGoods. Si alguna Category no tiene Goods asociados a la Branch actual, esa Category no se mostrará.

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/branch-goods/categories N/A

Listar BranchGood de Category

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

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/categories/{categoryId}/branch-goods N/A

Mostrar BranchGood

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branch-goods/{branchGoodId} N/A

Mostrar Branch Good

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/goods/{goodId} N/A

Actualizar BranchGood

Método URI Cabeceras
PATCH /companies/{companyId}/branch-goods/{branchGoodId} Authorization
{
    "eta": "string|max:32",
    "min_price_e2": "integer|min:0",
    "provider_fee_e2": "integer",
    "provider_fee_prc": "float",
    "quantity": "integer",
    "quantity_real": "float"
}

Actualizar Branch Good

Método URI Cabeceras
PATCH /companies/{companyId}/branches/{branchId}/goods/{goodId} Authorization
{
    "eta": "string|max:32",
    "min_price_e2": "integer|min:0",
    "provider_fee_e2": "integer",
    "provider_fee_prc": "float",
    "quantity": "integer",
    "quantity_real": "float"
}

Eliminar BranchGood

Eliminar Branch Good

Eliminar BranchGood

Desvincula un Good de un Branch. Cuando un BranchGood es eliminado, el API automáticamente elimina los GoodProperties del producto desvinculado y elimina los registros huérfanos de BranchProperty.

Método URI Cabeceras
DELETE /companies/{companyId}/branches/{branchId}/goods/{goodId} Authorization

Acciones de BranchGood

Batch

Método URI Cabeceras
POST /companies/{companyId}/branch-goods/batch-action/{action} Authorization
{
    "ids": [
        "integer|min:1"
    ],
    "payload": ""
}

Set Available

Método URI Cabeceras
POST /companies/{companyId}/branch-goods/{branchGoodId}/set-available Authorization

Set Not Available

Método URI Cabeceras
POST /companies/{companyId}/branch-goods/{branchGoodId}/set-unavailable Authorization

Search

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

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/branch-goods/search N/A
{
    "q": "required|string"
}

Enlaces de BranchGood