{
"id": 16,
"good_id": 8719,
"quantity": 2,
"stock": 1,
"extras": null,
"notes": null,
"provider_id": null,
"snapshot": {
"good_id": 8719,
"quantity": 2,
"notes": null,
"client_id": 10148,
"branch_id": 80,
"units": 2,
"name": "CEREAL NESTUM ARROZ PREBIO 6M BOLSA 225G",
"short_details": "n/a",
"details": "NEST ARR PREB BOL225",
"picture_urls": [
"https://api-dev.dondemand.io/storage/companies/69/good/good_8719_0_1685195225.jpg"
],
"base_price_e2": 10,
"total_price_e2": 10,
"original_total_e2": 10,
"good_stock": 49,
"sku": "7591016204764",
"promo_id": null,
"provider_fee_e2": 0,
"quantity_real": 1,
"properties": []
},
"is_valid": true,
"created_at": "2024-05-29 21:11:59",
"updated_at": "2024-07-04 12:47:48",
"branch_good_id": 8909
}
| Atributo | Tipo | Descripción |
|---|---|---|
id |
int |
- |
good_id |
int\|null |
- |
quantity |
int |
- |
stock |
float |
- |
snapshot |
array |
- |
is_valid |
bool |
- |
created_at |
datetime\|null |
- |
updated_at |
datetime\|null |
- |
branch_good_id |
int\|null |
- |
Agrega un producto al carrito
El atributo quantity representa la cantidad solicitada del producto elegido, por ejemplo: 2 Hamburguesas
El atributo stock representa el peso por unidad en los productos por peso, por ejemplo: 0.5 KG de Queso. En caso
de productos que no poseen configuración de peso (unit_config), este valor no tendrá ningún efecto.
Respuesta: Cart
| Método | URI | Cabeceras |
|---|---|---|
| POST | /companies/{companyId}/carts/{cartId}/cart-items |
Authorization |
{
"good_id": "required|integer|exists:goods,id",
"quantity": "required|integer|min:1",
"stock": "nullable|numeric|min:0.001",
"provider_id": "nullable|integer|exists:providers,id",
"notes": "nullable|string|max:255",
"extras": [
{
"property_id": "required|integer|exists:properties,id",
"value": "required|string"
}
]
}
{info} Soporta: Paginación Filters Carga dinámica
Muestra los productos que posee un Carrito
| Método | URI | Cabeceras |
|---|---|---|
| GET | /companies/{companyId}/carts/{cartId}/cart-items |
Authorization |
Actualiza un producto del carrito.
Respuesta: Cart
| Método | URI | Cabeceras |
|---|---|---|
| PATCH | /companies/{companyId}/cart-items/{cartItemId} |
Authorization |
{
"quantity": "integer|min:1",
"stock": "nullable|numeric|min:0.001",
"provider_id": "nullable|integer|exists:providers,id",
"notes": "nullable|string|max:255",
"extras": [
{
"property_id": "required|integer|exists:properties,id",
"value": "required|string"
}
]
}
Elimina un producto del carrito
Respuesta: Cart
| Método | URI | Cabeceras |
|---|---|---|
| DELETE | /companies/{companyId}/cart-items/{cartItemId} |
Authorization |
allLogs HasMany ApiLogbranchGood HasOne BranchGoodclient BelongsTo Clientlist BelongsTo Cartlogs HasMany ApiLog