Property


Propiedad, Característica o Variante para asignar a un Good.

Modelo Property

{
    "id": 41,
    "name": "Cat1",
    "type": 256,
    "disabled": false,
    "created_at": "2020-04-22 00:00:53",
    "updated_at": "2020-04-22 21:10:11",
    "property_group_id": null,
    "branch_group_id": 42,
    "is_type_options": true,
    "is_type_range": false,
    "is_type_text": false,
    "property_options": [
        {
            "id": 589,
            "name": "Cat1",
            "price_e2": 1200,
            "in_order": 65535,
            "created_at": "2020-04-22 21:10:11",
            "updated_at": "2020-04-22 21:10:11",
            "property_id": 41,
            "is_default": false
        }
    ],
    "property_range": null,
    "property_text": null
}
Atributo Tipo Descripción
id int -
name string -
type int -
disabled bool -
created_at datetime\|null -
updated_at datetime\|null -
branch_group_id int\|null -
is_type_options bool BitMask (({@link self::type} & 0x100) !== 0)
is_type_range bool BitMask (({@link self::type} & 0x200) !== 0)
is_type_text bool BitMask (({@link self::type} & 0x400) !== 0)

Insertar Property

Método URI Cabeceras
POST /companies/{companyId}/properties Authorization
{
    "name": "required|string|max:64",
    "disabled": "boolean",
    "type": "nullable|numeric",
    "property_options": [
        {
            "name": "required_if:type,256|string|max:64",
            "price_e2": "required_if:type,256|integer|min:0",
            "in_order": "integer|min:0",
            "is_default": "boolean"
        }
    ],
    "property_range": {
        "min": "required_with:property_range|integer",
        "max": "required_with:property_range|integer|gt:min",
        "decimates": "required_with:property_range|integer|min:0|max:3",
        "step": "required_with:property_range|integer|min:1",
        "default": "required_with:property_range|integer|gte:min|lte:max",
        "base_price_e2": "required_with:property_range|integer|min:0",
        "step_price_e2": "required_with:property_range|integer|min:0",
        "unit": "max:8"
    },
    "property_text": {
        "regex": "required_with:property_text|string|max:255|pattern",
        "hint": "string|max:64"
    },
    "is_type_options": "nullable|boolean",
    "is_type_range": "nullable|boolean",
    "is_type_text": "nullable|boolean"
}

Insertar Property de Branch

Método URI Cabeceras
POST /companies/{companyId}/branches/{branchId}/properties Authorization
{
    "name": "required|string|max:64",
    "disabled": "boolean",
    "type": "nullable|numeric",
    "property_options": [
        {
            "name": "required_if:type,256|string|max:64",
            "price_e2": "required_if:type,256|integer|min:0",
            "in_order": "integer|min:0",
            "is_default": "boolean"
        }
    ],
    "property_range": {
        "min": "required_with:property_range|integer",
        "max": "required_with:property_range|integer|gt:min",
        "decimates": "required_with:property_range|integer|min:0|max:3",
        "step": "required_with:property_range|integer|min:1",
        "default": "required_with:property_range|integer|gte:min|lte:max",
        "base_price_e2": "required_with:property_range|integer|min:0",
        "step_price_e2": "required_with:property_range|integer|min:0",
        "unit": "max:8"
    },
    "property_text": {
        "regex": "required_with:property_text|string|max:255|pattern",
        "hint": "string|max:64"
    },
    "is_type_options": "nullable|boolean",
    "is_type_range": "nullable|boolean",
    "is_type_text": "nullable|boolean"
}

Insertar Property de BranchGroup

Método URI Cabeceras
POST /companies/{companyId}/branch-groups/{branchGroupId}/properties Authorization
{
    "name": "required|string|max:64",
    "disabled": "boolean",
    "type": "nullable|numeric",
    "property_options": [
        {
            "name": "required_if:type,256|string|max:64",
            "price_e2": "required_if:type,256|integer|min:0",
            "in_order": "integer|min:0",
            "is_default": "boolean"
        }
    ],
    "property_range": {
        "min": "required_with:property_range|integer",
        "max": "required_with:property_range|integer|gt:min",
        "decimates": "required_with:property_range|integer|min:0|max:3",
        "step": "required_with:property_range|integer|min:1",
        "default": "required_with:property_range|integer|gte:min|lte:max",
        "base_price_e2": "required_with:property_range|integer|min:0",
        "step_price_e2": "required_with:property_range|integer|min:0",
        "unit": "max:8"
    },
    "property_text": {
        "regex": "required_with:property_text|string|max:255|pattern",
        "hint": "string|max:64"
    },
    "is_type_options": "nullable|boolean",
    "is_type_range": "nullable|boolean",
    "is_type_text": "nullable|boolean"
}

Listar Property

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

Método URI Cabeceras
GET /companies/{companyId}/properties N/A

Listar Property de Good

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

Método URI Cabeceras
GET /companies/{companyId}/goods/{goodId}/properties Authorization

Listar Property de Branch

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

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/properties Authorization

Listar Property de BranchGroup

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

Método URI Cabeceras
GET /companies/{companyId}/branch-groups/{branchGroupId}/properties Authorization

Mostrar Property

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/properties/{propertyId} N/A

Actualizar Property

Método URI Cabeceras
PATCH /companies/{companyId}/properties/{propertyId} Authorization
{
    "name": "required|string|max:64",
    "disabled": "boolean",
    "type": "nullable|numeric",
    "property_options": [
        {
            "name": "required_if:type,256|string|max:64",
            "price_e2": "required_if:type,256|integer|min:0",
            "in_order": "integer|min:0",
            "is_default": "boolean"
        }
    ],
    "property_range": {
        "min": "required_with:property_range|integer",
        "max": "required_with:property_range|integer|gt:min",
        "decimates": "required_with:property_range|integer|min:0|max:3",
        "step": "required_with:property_range|integer|min:1",
        "default": "required_with:property_range|integer|gte:min|lte:max",
        "base_price_e2": "required_with:property_range|integer|min:0",
        "step_price_e2": "required_with:property_range|integer|min:0",
        "unit": "max:8"
    },
    "property_text": {
        "regex": "required_with:property_text|string|max:255|pattern",
        "hint": "string|max:64"
    },
    "is_type_options": "nullable|boolean",
    "is_type_range": "nullable|boolean",
    "is_type_text": "nullable|boolean"
}

Sincronizar Property

Sincronizar Property de Good

Método URI Cabeceras
POST /companies/{companyId}/goods/{goodId}/properties Authorization
[
    {
        "property_id": "required|integer",
        "options": "nullable|integer|min:1",
        "display_name": "required|string|max:64",
        "disabled": "boolean",
        "prop_type": "nullable|integer|min:0|max:4095",
        "is_type_options": "nullable|boolean",
        "is_type_range": "nullable|boolean",
        "is_type_text": "nullable|boolean",
        "is_dynamic": "nullable|boolean",
        "is_free": "nullable|boolean",
        "is_consumable": "nullable|boolean",
        "is_multi_selection": "nullable|boolean",
        "min_count": "nullable|integer|min:0|max:15",
        "max_count": "nullable|integer|min:0|max:15",
        "stack_count": "nullable|integer|min:0|max:15",
        "is_admin_customizable": "nullable|boolean"
    }
]

Eliminar Property

Método URI Cabeceras
DELETE /companies/{companyId}/properties/{propertyId} Authorization

Enlaces de Property