One shopping trip
shopping.trip.get
GET/api/v1/households/{household_id}/queries/shopping.trip.get
- Query
- Rigel runs it
A trip with everything it bought, in the order the items were checked off, with the minutes since the previous one, plus prices, the total and the emails it was recorded from. Items with no check time (from a receipt or an order) come last, by name. Fails with trip_not_found.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
trip_idquerystringrequired | The trip to read. |
Response#
200 The answer.
| Field | Description |
|---|---|
idstringrequired | A shopping trip ID, such as trp_01JC0000000000000000000000. |
storeobject or nullrequired | Where it was, or null when unknown or the store was removed. |
store.idstringrequired | A store ID, such as sto_01JC0000000000000000000000. |
store.namestringrequired | The store's name. |
shopped_onstringrequired | The date, YYYY-MM-DD. |
shopperobject or nullrequired | Who did the shopping, if known. |
shopper.idstringrequired | A person ID, such as per_01JC0000000000000000000000. |
shopper.namestringrequired | What the family calls them. |
item_countintegerrequired | How many things it bought. |
total_minorinteger or nullrequired | The receipt's total in minor units of the currency, if known. |
currencystring or nullrequired | ISO currency code of the total and prices. |
minutesinteger or nullrequired | Minutes from the first item checked off to the last; null when unknown. |
finished_atstring (date-time) or nullrequired | When the trip was finished; null for one recorded from a receipt. |
has_receiptbooleanrequired | Whether a receipt photo is attached. |
order_numberstring or nullrequired | The store's order number, for an order; null for a trip shopped in person. |
arrived_onstring or nullrequired | The day an order arrived, YYYY-MM-DD; null while it's on its way, and for a trip shopped in person. |
receipt_file_idstring or nullrequired | The receipt photo's file, if there is one. |
emailsarray of objectsrequired | The emails it was recorded from, oldest first: an order's confirmation, shipping and delivery. |
emails[].email_message_idstringrequired | A email message ID, such as emm_01JC0000000000000000000000. |
emails[].subjectstringrequired | No description. |
emails[].sent_atstring (date-time)required | No description. |
itemsarray of objectsrequired | |
items[].idstringrequired | A shopping trip item ID, such as tri_01JC0000000000000000000000. |
items[].product_idstringrequired | A product ID, such as prd_01JC0000000000000000000000. |
items[].namestringrequired | The product's name. |
items[].amountstring or nullrequired | How much was bought, such as "2 lb"; null when not recorded. |
items[].notestring or nullrequired | A note on the item. |
items[].price_minorinteger or nullrequired | The line's price in minor units of the currency. |
items[].brandstring or nullrequired | The brand, when a receipt said. |
items[].checked_atstring (date-time) or nullrequired | When it was checked off in the store. |
items[].minutes_since_previousinteger or nullrequired | Minutes since the previous item was checked off; null for the first and for unchecked items. |
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 | not_found | The household doesn't exist, or you aren't a member of it. |
Examples#
These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.
Open a trip
Items in the order they were checked off, with the minutes between.
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8JBJVJK865ZH4D2ZZD' \
-H "Cookie: rigel_session=$RIGEL_SESSION"const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8JBJVJK865ZH4D2ZZD", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8JBJVJK865ZH4D2ZZD HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT96Z87FH3CJRQMHHYB3
{
"id": "trp_01M6V9CT8JBJVJK865ZH4D2ZZD",
"store": {
"id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
"name": "Greenway Market"
},
"shopped_on": "2026-11-07",
"shopper": {
"id": "per_01M6V9CS6RX26JK5KVYGRN22D2",
"name": "Ada Okafor"
},
"item_count": 3,
"total_minor": 1225,
"currency": "USD",
"minutes": 0,
"finished_at": "2026-11-07T15:17:53.042Z",
"has_receipt": false,
"order_number": null,
"arrived_on": null,
"receipt_file_id": null,
"emails": [],
"items": [
{
"id": "tri_01M6V9CT8J45W20665WG2VHYPE",
"product_id": "prd_01M6V9CSAWSAMCWTBQ2M7F80H9",
"name": "Milk",
"amount": "2 gallons",
"note": "Whole, for Theo.",
"price_minor": 778,
"brand": "Hillside",
"checked_at": "2026-11-07T15:17:53.037Z",
"minutes_since_previous": null
},
{
"id": "tri_01M6V9CT8J14JY2D65HXRD3MD8",
"product_id": "prd_01M6V9CT7JAMWHZXH2HJ4HMB3Y",
"name": "Crushed tomatoes",
"amount": "2 cans",
"note": "Whole peeled are fine too.",
"price_minor": 258,
"brand": null,
"checked_at": "2026-11-07T15:17:53.038Z",
"minutes_since_previous": 0
},
{
"id": "tri_01M6V9CT8P5R3DJHW565V6EP7H",
"product_id": "prd_01M6V9CT8PPECCXEW5K4JMXH06",
"name": "Bananas",
"amount": "6",
"note": null,
"price_minor": 189,
"brand": null,
"checked_at": null,
"minutes_since_previous": null
}
]
}Open an online order
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8S4T83B9C9T7FBKE1N' \
-H "Cookie: rigel_session=$RIGEL_SESSION"const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8S4T83B9C9T7FBKE1N", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.trip.get?trip_id=trp_01M6V9CT8S4T83B9C9T7FBKE1N HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT99QHAWKAW3WAY41ZD9
{
"id": "trp_01M6V9CT8S4T83B9C9T7FBKE1N",
"store": {
"id": "sto_01M6V9CT6VGD5JCJFJBVAFR4B3",
"name": "Pantry Direct"
},
"shopped_on": "2026-11-04",
"shopper": {
"id": "per_01M6V9CS6RX26JK5KVYGRN22D2",
"name": "Ada Okafor"
},
"item_count": 2,
"total_minor": 3348,
"currency": "USD",
"minutes": null,
"finished_at": null,
"has_receipt": false,
"order_number": "PD-48213",
"arrived_on": "2026-11-06",
"receipt_file_id": null,
"emails": [],
"items": [
{
"id": "tri_01M6V9CT8S2GAWVDC9WAACM715",
"product_id": "prd_01M6V9CT8SBVFK7BC9XR4T3F4R",
"name": "Dish soap",
"amount": null,
"note": null,
"price_minor": 449,
"brand": null,
"checked_at": null,
"minutes_since_previous": null
},
{
"id": "tri_01M6V9CT8S1SYYDGC9FM5Y44RE",
"product_id": "prd_01M6V9CSB4BEJEAXJPR0K7CZD9",
"name": "Paper towels",
"amount": "12 rolls",
"note": null,
"price_minor": 2899,
"brand": "Softcore",
"checked_at": null,
"minutes_since_previous": null
}
]
}For Rigel#
Rigel's tool for this query is shopping_trip_get. Rigel runs this on its own, then says what it did. The agent guide has the rest.