Skip to content
Rigel docs
Open Rigel

Plan many meals at once without replacing any

meals.week.fill

POST/api/v1/households/{household_id}/commands/meals.week.fill

  • Command
  • Rigel runs it
  • Applies offline

Plans a batch of meals (up to 200) in one step, only where people are open. Anyone who already has a meal at a meal's date and slot, including one planned earlier in this same call, is left out of it; a meal with no one left is skipped. Existing meals are never changed or removed. Every meal's date must fall in the 7 days from week_start. The result has one entry per meal given, in order: the new meal_id (null if skipped) and who was left out. Dishes may be { recipe_id } as in meals.meal.plan. Fails with person_not_found if anyone isn't in the household, or recipe_not_found for an unknown recipe.

Parameters#

Plan many meals at once without replacing any: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

Idempotency-Keyheaderstringoptional

The command's ID. Reuse it when retrying the same command.

Request body#

JSON, as application/json.

Plan many meals at once without replacing any: request body fields
FieldDescription
week_startstring (date)required

The first day of the plan week, YYYY-MM-DD. The week is the 7 days starting on it; screens use the household's week_starts_on day.

mealsarray of objectsrequired

The meals to plan, 1 to 200, each as in meals.meal.plan.

1 to 200 items
meals[].datestring (date)required

The day of the meal, YYYY-MM-DD.

meals[].slotone of: breakfast, lunch, dinner, snackrequired

Which meal of the day: breakfast, lunch, dinner or snack.

meals[].person_idsarray of stringsrequired

Who the meal is for, 1 to 20 people from the household. Naming someone twice counts once.

1 to 20 items
meals[].dishesarray of one of 3 shapesrequired

The dishes in the meal, in order, 1 to 20. Naming the same dish twice keeps it once.

1 to 20 items
Shape 1, with dish_id
meals[].dishes[].dish_idstringrequired

A dish ID, such as dsh_01JC0000000000000000000000.

Shape 2, with name
meals[].dishes[].namestringrequired

A dish name. An existing dish with this name (ignoring case) is used; otherwise a new dish is created.

1 to 120 characters
Shape 3, with recipe_id
meals[].dishes[].recipe_idstringrequired

A recipe from the recipe box. The dish already made from it is used; otherwise a dish named after the recipe is created and linked to it.

meals[].notestringoptional

A kitchen note on the meal, as written: "use the leftover rice", "Nia's friend is over".

at most 1,000 characters

Response#

200 The command was applied.

Plan many meals at once without replacing any: response fields
FieldDescription
resultobjectrequired

What the command returned, such as the IDs it created.

result.resultsarray of objectsrequired

One result per meal given, in the same order.

result.results[].meal_idstring or nullrequired

The meal planned, or null when everyone was already busy then.

result.results[].left_out_person_idsarray of stringsrequired

People who were left out because they already had a meal at that date and slot.

versionintegerrequired

The household version after the command.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

Plan many meals at once without replacing any: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404person_not_foundA missing person fails before anything is planned.
404dish_not_foundA missing dish by ID.
404recipe_not_foundA missing recipe.
404not_foundThe household doesn't exist, or you aren't a member of it.
409idempotency_key_reusedThe Idempotency-Key was already used for a different command.

Examples#

These are real. Each scenario is one of the command's test cases, run on a household when this site was built, and the response is what the API returned.

Plans each meal in order with derived IDs

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-15",
      "slot": "lunch",
      "person_ids": [
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "name": "Soup"
        }
      ],
      "note": "thermos"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-09",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
          "per_01JC000000000000000000000B",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
      {
        date: "2026-11-15",
        slot: "lunch",
        person_ids: [
          "per_01JC000000000000000000000C",
        ],
        dishes: [
          {
            name: "Soup",
          },
        ],
        note: "thermos",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-15",
      "slot": "lunch",
      "person_ids": [
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "name": "Soup"
        }
      ],
      "note": "thermos"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R08BD46K8NMQ9CMCHN

{
  "result": {
    "results": [
      {
        "meal_id": "mel_01JC4N0000MBGE5RJ6Q7V6V6T8",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01JC4N0000QHE5G4K66DSXDNFQ",
        "left_out_person_ids": []
      }
    ]
  },
  "version": 1
}

People who already have a meal then are left out and the meal never replaces anything

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B",
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
          "per_01JC000000000000000000000B",
          "per_01JC000000000000000000000C",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B",
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0NBQ5QH0N0J0T4XSA

{
  "result": {
    "results": [
      {
        "meal_id": "mel_01JC4N0000MBGE5RJ6Q7V6V6T8",
        "left_out_person_ids": [
          "per_01JC000000000000000000000C"
        ]
      }
    ]
  },
  "version": 1
}

A meal with nobody left is skipped without creating its dishes

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "name": "New dish"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000C",
        ],
        dishes: [
          {
            name: "New dish",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "name": "New dish"
        }
      ]
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0RB61CM0WZKKG36YS

{
  "result": {
    "results": [
      {
        "meal_id": null,
        "left_out_person_ids": [
          "per_01JC000000000000000000000C"
        ]
      }
    ]
  },
  "version": 1
}

A person already placed earlier in the same fill is left out of the later meal

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000B",
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-11",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
          "per_01JC000000000000000000000B",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
      {
        date: "2026-11-11",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000B",
          "per_01JC000000000000000000000C",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000B",
        "per_01JC000000000000000000000C"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0T2F9GFWP64FHY0BS

{
  "result": {
    "results": [
      {
        "meal_id": "mel_01JC4N0000MBGE5RJ6Q7V6V6T8",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01JC4N0000GC2JW1K634QBXMT1",
        "left_out_person_ids": [
          "per_01JC000000000000000000000B"
        ]
      }
    ]
  },
  "version": 1
}

A recipe ref plans the recipe as a dish

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
          "per_01JC000000000000000000000B",
        ],
        dishes: [
          {
            recipe_id: "rcp_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A",
        "per_01JC000000000000000000000B"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0TTPR7VCH0EN1ZAM9

{
  "result": {
    "results": [
      {
        "meal_id": "mel_01JC4N0000VGW1STJ6TGXRB7FY",
        "left_out_person_ids": []
      }
    ]
  },
  "version": 1
}

A missing person fails before anything is planned

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000Z"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-09",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000Z",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    },
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000Z"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R06QPT2GB71B9AKPG1

{
  "error": {
    "code": "person_not_found",
    "message": "That person isn't in the household any more. No changes were applied.",
    "details": {
      "person_id": "per_01JC000000000000000000000Z"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R06QPT2GB71B9AKPG1"
  }
}

A missing dish by ID

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-09",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
        ],
        dishes: [
          {
            dish_id: "dsh_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-09",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0AEZGXYAK8EKG3K2Y

{
  "error": {
    "code": "dish_not_found",
    "message": "That dish isn't there any more. No changes were applied.",
    "details": {
      "dish_id": "dsh_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0AEZGXYAK8EKG3K2Y"
  }
}

A missing recipe

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01JC000000000000000000000A"
        }
      ]
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01JC000000000000000000000A",
        ],
        dishes: [
          {
            recipe_id: "rcp_01JC000000000000000000000A",
          },
        ],
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01JC000000000000000000000A"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01JC000000000000000000000A"
        }
      ]
    }
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0V5S5YS8N9T02CH11

{
  "error": {
    "code": "recipe_not_found",
    "message": "That recipe isn't in the recipe box any more. No changes were applied.",
    "details": {
      "recipe_id": "rcp_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0V5S5YS8N9T02CH11"
  }
}

Fill in the rest of the week

Plans many meals at once, only where people are free. Anyone who already has a meal at that date and slot is left out.

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.week.fill' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CSFXC8P32P49VP9YJQCE' \
  -d '{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01M6V9CSF42115AECDV14HYQ9G"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Veggie quesadillas"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS744BQQH188FS6CXY9W"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01M6V9CSF7VYZDN3CM3XAJ2760"
        }
      ]
    },
    {
      "date": "2026-11-12",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Sheet pan sausage and potatoes"
        }
      ]
    },
    {
      "date": "2026-11-13",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Pizza night"
        }
      ]
    },
    {
      "date": "2026-11-14",
      "slot": "breakfast",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01M6V9CSDDZVYFRVFNA4X5BSMZ"
        }
      ]
    },
    {
      "date": "2026-11-15",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Turkey chili"
        }
      ],
      "note": "Keep Theo'\''s mild."
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.week.fill", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CSFXC8P32P49VP9YJQCE",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    week_start: "2026-11-09",
    meals: [
      {
        date: "2026-11-10",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS744BQQH188FS6CXY9W",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            dish_id: "dsh_01M6V9CSF42115AECDV14HYQ9G",
          },
        ],
      },
      {
        date: "2026-11-11",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            name: "Veggie quesadillas",
          },
        ],
      },
      {
        date: "2026-11-11",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS744BQQH188FS6CXY9W",
        ],
        dishes: [
          {
            dish_id: "dsh_01M6V9CSF7VYZDN3CM3XAJ2760",
          },
        ],
      },
      {
        date: "2026-11-12",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS744BQQH188FS6CXY9W",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            name: "Sheet pan sausage and potatoes",
          },
        ],
      },
      {
        date: "2026-11-13",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS744BQQH188FS6CXY9W",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            name: "Pizza night",
          },
        ],
      },
      {
        date: "2026-11-14",
        slot: "breakfast",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS744BQQH188FS6CXY9W",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            recipe_id: "rcp_01M6V9CSDDZVYFRVFNA4X5BSMZ",
          },
        ],
      },
      {
        date: "2026-11-15",
        slot: "dinner",
        person_ids: [
          "per_01M6V9CS6RX26JK5KVYGRN22D2",
          "per_01M6V9CS744BQQH188FS6CXY9W",
          "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
          "per_01M6V9CS7CDAEP5VDA5T8R9TG6",
        ],
        dishes: [
          {
            name: "Turkey chili",
          },
        ],
        note: "Keep Theo's mild.",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.week.fill HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSFXC8P32P49VP9YJQCE

{
  "week_start": "2026-11-09",
  "meals": [
    {
      "date": "2026-11-10",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01M6V9CSF42115AECDV14HYQ9G"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Veggie quesadillas"
        }
      ]
    },
    {
      "date": "2026-11-11",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS744BQQH188FS6CXY9W"
      ],
      "dishes": [
        {
          "dish_id": "dsh_01M6V9CSF7VYZDN3CM3XAJ2760"
        }
      ]
    },
    {
      "date": "2026-11-12",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Sheet pan sausage and potatoes"
        }
      ]
    },
    {
      "date": "2026-11-13",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Pizza night"
        }
      ]
    },
    {
      "date": "2026-11-14",
      "slot": "breakfast",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "recipe_id": "rcp_01M6V9CSDDZVYFRVFNA4X5BSMZ"
        }
      ]
    },
    {
      "date": "2026-11-15",
      "slot": "dinner",
      "person_ids": [
        "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "per_01M6V9CS744BQQH188FS6CXY9W",
        "per_01M6V9CS79TMYHDAM7FTA9ZK3Z",
        "per_01M6V9CS7CDAEP5VDA5T8R9TG6"
      ],
      "dishes": [
        {
          "name": "Turkey chili"
        }
      ],
      "note": "Keep Theo's mild."
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSFXMPH7QHM5RCTDPRM6

{
  "result": {
    "results": [
      {
        "meal_id": "mel_01M6V9CSFXHKGZVJ1H2H384CNQ",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFXGQ25SM1HSAWPM40J",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFX06M0A2GQC611XCQA",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFX452XJRFQ0A5WTYPH",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFXM0D756CP5KY4HP4Q",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFXTVMCRYCPZFGJP37A",
        "left_out_person_ids": []
      },
      {
        "meal_id": "mel_01M6V9CSFXE8ZNK29NR2EPTDDZ",
        "left_out_person_ids": []
      }
    ]
  },
  "version": 78
}

For Rigel#

Rigel's tool for this command is meals_week_fill. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel