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#
| Field | Description |
|---|---|
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.
| Field | Description |
|---|---|
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. |
dishesarray of one of 3 shapesoptional | The dishes in the meal, in order, 1 to 20. Naming the same dish twice keeps it once. |
| 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. |
| 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. |
Response#
200 The command was applied.
| Field | Description |
|---|---|
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.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | meal_not_found | A missing meal. |
404 | person_not_found | A missing person. |
404 | dish_not_found | A missing dish. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | idempotency_key_reused | The 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
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"
]
}'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();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"
]
}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
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"
]
}'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();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"
]
}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
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"
}
]
}'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();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"
}
]
}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
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"
}
]
}'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();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"
}
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R095A84NKQEY2DJCKY
{
"result": {},
"version": 1
}A new note touches the meal
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"
}'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();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"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0H0STGC19CEC6T1J5
{
"result": {},
"version": 1
}A null note clears it
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
}'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();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
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DP9G2GE1S4M4Y18Z
{
"result": {},
"version": 1
}The same note changes nothing
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"
}'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();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"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R03GM6977TZP9W8JRB
{
"result": {},
"version": 1
}A recipe ref in the dishes
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"
}
]
}'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();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"
}
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0K3QVFFYCR8D2DMB9
{
"result": {},
"version": 1
}A missing meal
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"
}'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();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"
}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
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"
]
}'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();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"
]
}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
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"
}
]
}'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();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"
}
]
}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
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."
}'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();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."
}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.