Shopping List¶
List of shopping list¶
- GET /api/v1/shopping-lists/¶
- Query Parameters
to_ckeckin – Filtra por aquellos que no tienen carrito y tienen artículos.
Ejemplo de petición
GET /api/v1/shopping-lists/ HTTP/1.1 Content-Type: application/json
Ejemplo de respuesta
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "name": "shopping list 1", "items": [ { "id": 1, "name": "Screws", "quantity": 40, "scanned": false, "created": "2020-03-20T14:10:29.953623Z" }, { "id": 2, "name": "Nuts", "quantity": 25, "scanned": true, "created": "2020-03-21T14:10:29.953623Z" } ], "created": "2020-03-16T14:10:29.953623Z" } ] }
Create shopping list¶
- POST /api/v1/shopping-lists/¶
Ejemplo de petición
POST /api/v1/shopping-lists/ HTTP/1.1
Content-Type: application/json
{
"name": "shopping list 1"
}
Ejemplo de respuesta
HTTP/1.1 201 Created
List items from shopping list¶
- GET /api/v1/shopping-list-items/¶
- Query Parameters
shopping_list – Filtra los artículos por ID de lista de compra.
Ejemplo de petición
GET /api/v1/shopping-list-items/?shopping_list=23 HTTP/1.1 Content-Type: application/json
Ejemplo de respuesta
HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "name": "Screws", "quantity": 40, "scanned": false, "created": "2020-03-20T14:10:29.953623Z" }, { "id": 4, "name": "Nuts", "quantity": 25, "scanned": true, "created": "2020-03-21T14:10:29.953623Z" } ] }