Flambe docs
API referenceGrocery lists

Append items to a grocery list

Adds items without rewriting the list. Lines that match an existing item are merged rather than duplicated.

POST
/api/grocery-lists/{id}/items

Adds items without rewriting the list. Lines that match an existing item are merged rather than duplicated.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/grocery-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/items" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "name": "unsalted butter",        "quantity": 1,        "unit": "cup"      },      {        "name": "flaky salt"      }    ]  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "user_id": "string",  "name": "Saturday shop",  "type": "manual",  "description": "string",  "archived": false,  "due_date": "2019-08-24",  "items": [    {      "key": "string",      "name": "unsalted butter",      "quantity": 0,      "unit": "string",      "checked": false,      "recipe_id": "fa7d15d4-7670-4586-a94b-5079ed028135",      "aisle": "string"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}