Schedule a contractor's visit
maintenance.visit.schedule
POST/api/v1/households/{household_id}/commands/maintenance.visit.schedule
- Command
- Rigel runs it
- Applies offline
Someone is coming. Records the visit and puts it on the household calendar. starts_at and the optional ends_at (the arrival window) are ISO 8601 times with a zone; ends_at before starts_at fails with invalid_range. Without property_id, the property comes from the linked items, problems or project. Everything linked must be at the same property (different_property).
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 |
|---|---|
property_idstringoptional | Which property. Leave it out when the household has one property (it's made on first use); with several, give it, or the command is rejected with property_required. |
contractor_idstringoptional | Who is coming. |
titlestringrequired | What the visit is for, such as Annual furnace service. |
starts_atstring (date-time)required | When they arrive, or the start of the arrival window. ISO 8601 with a zone. |
ends_atstring (date-time)optional | The end of the arrival window. ISO 8601 with a zone. |
asset_idsarray of stringsoptional | The items the visit concerns. |
issue_idsarray of stringsoptional | The problems the visit looked at. |
project_idstringoptional | The project this visit is part of. |
notesstringoptional | Anything to remember, such as gate codes or what to ask. |
Response#
200 The command was applied.
| Field | Description |
|---|---|
resultobjectrequired | What the command returned, such as the IDs it created. |
result.visit_idstringrequired | The new visit. |
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 | contractor_not_found | A contractor that isn't there. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | invalid_range | Ending before it starts. |
409 | different_property |
|
409 | property_required | Several properties need one named. |
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.
A visit with a window, a contractor and what it concerns
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"contractor_id": "ctr_01JC00000000000000000000K1",
"title": "Annual furnace service",
"starts_at": "2025-11-10T14:00:00Z",
"ends_at": "2025-11-10T16:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A1"
],
"issue_ids": [
"iss_01JC00000000000000000000Q1"
],
"project_id": "mpj_01JC00000000000000000000J1",
"notes": "Gate code 1234"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
contractor_id: "ctr_01JC00000000000000000000K1",
title: "Annual furnace service",
starts_at: "2025-11-10T14:00:00Z",
ends_at: "2025-11-10T16:00:00Z",
asset_ids: [
"ast_01JC00000000000000000000A1",
],
issue_ids: [
"iss_01JC00000000000000000000Q1",
],
project_id: "mpj_01JC00000000000000000000J1",
notes: "Gate code 1234",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"contractor_id": "ctr_01JC00000000000000000000K1",
"title": "Annual furnace service",
"starts_at": "2025-11-10T14:00:00Z",
"ends_at": "2025-11-10T16:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A1"
],
"issue_ids": [
"iss_01JC00000000000000000000Q1"
],
"project_id": "mpj_01JC00000000000000000000J1",
"notes": "Gate code 1234"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0TQ9ZPPZ3X6ZQQX7J
{
"result": {
"visit_id": "vst_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}Only a title and a time makes the property on first use
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"title": "Look at the fence",
"starts_at": "2025-11-10T14:00:00Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
title: "Look at the fence",
starts_at: "2025-11-10T14:00:00Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"title": "Look at the fence",
"starts_at": "2025-11-10T14:00:00Z"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R06J4TNQ6FC2RB915Z
{
"result": {
"visit_id": "vst_01JC4N0000JVP6PWJ6S8P7WZ6B"
},
"version": 1
}The property comes from the linked item when there are several
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A2"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
title: "x",
starts_at: "2025-11-10T14:00:00Z",
asset_ids: [
"ast_01JC00000000000000000000A2",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A2"
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MSEWAJ837RSXPKVX
{
"result": {
"visit_id": "vst_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}Ending when it starts is fine
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"ends_at": "2025-11-10T14:00:00Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T14:00:00Z",
ends_at: "2025-11-10T14:00:00Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"ends_at": "2025-11-10T14:00:00Z"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KW2KFR2GH0VS684X
{
"result": {
"visit_id": "vst_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}Ending before it starts
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T16:00:00Z",
"ends_at": "2025-11-10T14:00:00Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T16:00:00Z",
ends_at: "2025-11-10T14:00:00Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T16:00:00Z",
"ends_at": "2025-11-10T14:00:00Z"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R04A7C3PA7QXY3GR7Q
{
"error": {
"code": "invalid_range",
"message": "The visit can't end before it starts. No changes were applied.",
"details": {},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R04A7C3PA7QXY3GR7Q"
}
}An item at another property
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A2"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T14:00:00Z",
asset_ids: [
"ast_01JC00000000000000000000A2",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"asset_ids": [
"ast_01JC00000000000000000000A2"
]
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0STCQ6GNFY8VCCPRV
{
"error": {
"code": "different_property",
"message": "That item 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_01K9D9S2R0STCQ6GNFY8VCCPRV"
}
}A problem at another property
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"issue_ids": [
"iss_01JC00000000000000000000Q2"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T14:00:00Z",
issue_ids: [
"iss_01JC00000000000000000000Q2",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"issue_ids": [
"iss_01JC00000000000000000000Q2"
]
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0SB0ABXWTV1VKCPQC
{
"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_01K9D9S2R0SB0ABXWTV1VKCPQC"
}
}A project at another property
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"project_id": "mpj_01JC00000000000000000000J1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T14:00:00Z",
project_id: "mpj_01JC00000000000000000000J1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"project_id": "mpj_01JC00000000000000000000J1"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0NFVXK9CP7ERW2Z64
{
"error": {
"code": "different_property",
"message": "That project 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_01K9D9S2R0NFVXK9CP7ERW2Z64"
}
}A contractor that isn't there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"contractor_id": "ctr_01JC00000000000000000000K1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC00000000000000000000P1",
title: "x",
starts_at: "2025-11-10T14:00:00Z",
contractor_id: "ctr_01JC00000000000000000000K1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC00000000000000000000P1",
"title": "x",
"starts_at": "2025-11-10T14:00:00Z",
"contractor_id": "ctr_01JC00000000000000000000K1"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R092CCYVQRS17WFD1J
{
"error": {
"code": "contractor_not_found",
"message": "That contractor isn't there any more. No changes were applied.",
"details": {
"contractor_id": "ctr_01JC00000000000000000000K1"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R092CCYVQRS17WFD1J"
}
}Several properties need one named
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"title": "x",
"starts_at": "2025-11-10T14:00:00Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
title: "x",
starts_at: "2025-11-10T14:00:00Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"title": "x",
"starts_at": "2025-11-10T14:00:00Z"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0SGTK4ZD2Q2RJYGRP
{
"error": {
"code": "property_required",
"message": "This household has more than one property. Say which one. No changes were applied.",
"details": {},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0SGTK4ZD2Q2RJYGRP"
}
}Schedule a contractor's visit
The arrival window goes on the household calendar. starts_at and ends_at carry a time zone.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSYWWB5E2GWY94NREE1W' \
-d '{
"contractor_id": "ctr_01M6V9CSWEFJH8CRZCXNAH8109",
"title": "Furnace inspection and tune-up",
"starts_at": "2026-11-19T09:00:00-06:00",
"ends_at": "2026-11-19T11:00:00-06:00",
"asset_ids": [
"ast_01M6V9CSVCMZFAP6ZN5WANZ6M8"
],
"notes": "Ask about the igniter. Ben will be home."
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSYWWB5E2GWY94NREE1W",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
contractor_id: "ctr_01M6V9CSWEFJH8CRZCXNAH8109",
title: "Furnace inspection and tune-up",
starts_at: "2026-11-19T09:00:00-06:00",
ends_at: "2026-11-19T11:00:00-06:00",
asset_ids: [
"ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
],
notes: "Ask about the igniter. Ben will be home.",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSYWWB5E2GWY94NREE1W
{
"contractor_id": "ctr_01M6V9CSWEFJH8CRZCXNAH8109",
"title": "Furnace inspection and tune-up",
"starts_at": "2026-11-19T09:00:00-06:00",
"ends_at": "2026-11-19T11:00:00-06:00",
"asset_ids": [
"ast_01M6V9CSVCMZFAP6ZN5WANZ6M8"
],
"notes": "Ask about the igniter. Ben will be home."
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSYWFVBV0VEKY32S4WYD
{
"result": {
"visit_id": "vst_01M6V9CSYWPZZCJP1Q0PBTS1SF"
},
"version": 218
}Schedule a visit about a problem
A visit can name the problems it looks at.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSZ6HY7W82JXKVTG7Q15' \
-d '{
"contractor_id": "ctr_01M6V9CSWHPNYAY4A5FBX3R14F",
"title": "Look at the dishwasher drain",
"starts_at": "2026-11-12T13:00:00-06:00",
"asset_ids": [
"ast_01M6V9CSVH77630WV0WA1X2DAK"
],
"issue_ids": [
"iss_01M6V9CSYDVEZGY1GMEFWZ87YF"
],
"notes": "Is there a high loop in the drain hose?"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSZ6HY7W82JXKVTG7Q15",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
contractor_id: "ctr_01M6V9CSWHPNYAY4A5FBX3R14F",
title: "Look at the dishwasher drain",
starts_at: "2026-11-12T13:00:00-06:00",
asset_ids: [
"ast_01M6V9CSVH77630WV0WA1X2DAK",
],
issue_ids: [
"iss_01M6V9CSYDVEZGY1GMEFWZ87YF",
],
notes: "Is there a high loop in the drain hose?",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.visit.schedule HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSZ6HY7W82JXKVTG7Q15
{
"contractor_id": "ctr_01M6V9CSWHPNYAY4A5FBX3R14F",
"title": "Look at the dishwasher drain",
"starts_at": "2026-11-12T13:00:00-06:00",
"asset_ids": [
"ast_01M6V9CSVH77630WV0WA1X2DAK"
],
"issue_ids": [
"iss_01M6V9CSYDVEZGY1GMEFWZ87YF"
],
"notes": "Is there a high loop in the drain hose?"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSZ6JCQSYP71TM2J9J0D
{
"result": {
"visit_id": "vst_01M6V9CSZ6JREAG7RJGS2CZF57"
},
"version": 219
}For Rigel#
Rigel's tool for this command is maintenance_visit_schedule. Rigel runs this on its own, then says what it did. The agent guide has the rest.