SDK reference
Food
GET/
Your Food settings (measures, spoons, servings, diets, allergens, suggestions, Health logging, week start) and your household.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Changes the person's Food settings (only the fields given; null clears one).
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"measure": "original",
"spoons": "au",
"defaultServings": 1
}'GET/
Your household: its name and members (made, yours alone, the first time).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/home' \
-H "Authorization: Bearer $CACTIVE_TOKEN"curl -X PATCH 'https://api.cactive.com.au/v1/me/food/home' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'POST/
An invitation link into your household, good for a week.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/home/invites' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
What an invitation is for: the household's name, who invited you and how many are in it.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/home/invites/{code}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Joins the household (your own waits for you; refused while yours has others in it).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/home/invites/{code}/accept' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Leaves the household, back to your own (its owner can't while others are in it).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/home/leave' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Removes someone from your household (its owner only).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/food/home/members/{userId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The person's recipes and their household's shared ones as cards, searched and filtered (limit: at most 1000, 200 by default).
curl 'https://api.cactive.com.au/v1/me/food/recipes' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds a recipe. Ingredients and steps may be text (one ingredient per line; steps by paragraph), which Food reads; imageUrls are copied in by the worker.
curl -X POST 'https://api.cactive.com.au/v1/me/food/recipes' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"title": {}
}'GET/
A recipe in full, with signed picture links, nutrition per serving, allergens, diets and your access (owner, household).
curl 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Changes a recipe of the person's (version: refused with 409 when it changed meanwhile).
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"title": {},
"description": {},
"servings": 1
}'DELETE/
Deletes a recipe of yours, its pictures (freeing their storage) and its public link.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Copies a recipe your household shares into your own recipes (pictures copied into your storage).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}/copy' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Logs that the person cooked it, with a rating and note; logToHealth logs a serving to Health's nutrition (when they turned it on).
curl -X POST 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}/cook' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"servings": 1,
"rating": 1,
"note": {}
}'PUT/
Turns the recipe's public link on (a new link each time) or off.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}/link' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"on": true
}'POST/
Saves the recipe as a Notes page in one of the person's orgs (where they can write Notes).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}/notes' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"orgId": "<orgId>"
}'POST/
Copies a recipe shared by public link into your own recipes.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/public/{token}/copy' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
What you've cooked, newest first, with ratings and notes (limit, 100 by default).
curl 'https://api.cactive.com.au/v1/me/food/history' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Keeps a picture (base64 JPEG, PNG, WebP or GIF, at most 8 MB) in the person's Food drive, metadata removed; use the answer in a recipe's images.
curl -X POST 'https://api.cactive.com.au/v1/me/food/images' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"data": "example"
}'GET/
Your collections, with their recipes in order and their groups.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/collections' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
A new collection, optionally with recipes and named groups.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/collections' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {}
}'PATCH/
Renames a collection or changes its recipes (add, remove, or the whole recipeIds in order).
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/collections/{collectionId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {},
"description": {},
"recipeIds": [
"example"
]
}'DELETE/
Deletes a collection (its recipes stay).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/food/collections/{collectionId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The household's meals between two days (at most 92).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/plan?from=example&to=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Puts a meal on the household's plan: a recipe, or a note ("Leftovers").
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/plan' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"day": "example",
"meal": "example"
}'PATCH/
Moves or changes a meal (from: the day it's on now, which saves a lookup).
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/plan/{entryId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"day": "example",
"meal": "breakfast",
"recipeId": "<recipeId>"
}'DELETE/
Takes a meal off the plan (day: the day it's on, which saves a lookup).
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/plan/{entryId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The household's private calendar feed link (url, and webcal for calendar apps).
curl 'https://api.cactive.com.au/v1/me/food/plan/feed' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Replaces the calendar feed link; the old one stops working.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/plan/feed/rotate' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Proposes (or with apply, plans) meals for the days ahead from the suggestions.
curl -X POST 'https://api.cactive.com.au/v1/me/food/plan/suggest' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"from": "example",
"days": 1,
"meal": "breakfast"
}'POST/
Puts planned meals on a Mail calendar of the person's (events at meal times, linking back).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/plan/calendar' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"orgId": "<orgId>",
"mailboxId": "<mailboxId>",
"calendarId": "<calendarId>",
"from": "example",
"to": "example",
"timeZone": "example"
}'GET/
The household's shopping lists, most recently changed first.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/lists' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
A new list: empty, from the plan between two days, or from recipes at given servings (merged by ingredient, by aisle, without the pantry).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/lists' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"fromPlan": {
"from": "example",
"to": "example"
},
"fromRecipes": [
{
"recipeId": "<recipeId>"
}
]
}'GET/
A shopping list with its items (aisle, amount, ticked, the recipes they're for).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/lists/{listId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"curl -X PATCH 'https://api.cactive.com.au/v1/me/food/lists/{listId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'curl -X DELETE 'https://api.cactive.com.au/v1/me/food/lists/{listId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds items to a list (their aisle from the ingredient when not given).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/lists/{listId}/items' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"name": {}
}
]
}'POST/
Adds recipes' ingredients to a list (merged with what's on it).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/lists/{listId}/recipes' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"recipes": [
{
"recipeId": "<recipeId>"
}
]
}'PATCH/
Ticks an item (checked) or changes it; two people ticking at once both land.
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/lists/{listId}/items/{itemId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {},
"quantity": 1,
"unit": "example"
}'POST/
Removes items by id, or every ticked one ({ "checked": true }).
curl -X POST 'https://api.cactive.com.au/v1/me/food/lists/{listId}/items/remove' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
What the household has in, soonest use-by first.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/pantry' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds things to the household's pantry, fridge or freezer: placed by kind and given an estimated use-by unless given; merged into the same thing already there unless merge is false.
curl -X POST 'https://api.cactive.com.au/v1/me/food/pantry' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"name": {}
}
]
}'GET/
What needs using soon (within days, 3 by default) and the recipes that use the most of it.
curl 'https://api.cactive.com.au/v1/me/food/pantry/use-soon' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
What a barcode is (the household's own answer, else Open Food Facts), as a pantry item to check; found: false when nobody knows it.
curl 'https://api.cactive.com.au/v1/me/food/pantry/barcodes/{code}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
The household's own answer for a barcode (one nobody knew, or a correction).
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/me/food/pantry/barcodes/{code}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'POST/
Photos of a shelf, the fridge or a bench of shopping (base64, up to four), read by the model into items to check; poll the scan. Counts against the daily photo readings.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/pantry/scans' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photos": [
"example"
]
}'GET/
A pantry photo being read: running, then done with the items to check (placed, with estimated use-bys and what each would add to), or failed.
curl 'https://api.cactive.com.au/v1/me/food/pantry/scans/{scanId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Changes something in the pantry (useBy: null clears its date).
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/pantry/{itemId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {},
"quantity": 1,
"unit": "example"
}'POST/
Takes things out of the pantry (used up).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/pantry/remove' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"itemIds": [
"example"
]
}'GET/
"What can I cook?": the person's and household's recipes by how much the pantry covers, with what's missing.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/cookable' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The household's grocery receipts, newest purchase first (status: new, added or dismissed).
curl 'https://api.cactive.com.au/v1/me/food/receipts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Receipts settings: the household's forwarding address (when made), whether receipts go straight in, Gmail's last confirmation, and the person's Cactive Mail link.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/receipts/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Whether the household's new receipts go straight into the pantry (autoAdd) or wait for review.
curl -X PATCH 'https://api.cactive.com.au/v1/me/food/receipts/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"autoAdd": true
}'POST/
Makes the household's private forwarding address (or a new one with rotate: the old one stops working).
curl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/forwarding' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"rotate": true
}'PUT/
Turns on grocery receipts from one of the person's Cactive Mail mailboxes (they must be a member): Food then reads only mail from the stores' e-receipt senders there.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/me/food/receipts/mail' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"orgId": "<orgId>",
"mailboxId": "<mailboxId>"
}'DELETE/
Stops reading grocery receipts from the person's Cactive Mail; receipts already read stay.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/food/receipts/mail' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
"Check the last 30 days" (once): the linked mailbox's mail from the stores' e-receipt senders, read for receipts.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/mail/backfill' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One receipt (decrypted): the store, the day, the total and each line with its price, amount, place and estimated use-by.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/receipts/{receiptId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Puts a receipt into the pantry: its food lines, or the lines as ticked and changed (merged into what's there).
curl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/{receiptId}/add' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"lines": [
{
"id": "<id>"
}
]
}'POST/
Leaves a receipt out of the pantry (it still counts in spending).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/{receiptId}/dismiss' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Deletes the household's receipts and prices (and the key they're sealed with).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/food/receipts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Grocery spending by month from the household's receipts (months: 1 to 24, 6 by default).
curl 'https://api.cactive.com.au/v1/me/food/spending' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Deletes all the person's Food data (call again while done is false).
curl -X POST 'https://api.cactive.com.au/v1/me/food/delete-all' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Ideas from the person's recipes with why (ratings, history, the season, the pantry, the weather when turned on), within their diets and allergens.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/suggestions' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Substitutes for an ingredient from Food's kitchen notes, with amounts (none on file: an empty list and a note).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/substitutes?ingredient=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The phone's widgets: tonight's dinner and the first list's next items.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/widget' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
A web page's recipe as a draft to check (schema.org data, else its lists); a page without either is read by the model as an import.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/imports/url' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com"
}'POST/
Recipes in pasted text as drafts to check (several when separated by a line of dashes).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/imports/text' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"text": "example"
}'POST/
Photos or screenshots of one recipe (base64, up to four), read by the model; poll the import for its draft.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/imports/photos' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photos": [
"example"
]
}'POST/
Starts importing another app's export: a link to PUT the file to, then complete.
curl -X POST 'https://api.cactive.com.au/v1/me/food/imports/files' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"size": 1
}'POST/
The file has been sent: the worker reads it and saves its recipes (and Melt's cookbooks as collections).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/food/imports/{importId}/complete' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Your imports from the last two weeks: what they read, saved and skipped, or why they failed.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/imports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One import: its status and, for one recipe read from photos or a page, the draft to check.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/imports/{importId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Everything of yours in Food as a file Food imports again (format: cactive-food): recipes, collections, settings and history. Pictures are links valid for an hour.
curl 'https://api.cactive.com.au/v1/me/food/export' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Your ZIP exports from the last day, newest first, each with its status and, once ready, a download link per ZIP (an hour long).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/food/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Starts a ZIP export: the export's JSON (food-export.json) with your recipes' pictures beside it, made in the background and kept a day. Check it until ready; a few a day.
curl -X POST 'https://api.cactive.com.au/v1/me/food/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One ZIP export: queued, ready (each ZIP's url) or failed.
curl 'https://api.cactive.com.au/v1/me/food/exports/{exportId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"