Skip to content
Rigel docs
Open Rigel

Record that a visit happened

maintenance.visit.complete

POST/api/v1/households/{household_id}/commands/maintenance.visit.complete

  • Command
  • Rigel runs it
  • Applies offline

The work happened. Marks the visit done on visited_on (default today) with a summary, checks off each task in completes_task_ids (the completion names this visit and its contractor) and resolves each problem in resolves_issue_ids (the visit summary becomes how it was fixed). The calendar event stays. Fails with visit_cancelled for a cancelled visit and already_done for one already recorded.

Parameters#

Record that a visit happened: 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.

Record that a visit happened: request body fields
FieldDescription
visit_idstringrequired

A visit ID, such as vst_01JC0000000000000000000000.

visited_onstring (date)optional

The day the work happened. Defaults to today.

summarystringoptional

What was done.

at most 20,000 characters
completes_task_idsarray of stringsoptional

Maintenance tasks the work did. Each is checked off on the visit date, by the visit's contractor, and its next due date moves on.

at most 100 items
resolves_issue_idsarray of stringsoptional

Problems the work fixed. Each is marked resolved with the visit summary as how.

at most 100 items

Response#

200 The command was applied.

Record that a visit happened: 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.

Record that a visit happened: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404task_not_foundA task that isn't there.
404issue_not_foundA problem that isn't there.
404visit_not_foundA visit that isn't there.
404not_foundThe household doesn't exist, or you aren't a member of it.
409visit_cancelledA cancelled visit.
409already_doneA visit already done.
409different_property
  • A problem at another property.
  • A task at another property.
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.

Marks it done today

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "visit_id": "vst_01JC00000000000000000000V1",
  "summary": "Cleaned and tested"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    visit_id: "vst_01JC00000000000000000000V1",
    summary: "Cleaned and tested",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "summary": "Cleaned and tested"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KVT6NX1KM8RD2GE6

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

A done visit keeps its calendar event

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "visit_id": "vst_01JC00000000000000000000V1",
  "summary": "Cleaned and tested"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    visit_id: "vst_01JC00000000000000000000V1",
    summary: "Cleaned and tested",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "summary": "Cleaned and tested"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0YGMJ70TD7YGZMMSV

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

Resolves problems with the summary, and links the visit to them

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "visit_id": "vst_01JC00000000000000000000V1",
  "visited_on": "2025-11-05",
  "summary": "New igniter",
  "resolves_issue_ids": [
    "iss_01JC00000000000000000000Q1",
    "iss_01JC00000000000000000000Q2",
    "iss_01JC00000000000000000000Q3"
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    visit_id: "vst_01JC00000000000000000000V1",
    visited_on: "2025-11-05",
    summary: "New igniter",
    resolves_issue_ids: [
      "iss_01JC00000000000000000000Q1",
      "iss_01JC00000000000000000000Q2",
      "iss_01JC00000000000000000000Q3",
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "visited_on": "2025-11-05",
  "summary": "New igniter",
  "resolves_issue_ids": [
    "iss_01JC00000000000000000000Q1",
    "iss_01JC00000000000000000000Q2",
    "iss_01JC00000000000000000000Q3"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0QNXGMNBZ0AK5K9W7

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

Keeps the summary already on the visit

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

{
  "visit_id": "vst_01JC00000000000000000000V1"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R05YYBHDYM8FBB3JGF

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

Checks off a task for the visit and its contractor

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "visit_id": "vst_01JC00000000000000000000V1",
  "visited_on": "2025-11-05",
  "summary": "Filter changed",
  "completes_task_ids": [
    "mtk_01JC00000000000000000000T1"
  ]
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    visit_id: "vst_01JC00000000000000000000V1",
    visited_on: "2025-11-05",
    summary: "Filter changed",
    completes_task_ids: [
      "mtk_01JC00000000000000000000T1",
    ],
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.complete HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "visited_on": "2025-11-05",
  "summary": "Filter changed",
  "completes_task_ids": [
    "mtk_01JC00000000000000000000T1"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R051K4GPXD1DMFENRP

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

A cancelled visit

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

{
  "visit_id": "vst_01JC00000000000000000000V1"
}
Response, 409
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0CHZGFXAKQ692WY2E

{
  "error": {
    "code": "visit_cancelled",
    "message": "That visit was cancelled, so it can't be marked done. No changes were applied.",
    "details": {},
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0CHZGFXAKQ692WY2E"
  }
}

A visit already done

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

{
  "visit_id": "vst_01JC00000000000000000000V1"
}
Response, 409
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R093W2BFH8PGVFKBHQ

{
  "error": {
    "code": "already_done",
    "message": "That visit is already recorded as done. No changes were applied.",
    "details": {
      "visit_id": "vst_01JC00000000000000000000V1"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R093W2BFH8PGVFKBHQ"
  }
}

A problem at another property

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

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "resolves_issue_ids": [
    "iss_01JC00000000000000000000Q2"
  ]
}
Response, 409
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0ZHR4V8E533JY0PTM

{
  "error": {
    "code": "different_property",
    "message": "That problem is at a different property. No changes were applied.",
    "details": {
      "property_id": "prp_01JC00000000000000000000P2"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0ZHR4V8E533JY0PTM"
  }
}

A task at another property

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

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "completes_task_ids": [
    "mtk_01JC00000000000000000000T1"
  ]
}
Response, 409
HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0PR6TVS16MHSXXV8G

{
  "error": {
    "code": "different_property",
    "message": "That task is at a different property. No changes were applied.",
    "details": {
      "property_id": "prp_01JC00000000000000000000P2"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0PR6TVS16MHSXXV8G"
  }
}

A task that isn't there

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

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "completes_task_ids": [
    "mtk_01JC00000000000000000000TX"
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R04PC367S5B3F6XCCC

{
  "error": {
    "code": "task_not_found",
    "message": "That maintenance task isn't there any more. No changes were applied.",
    "details": {
      "task_id": "mtk_01JC00000000000000000000TX"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R04PC367S5B3F6XCCC"
  }
}

A problem that isn't there

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

{
  "visit_id": "vst_01JC00000000000000000000V1",
  "resolves_issue_ids": [
    "iss_01JC00000000000000000000QX"
  ]
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0D8NC5CC3B4SJEN8Z

{
  "error": {
    "code": "issue_not_found",
    "message": "That problem isn't recorded any more. No changes were applied.",
    "details": {
      "issue_id": "iss_01JC00000000000000000000QX"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0D8NC5CC3B4SJEN8Z"
  }
}

A visit that isn't there

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

{
  "visit_id": "vst_01JC00000000000000000000V1"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0GRF7TR4YW7ZHD5MW

{
  "error": {
    "code": "visit_not_found",
    "message": "That visit isn't there any more. No changes were applied.",
    "details": {
      "visit_id": "vst_01JC00000000000000000000V1"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0GRF7TR4YW7ZHD5MW"
  }
}

For Rigel#

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