SDK reference

Food

Each route's function in the SDK, its call beside the same request in cURL.
meFoodSettings

GET/v1/me/food/settings

Your Food settings (measures, spoons, servings, diets, allergens, suggestions, Health logging, week start) and your household.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/settings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodSettings

PATCH/v1/me/food/settings

Changes the person's Food settings (only the fields given; null clears one).

Parameters and answers
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
  }'
meFoodHome

GET/v1/me/food/home

Your household: its name and members (made, yours alone, the first time).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/home' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodHome

PATCH/v1/me/food/home

Renames your household.

Parameters and answers
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"
  }'
postMeFoodHomeInvites

POST/v1/me/food/home/invites

An invitation link into your household, good for a week.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/home/invites' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodHomeInvitesByCode

GET/v1/me/food/home/invites/:code

What an invitation is for: the household's name, who invited you and how many are in it.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/home/invites/{code}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodHomeInvitesAccept

POST/v1/me/food/home/invites/:code/accept

Joins the household (your own waits for you; refused while yours has others in it).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/home/invites/{code}/accept' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodHomeLeave

POST/v1/me/food/home/leave

Leaves the household, back to your own (its owner can't while others are in it).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/home/leave' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMeFoodHomeMembersByUserId

DELETE/v1/me/food/home/members/:userId

Removes someone from your household (its owner only).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/home/members/{userId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodRecipes

GET/v1/me/food/recipes

The person's recipes and their household's shared ones as cards, searched and filtered (limit: at most 1000, 200 by default).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/recipes' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodRecipes

POST/v1/me/food/recipes

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/recipes' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": {}
  }'
meFoodRecipesByRecipeId

GET/v1/me/food/recipes/:recipeId

A recipe in full, with signed picture links, nutrition per serving, allergens, diets and your access (owner, household).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodRecipesByRecipeId

PATCH/v1/me/food/recipes/:recipeId

Changes a recipe of the person's (version: refused with 409 when it changed meanwhile).

Parameters and answers
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
  }'
deleteMeFoodRecipesByRecipeId

DELETE/v1/me/food/recipes/:recipeId

Deletes a recipe of yours, its pictures (freeing their storage) and its public link.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodRecipesCopy

POST/v1/me/food/recipes/:recipeId/copy

Copies a recipe your household shares into your own recipes (pictures copied into your storage).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/recipes/{recipeId}/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodRecipesCook

POST/v1/me/food/recipes/:recipeId/cook

Logs that the person cooked it, with a rating and note; logToHealth logs a serving to Health's nutrition (when they turned it on).

Parameters and answers
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": {}
  }'
postMeFoodRecipesNotes

POST/v1/me/food/recipes/:recipeId/notes

Saves the recipe as a Notes page in one of the person's orgs (where they can write Notes).

Parameters and answers
curl -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>"
  }'
postMeFoodPublicCopy

POST/v1/me/food/public/:token/copy

Copies a recipe shared by public link into your own recipes.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/public/{token}/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodHistory

GET/v1/me/food/history

What you've cooked, newest first, with ratings and notes (limit, 100 by default).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/history' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodImages

POST/v1/me/food/images

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.

Parameters and answers
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"
  }'
meFoodCollections

GET/v1/me/food/collections

Your collections, with their recipes in order and their groups.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/collections' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodCollections

POST/v1/me/food/collections

A new collection, optionally with recipes and named groups.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/collections' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": {}
  }'
patchMeFoodCollectionsByCollectionId

PATCH/v1/me/food/collections/:collectionId

Renames a collection or changes its recipes (add, remove, or the whole recipeIds in order).

Parameters and answers
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"
    ]
  }'
deleteMeFoodCollectionsByCollectionId

DELETE/v1/me/food/collections/:collectionId

Deletes a collection (its recipes stay).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/collections/{collectionId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodPlan

GET/v1/me/food/plan

The household's meals between two days (at most 92).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/plan?from=example&to=example' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodPlan

POST/v1/me/food/plan

Puts a meal on the household's plan: a recipe, or a note ("Leftovers").

Parameters and answers
curl -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"
  }'
patchMeFoodPlanByEntryId

PATCH/v1/me/food/plan/:entryId

Moves or changes a meal (from: the day it's on now, which saves a lookup).

Parameters and answers
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>"
  }'
deleteMeFoodPlanByEntryId

DELETE/v1/me/food/plan/:entryId

Takes a meal off the plan (day: the day it's on, which saves a lookup).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/plan/{entryId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodPlanFeed

GET/v1/me/food/plan/feed

The household's private calendar feed link (url, and webcal for calendar apps).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/plan/feed' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodPlanFeedRotate

POST/v1/me/food/plan/feed/rotate

Replaces the calendar feed link; the old one stops working.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/plan/feed/rotate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodPlanSuggest

POST/v1/me/food/plan/suggest

Proposes (or with apply, plans) meals for the days ahead from the suggestions.

Parameters and answers
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"
  }'
postMeFoodPlanCalendar

POST/v1/me/food/plan/calendar

Puts planned meals on a Mail calendar of the person's (events at meal times, linking back).

Parameters and answers
curl -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"
  }'
meFoodLists

GET/v1/me/food/lists

The household's shopping lists, most recently changed first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/lists' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodLists

POST/v1/me/food/lists

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 answers
curl -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>"
      }
    ]
  }'
meFoodListsByListId

GET/v1/me/food/lists/:listId

A shopping list with its items (aisle, amount, ticked, the recipes they're for).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/lists/{listId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodListsByListId

PATCH/v1/me/food/lists/:listId

Renames a list.

Parameters and answers
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"
  }'
deleteMeFoodListsByListId

DELETE/v1/me/food/lists/:listId

Deletes a list.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/lists/{listId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodListsItems

POST/v1/me/food/lists/:listId/items

Adds items to a list (their aisle from the ingredient when not given).

Parameters and answers
curl -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": {}
      }
    ]
  }'
postMeFoodListsRecipes

POST/v1/me/food/lists/:listId/recipes

Adds recipes' ingredients to a list (merged with what's on it).

Parameters and answers
curl -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>"
      }
    ]
  }'
patchMeFoodListsItemsByItemId

PATCH/v1/me/food/lists/:listId/items/:itemId

Ticks an item (checked) or changes it; two people ticking at once both land.

Parameters and answers
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"
  }'
postMeFoodListsItemsRemove

POST/v1/me/food/lists/:listId/items/remove

Removes items by id, or every ticked one ({ "checked": true }).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/lists/{listId}/items/remove' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodPantry

GET/v1/me/food/pantry

What the household has in, soonest use-by first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/pantry' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodPantry

POST/v1/me/food/pantry

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.

Parameters and answers
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": {}
      }
    ]
  }'
meFoodPantryUseSoon

GET/v1/me/food/pantry/use-soon

What needs using soon (within days, 3 by default) and the recipes that use the most of it.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/pantry/use-soon' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodPantryBarcodesByCode

GET/v1/me/food/pantry/barcodes/:code

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/pantry/barcodes/{code}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMeFoodPantryBarcodesByCode

PUT/v1/me/food/pantry/barcodes/:code

The household's own answer for a barcode (one nobody knew, or a correction).

Parameters and answers
curl -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"
  }'
postMeFoodPantryScans

POST/v1/me/food/pantry/scans

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 answers
curl -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"
    ]
  }'
meFoodPantryScansByScanId

GET/v1/me/food/pantry/scans/:scanId

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/pantry/scans/{scanId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodPantryByItemId

PATCH/v1/me/food/pantry/:itemId

Changes something in the pantry (useBy: null clears its date).

Parameters and answers
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"
  }'
postMeFoodPantryRemove

POST/v1/me/food/pantry/remove

Takes things out of the pantry (used up).

Parameters and answers
curl -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"
    ]
  }'
meFoodCookable

GET/v1/me/food/cookable

"What can I cook?": the person's and household's recipes by how much the pantry covers, with what's missing.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/cookable' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodReceipts

GET/v1/me/food/receipts

The household's grocery receipts, newest purchase first (status: new, added or dismissed).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/receipts' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodReceiptsSettings

GET/v1/me/food/receipts/settings

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 answers
curl 'https://api.cactive.com.au/v1/me/food/receipts/settings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMeFoodReceiptsSettings

PATCH/v1/me/food/receipts/settings

Whether the household's new receipts go straight into the pantry (autoAdd) or wait for review.

Parameters and answers
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
  }'
postMeFoodReceiptsForwarding

POST/v1/me/food/receipts/forwarding

Makes the household's private forwarding address (or a new one with rotate: the old one stops working).

Parameters and answers
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
  }'
putMeFoodReceiptsMail

PUT/v1/me/food/receipts/mail

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 answers
curl -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>"
  }'
deleteMeFoodReceiptsMail

DELETE/v1/me/food/receipts/mail

Stops reading grocery receipts from the person's Cactive Mail; receipts already read stay.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/receipts/mail' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodReceiptsMailBackfill

POST/v1/me/food/receipts/mail/backfill

"Check the last 30 days" (once): the linked mailbox's mail from the stores' e-receipt senders, read for receipts.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/mail/backfill' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodReceiptsByReceiptId

GET/v1/me/food/receipts/:receiptId

One receipt (decrypted): the store, the day, the total and each line with its price, amount, place and estimated use-by.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/receipts/{receiptId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodReceiptsAdd

POST/v1/me/food/receipts/:receiptId/add

Puts a receipt into the pantry: its food lines, or the lines as ticked and changed (merged into what's there).

Parameters and answers
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>"
      }
    ]
  }'
postMeFoodReceiptsDismiss

POST/v1/me/food/receipts/:receiptId/dismiss

Leaves a receipt out of the pantry (it still counts in spending).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/receipts/{receiptId}/dismiss' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMeFoodReceipts

DELETE/v1/me/food/receipts

Deletes the household's receipts and prices (and the key they're sealed with).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/food/receipts' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodSpending

GET/v1/me/food/spending

Grocery spending by month from the household's receipts (months: 1 to 24, 6 by default).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/spending' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodDeleteAll

POST/v1/me/food/delete-all

Deletes all the person's Food data (call again while done is false).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/delete-all' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodSuggestions

GET/v1/me/food/suggestions

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 answers
curl 'https://api.cactive.com.au/v1/me/food/suggestions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodSubstitutes

GET/v1/me/food/substitutes

Substitutes for an ingredient from Food's kitchen notes, with amounts (none on file: an empty list and a note).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/substitutes?ingredient=example' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodWidget

GET/v1/me/food/widget

The phone's widgets: tonight's dinner and the first list's next items.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/widget' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodImportsUrl

POST/v1/me/food/imports/url

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 answers
curl -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"
  }'
postMeFoodImportsText

POST/v1/me/food/imports/text

Recipes in pasted text as drafts to check (several when separated by a line of dashes).

Parameters and answers
curl -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"
  }'
postMeFoodImportsPhotos

POST/v1/me/food/imports/photos

Photos or screenshots of one recipe (base64, up to four), read by the model; poll the import for its draft.

Parameters and answers
curl -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"
    ]
  }'
postMeFoodImportsFiles

POST/v1/me/food/imports/files

Starts importing another app's export: a link to PUT the file to, then complete.

Parameters and answers
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
  }'
postMeFoodImportsComplete

POST/v1/me/food/imports/:importId/complete

The file has been sent: the worker reads it and saves its recipes (and Melt's cookbooks as collections).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/imports/{importId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodImports

GET/v1/me/food/imports

Your imports from the last two weeks: what they read, saved and skipped, or why they failed.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodImportsByImportId

GET/v1/me/food/imports/:importId

One import: its status and, for one recipe read from photos or a page, the draft to check.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/imports/{importId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodExport

GET/v1/me/food/export

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/export' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodExports

GET/v1/me/food/exports

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 answers
curl 'https://api.cactive.com.au/v1/me/food/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeFoodExports

POST/v1/me/food/exports

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/food/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meFoodExportsByExportId

GET/v1/me/food/exports/:exportId

One ZIP export: queued, ready (each ZIP's url) or failed.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/food/exports/{exportId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"