Assign a reader and cycle and resequence the walk order
LogsPATCH /reading-routes/{id}/plan
Changes a route's plan and returns the updated route: the assigned reader, the cycle and the walk order. Only the fields present are changed; an empty string clears the reader or the cycle, and a cycle that does not exist returns 404. points resequences the route and must list exactly the route's current meters with unique sequence_order values of 1 or more, so the meter set itself cannot change here (400 otherwise). Requires business:reading-routes:manage.
Parameters
idID of the reading route whose plan to change.
Body application/json
assigned_reader_idcycle_idpointsShow child attributes
meter_idsequence_orderwalking_notes
Returns
200 Route with its plan
Permissions business:reading-routes:manage · Roles: admin, operations, owner
curl -X PATCH "$BUSINESS_API/reading-routes/{id}/plan" \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"assigned_reader_id": "ass_2EG5HuITXuIxvU6Z3AELH6ihZOG",
"cycle_id": "cyc_2o6Z32az1oKF1ykfNkmdxACDLcy",
"points": [
{
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"sequence_order": 1,
"walking_notes": "walking notes"
}
]
}'
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$BUSINESS_API/reading-routes/{id}/plan", {
method: "PATCH",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
"assigned_reader_id": "ass_2EG5HuITXuIxvU6Z3AELH6ihZOG",
"cycle_id": "cyc_2o6Z32az1oKF1ykfNkmdxACDLcy",
"points": [
{
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"sequence_order": 1,
"walking_notes": "walking notes"
}
]
})
});
const data = await res.json();
import requests
res = requests.patch(
"$BUSINESS_API/reading-routes/{id}/plan",
headers={
"Authorization": "Bearer sk_test_..."
},
json={
"assigned_reader_id": "ass_2EG5HuITXuIxvU6Z3AELH6ihZOG",
"cycle_id": "cyc_2o6Z32az1oKF1ykfNkmdxACDLcy",
"points": [
{
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"sequence_order": 1,
"walking_notes": "walking notes"
}
]
}
)
data = res.json()
body := strings.NewReader(`{
"assigned_reader_id": "ass_2EG5HuITXuIxvU6Z3AELH6ihZOG",
"cycle_id": "cyc_2o6Z32az1oKF1ykfNkmdxACDLcy",
"points": [
{
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"sequence_order": 1,
"walking_notes": "walking notes"
}
]
}`)
req, _ := http.NewRequest("PATCH", "$BUSINESS_API/reading-routes/{id}/plan", body)
req.Header.Set("Authorization", "Bearer sk_test_...")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
Route with its plan