Skip to content
Rigel docs
Open Rigel

Change a meal's people, dishes or note

meals.meal.update

POST/api/v1/households/{household_id}/commands/meals.meal.update

  • Command
  • Rigel runs it
  • Applies offline

Sets only what is given. person_ids replaces who the meal is for (anyone added is taken out of their other meal at that date and slot). dishes replaces the dishes, as in meals.meal.plan (including { recipe_id }). note replaces the kitchen note; null clears it. To take one person out use meals.meal.remove_person; to change the day or slot use meals.meal.move.

Parameters#

Change a meal's people, dishes or note: 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.

Change a meal's people, dishes or note: request body fields
FieldDescription
meal_idstringrequired

A meal ID, such as mel_01JC0000000000000000000000.

person_idsarray of stringsoptional

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

1 to 20 items
dishesarray of one of 3 shapesoptional

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
dishes[].dish_idstringrequired

A dish ID, such as dsh_01JC0000000000000000000000.

Shape 2, with name
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
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.

notestring or nulloptional

A new kitchen note, or null to clear it. Leave out to keep it.

at most 1,000 characters

Response#

200 The command was applied.

Change a meal's people, dishes or note: response fields
FieldDescription
resultobjectrequired

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

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.

Change a meal's people, dishes or note: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404meal_not_foundA missing meal.
404person_not_foundA missing person.
404dish_not_foundA missing dish.
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.

People: those added leave their other meal, those left out are removed

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000C"
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    person_ids: [
      "per_01JC000000000000000000000A",
      "per_01JC000000000000000000000C",
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000C"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0NKYBWW7CCV2E4NY3

{
  "result": {},
  "version": 1
}

Adding everyone from another meal removes that meal

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000B",
    "per_01JC000000000000000000000C",
    "per_01JC000000000000000000000D"
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    person_ids: [
      "per_01JC000000000000000000000A",
      "per_01JC000000000000000000000B",
      "per_01JC000000000000000000000C",
      "per_01JC000000000000000000000D",
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000B",
    "per_01JC000000000000000000000C",
    "per_01JC000000000000000000000D"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0PBNFP3D1EQCATSA1

{
  "result": {},
  "version": 1
}

Dishes: rows for kept dishes stay, only moved positions change

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000B"
    },
    {
      "name": "Salad"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    dishes: [
      {
        dish_id: "dsh_01JC000000000000000000000B",
      },
      {
        name: "Salad",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000B"
    },
    {
      "name": "Salad"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KDT844DPXS0BSB2Z

{
  "result": {},
  "version": 1
}

The same dishes in the same order change nothing

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000A"
    },
    {
      "name": "rice"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    dishes: [
      {
        dish_id: "dsh_01JC000000000000000000000A",
      },
      {
        name: "rice",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000A"
    },
    {
      "name": "rice"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R095A84NKQEY2DJCKY

{
  "result": {},
  "version": 1
}

A new note touches the meal

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": "no onions"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    note: "no onions",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": "no onions"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0H0STGC19CEC6T1J5

{
  "result": {},
  "version": 1
}

A null note clears it

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": null
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    note: null,
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": null
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DP9G2GE1S4M4Y18Z

{
  "result": {},
  "version": 1
}

The same note changes nothing

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": "old note"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    note: "old note",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "note": "old note"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R03GM6977TZP9W8JRB

{
  "result": {},
  "version": 1
}

A recipe ref in the dishes

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

{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "recipe_id": "rcp_01JC000000000000000000000A"
    }
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0K3QVFFYCR8D2DMB9

{
  "result": {},
  "version": 1
}

A missing meal

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000Z",
  "note": "x"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000Z",
    note: "x",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000Z",
  "note": "x"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0TFZTFZ1RBA2RH9E2

{
  "error": {
    "code": "meal_not_found",
    "message": "That meal isn't there any more. No changes were applied.",
    "details": {
      "meal_id": "mel_01JC000000000000000000000Z"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0TFZTFZ1RBA2RH9E2"
  }
}

A missing person

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000Z"
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    person_ids: [
      "per_01JC000000000000000000000A",
      "per_01JC000000000000000000000Z",
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "person_ids": [
    "per_01JC000000000000000000000A",
    "per_01JC000000000000000000000Z"
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0GABEVADDWHY6T33S

{
  "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_01K9D9S2R0GABEVADDWHY6T33S"
  }
}

A missing dish

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000Z"
    }
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01JC000000000000000000000A",
    dishes: [
      {
        dish_id: "dsh_01JC000000000000000000000Z",
      },
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "meal_id": "mel_01JC000000000000000000000A",
  "dishes": [
    {
      "dish_id": "dsh_01JC000000000000000000000Z"
    }
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0HFX315X88201QCMB

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

Add a side to a meal

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.meal.update' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CSGGJATEYHMFGW3FSNZ2' \
  -d '{
  "meal_id": "mel_01M6V9CSFXHKGZVJ1H2H384CNQ",
  "dishes": [
    {
      "dish_id": "dsh_01M6V9CSF42115AECDV14HYQ9G"
    },
    {
      "name": "Corn on the cob"
    }
  ],
  "note": "Use the thawed chicken."
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.meal.update", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CSGGJATEYHMFGW3FSNZ2",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    meal_id: "mel_01M6V9CSFXHKGZVJ1H2H384CNQ",
    dishes: [
      {
        dish_id: "dsh_01M6V9CSF42115AECDV14HYQ9G",
      },
      {
        name: "Corn on the cob",
      },
    ],
    note: "Use the thawed chicken.",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/meals.meal.update HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSGGJATEYHMFGW3FSNZ2

{
  "meal_id": "mel_01M6V9CSFXHKGZVJ1H2H384CNQ",
  "dishes": [
    {
      "dish_id": "dsh_01M6V9CSF42115AECDV14HYQ9G"
    },
    {
      "name": "Corn on the cob"
    }
  ],
  "note": "Use the thawed chicken."
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSGGQZJ3SPPFSA46EW4J

{
  "result": {},
  "version": 79
}

For Rigel#

Rigel's tool for this command is meals_meal_update. 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