Skip to main content

Recipe books

Three endpoints return recipe books: a list of books, one book, and the recipes in a book.

List recipe books​

GET /recipe-books

Returns the recipe books you can see in Nutritionist Pro, newest ID first.

Query parameters​

  • limit. Number of books to return, from 1 to 200. The default is 50.
  • offset. Number of books to skip. The default is 0.
  • updated_since and updated_until. Return only books changed in a date range.

See Lists and syncing for how these parameters behave.

Example request​

curl -H "Authorization: Bearer <API_KEY>" \
"https://dev.nutritionistpro.com/v3/customer/recipe-books"

Example response​

{
"status": true,
"code": 200,
"data": [
{
"id": 2000012,
"name": "Autumn menu",
"recipe_count": 14,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-04-02T16:30:12Z",
"creator": { "id": 4210, "name": "Test User" },
"account": { "id": 518, "name": "Test Account" }
}
],
"meta": { "total": 1, "limit": 50, "offset": 0 }
}

Recipe book fields​

  • id. The recipe book ID.
  • name. The recipe book name.
  • recipe_count. The number of recipes listed in the book. A recipe listed twice is counted once.
  • created_at and updated_at. Dates and times in UTC.
  • creator. The user who created the book.
  • account. The account that user belongs to.

Get one recipe book​

GET /recipe-books/{id}

Returns one recipe book with the same fields as the list. A book that does not exist or belongs to another account returns 404 with the message Recipe book not found.

Example request​

curl -H "Authorization: Bearer <API_KEY>" \
"https://dev.nutritionistpro.com/v3/customer/recipe-books/2000012"

Example response​

{
"status": true,
"code": 200,
"data": {
"id": 2000012,
"name": "Autumn menu",
"recipe_count": 14,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-04-02T16:30:12Z",
"creator": { "id": 4210, "name": "Test User" },
"account": { "id": 518, "name": "Test Account" }
}
}

List the recipes in a book​

GET /recipe-books/{id}/recipes

Returns the book, a page of its recipes, and the IDs of recipes that were deleted.

Query parameters​

  • limit and offset. Page through the book's recipes.
  • view. summary (the default) or full.
  • updated_since and updated_until. Return only the book's recipes changed in a date range.

Example request​

curl -H "Authorization: Bearer <API_KEY>" \
"https://dev.nutritionistpro.com/v3/customer/recipe-books/2000012/recipes?limit=2"

Example response​

{
"status": true,
"code": 200,
"data": {
"book": {
"id": 2000012,
"name": "Autumn menu",
"recipe_count": 14,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-04-02T16:30:12Z",
"creator": { "id": 4210, "name": "Test User" },
"account": { "id": 518, "name": "Test Account" }
},
"recipes": [
{
"id": 2000147,
"name": "Banana bread",
"code": "BB-001",
"number_of_servings": 8.0,
"created_at": "2026-03-04T15:20:11Z",
"updated_at": "2026-05-19T09:02:47Z"
},
{
"id": 2000139,
"name": "Tomato soup",
"code": null,
"number_of_servings": 4.0,
"created_at": "2026-02-11T18:45:00Z",
"updated_at": "2026-02-11T18:52:30Z"
}
],
"deleted_recipe_ids": [2000098]
},
"meta": { "total": 12, "limit": 2, "offset": 0 }
}

Response fields​

  • book. The recipe book, with the fields described above.
  • recipes. A page of the book's recipes, newest ID first. Each recipe has the summary or full shape described in Recipes.
  • deleted_recipe_ids. IDs the book still lists for recipes that no longer exist.

meta.total counts the recipes that match the request, so it can be lower than the book's recipe_count. Recipes in Draft status and deleted recipes are counted by recipe_count and are absent from recipes.

Use deleted recipe IDs when syncing​

If you keep a copy of a book's recipes, remove every recipe whose ID appears in deleted_recipe_ids. The list is returned in full on every page, whatever limit and offset are sent.

Remove a recipe from your copy only when its ID is in deleted_recipe_ids. A recipe can be missing from recipes for other reasons, such as paging, a date filter, or Draft status, and in those cases it still exists.