Good
Representa a un producto o un servicio.
Modelo Good
{
"id": 1,
"name": "Rol de canela",
"short_details": "n/a",
"details": "Delicioso rol de canela para ricos",
"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"
],
"price_e2": 2800000,
"type": 0,
"rating_e2": 0,
"rating_sum": 0,
"rating_count": 0,
"eta": "35",
"created_at": "2019-02-13 15:49:47",
"updated_at": "2020-08-06 03:07:02",
"deleted_at": null,
"provider_fee_e2": 0,
"provider_fee_prc": 0,
"sku": null,
"good_type_id": null,
"notes_enabled": true,
"branch_group_id": 2,
"unit": "und",
"max_quantity": null,
"limit_type": null,
"unit_config": null,
"vertical_picture_urls": [
"http://127.0.0.1:8000/storage/static/default/product_category_logo_portrait.png"
]
}
Insertar Good
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods |
Authorization |
{
"name": "required|string|max:80",
"short_details": "required|string|max:64",
"details": "required|string",
"price_e2": "required|integer|min:0",
"type": "required|numeric",
"eta": "string|max:32",
"sku": "string|max:16",
"notes_enabled": "boolean",
"unit": "string|max:16",
"max_quantity": "integer",
"limit_type": {
"string": true,
"regex": "/^per_order|per_day|per_week|per_month|per_hours:[1-9][0-9]*$/"
},
"unit_config": {
"enabled": "required_with:unit_config|boolean",
"unit_name": "required_with:unit_config|string|min:1|max:16",
"fraction": "required_with:unit_config|int|min:1|max:1000",
"min_quantity": "required_with:unit_config|int|min:1",
"step_quantity": "required_with:unit_config|int|min:1",
"max_quantity": "required_with:unit_config|int|min:1|gte:unit_config.min_quantity",
"display_mode": "required_with:unit_config|string|in:decimal,fraction"
}
}
Insertar Good de Branch
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branches/{branchId}/goods |
Authorization |
{
"name": "required|string|max:80",
"short_details": "required|string|max:64",
"details": "required|string",
"price_e2": "required|integer|min:0",
"type": "required|numeric",
"eta": "string|max:32",
"sku": "string|max:16",
"notes_enabled": "boolean",
"unit": "string|max:16",
"max_quantity": "integer",
"limit_type": {
"string": true,
"regex": "/^per_order|per_day|per_week|per_month|per_hours:[1-9][0-9]*$/"
},
"unit_config": {
"enabled": "required_with:unit_config|boolean",
"unit_name": "required_with:unit_config|string|min:1|max:16",
"fraction": "required_with:unit_config|int|min:1|max:1000",
"min_quantity": "required_with:unit_config|int|min:1",
"step_quantity": "required_with:unit_config|int|min:1",
"max_quantity": "required_with:unit_config|int|min:1|gte:unit_config.min_quantity",
"display_mode": "required_with:unit_config|string|in:decimal,fraction"
}
}
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branch-groups/{branchGroupId}/goods |
Authorization |
{
"name": "required|string|max:80",
"short_details": "required|string|max:64",
"details": "required|string",
"price_e2": "required|integer|min:0",
"type": "required|numeric",
"eta": "string|max:32",
"sku": "string|max:16",
"notes_enabled": "boolean",
"unit": "string|max:16",
"max_quantity": "integer",
"limit_type": {
"string": true,
"regex": "/^per_order|per_day|per_week|per_month|per_hours:[1-9][0-9]*$/"
},
"unit_config": {
"enabled": "required_with:unit_config|boolean",
"unit_name": "required_with:unit_config|string|min:1|max:16",
"fraction": "required_with:unit_config|int|min:1|max:1000",
"min_quantity": "required_with:unit_config|int|min:1",
"step_quantity": "required_with:unit_config|int|min:1",
"max_quantity": "required_with:unit_config|int|min:1|gte:unit_config.min_quantity",
"display_mode": "required_with:unit_config|string|in:decimal,fraction"
}
}
Listar Good
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/goods |
N/A |
Listar AllowedProvider
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/goods/{goodId}/allowed-providers |
Authorization |
Listar Good de Branch
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/goods |
Authorization |
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branch-groups/{branchGroupId}/goods |
Authorization |
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/categories/{categoryId}/goods |
Authorization |
Listar Good de GoodTag
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/good-tags/{tagId}/goods |
Authorization |
Listar Client Favorite
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/clients/{clientId}/favorites |
Authorization |
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/properties/{propertyId}/goods |
Authorization |
{info} Soporta:
Paginación
Carga dinámica
Filters
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/good-types/{goodTypeId}/goods |
N/A |
Mostrar Good
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/goods/{goodId} |
N/A |
Actualizar Good
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId}/goods/{goodId} |
Authorization |
{
"name": "string|max:80",
"short_details": "string|max:64",
"details": "string",
"price_e2": "integer|min:0",
"type": "numeric",
"eta": "string|max:32",
"sku": "string|max:16",
"notes_enabled": "boolean",
"provider_fee_e2": "integer",
"provider_fee_prc": "float",
"unit": "string|max:16",
"max_quantity": "integer",
"limit_type": {
"string": true,
"regex": "/^per_order|per_day|per_week|per_month|per_hours:[1-9][0-9]*$/"
},
"unit_config": {
"enabled": "required_with:unit_config|boolean",
"unit_name": "required_with:unit_config|string|min:1|max:16",
"fraction": "required_with:unit_config|int|min:1|max:1000",
"min_quantity": "required_with:unit_config|int|min:1",
"step_quantity": "required_with:unit_config|int|min:1",
"max_quantity": "required_with:unit_config|int|min:1|gte:unit_config.min_quantity",
"display_mode": "required_with:unit_config|string|in:decimal,fraction"
}
}
Vincular Good
Vincular Client Favorite
Método |
URI |
Cabeceras |
PUT |
/companies/{companyId}/clients/{clientId}/goods/{goodId}/favorites |
Authorization |
{
"in_order": "integer|min:1"
}
Vincular GoodType
Método |
URI |
Cabeceras |
PUT |
/companies/{companyId}/goods/{goodId}/good-types/{goodTypeId} |
Authorization |
Desvincular Good
Desvincular Client Favorite
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId}/clients/{clientId}/goods/{goodId}/favorites |
Authorization |
Desvincular GoodType
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId}/goods/{goodId}/good-types/{goodTypeId} |
Authorization |
Sincronizar Good
Sincronizar Good de GoodTag
Método |
URI |
Cabeceras |
PUT |
/companies/{companyId}/good-tags/{tagId}/goods |
Authorization |
[
"integer"
]
Sincronizar Client Favorite
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/clients/{clientId}/favorites |
Authorization |
[
"integer"
]
Sincronizar Good de Category
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/categories/{categoryId}/goods |
Authorization |
[
"integer"
]
Eliminar Good
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId}/goods/{goodId} |
Authorization |
Restaurar Good
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods/{goodId}/restore |
Authorization |
{
"name": "string|max:64"
}
Acciones de Good
Search
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/goods/search |
N/A |
{
"q": "required|string"
}
Upload Picture
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods/{goodId}/upload-picture |
Authorization |
{
"image": "required|image|mimes:jpeg,png|max:8192|dimensions:min_width=2160,min_height=1304"
}
Remove Picture
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods/{goodId}/remove-picture |
Authorization |
{
"picture_url": "required|url"
}
Upload Vertical Picture
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods/{goodId}/upload-vertical-picture |
Authorization |
{
"image": "required|image|mimes:jpeg,png|max:8192|dimensions:min_width=1120,min_height=1400"
}
Remove Vertical Picture
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/goods/{goodId}/remove-vertical-picture |
Authorization |
{
"picture_url": "required|url"
}
Import
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branches/{branchId}/goods/import |
Authorization |
{
"file": "required|file|mimes:xlsx,xlsm,xltx,xltm,xls,xlt,ods,ots,slk,xml,gnumeric,htm,html,csv,tsv,txt",
"host_image_url": "string",
"host_image_var": "string",
"send_at": "date|after:2021-08-18 13:58:35",
"mapping": [
"string"
],
"config": [
"string"
],
"category_mapping": [
"string"
],
"send_at_timezone": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Import
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branch-groups/{branchGroupId}/goods/import |
Authorization |
{
"file": "required|file|mimes:xlsx,xlsm,xltx,xltm,xls,xlt,ods,ots,slk,xml,gnumeric,htm,html,csv,tsv,txt",
"host_image_url": "string",
"host_image_var": "string",
"send_at": "date|after:2021-08-18 13:58:35",
"mapping": [
"string"
],
"config": [
"string"
],
"category_mapping": [
"string"
],
"send_at_timezone": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Search
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branch-groups/{branchGroupId}/goods/search |
Authorization |
{
"q": "required|string"
}
Enlaces de Good