Skip to content
Rigel docs
Open Rigel

Stores and what they carry

shopping.store.list

GET/api/v1/households/{household_id}/queries/shopping.store.list

  • Query
  • Rigel runs it

The stores in picker order, each with its aisles in walking order and what the signs list, the product groups it carries, and how many products are placed in its aisles. Also lists every product group, so you can see which exist.

Parameters#

Stores and what they carry: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

Response#

200 The answer.

Stores and what they carry: response fields
FieldDescription
storesarray of objectsrequired
stores[].idstringrequired

A store ID, such as sto_01JC0000000000000000000000.

stores[].namestringrequired

The store's name.

stores[].addressstring or nullrequired

Its address, if known.

stores[].is_onlinebooleanrequired

Whether it is an online store.

stores[].aislesarray of objectsrequired

In walking order.

stores[].aisles[].idstringrequired

A store aisle ID, such as ais_01JC0000000000000000000000.

stores[].aisles[].labelstringrequired

The aisle or section, such as "Aisle 5" or "Produce".

stores[].aisles[].contentsstring or nullrequired

What the sign lists, as written.

stores[].aisles[].placed_product_countintegerrequired

How many products are placed in this aisle.

stores[].groups_carriedarray of objectsrequired

The product groups this store carries, by name.

stores[].groups_carried[].idstringrequired

A product group ID, such as pgr_01JC0000000000000000000000.

stores[].groups_carried[].namestringrequired

The group's name.

stores[].placed_product_countintegerrequired

How many products are placed in any of its aisles.

groupsarray of objectsrequired
groups[].idstringrequired

A product group ID, such as pgr_01JC0000000000000000000000.

groups[].namestringrequired

The group's name, such as "Trader Joe's".

groups[].member_countintegerrequired

How many products are in it.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

Stores and what they carry: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404not_foundThe 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.

List the stores and what they carry

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.store.list' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.store.list", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/shopping.store.list HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT9FBJPENBDZVNHF34KE

{
  "stores": [
    {
      "id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
      "name": "Greenway Market",
      "address": null,
      "is_online": false,
      "aisles": [
        {
          "id": "ais_01M6V9CT70YHEY2JQCG690V527",
          "label": "Produce",
          "contents": "Fruit, vegetables, salad, herbs",
          "placed_product_count": 0
        },
        {
          "id": "ais_01M6V9CT70D5FS0MQC395FBAYP",
          "label": "Aisle 1",
          "contents": "Pasta, sauce, rice, canned beans, soup, broth",
          "placed_product_count": 1
        },
        {
          "id": "ais_01M6V9CT70GY51YCQCE4FWSMKK",
          "label": "Aisle 2",
          "contents": "Baking, flour, sugar, oil, spices",
          "placed_product_count": 1
        },
        {
          "id": "ais_01M6V9CT70QB5HHFQCH5HEANWJ",
          "label": "Aisle 3",
          "contents": "Paper goods, cleaning, first aid",
          "placed_product_count": 0
        },
        {
          "id": "ais_01M6V9CT70JNDJQ7QC41ERRZK6",
          "label": "Dairy",
          "contents": "Milk, eggs, butter, yogurt, cheese",
          "placed_product_count": 1
        },
        {
          "id": "ais_01M6V9CT70HPER9AQCQJ9A9WP6",
          "label": "Frozen",
          "contents": null,
          "placed_product_count": 0
        }
      ],
      "groups_carried": [],
      "placed_product_count": 3
    },
    {
      "id": "sto_01M6V9CT6WZNZKHR0AJY8ZES10",
      "name": "Hill Hardware & Garden",
      "address": null,
      "is_online": false,
      "aisles": [],
      "groups_carried": [
        {
          "id": "pgr_01M6V9CT7846PSF8VHM36ZGEQV",
          "name": "Hardware"
        }
      ],
      "placed_product_count": 0
    },
    {
      "id": "sto_01M6V9CT6VGD5JCJFJBVAFR4B3",
      "name": "Pantry Direct",
      "address": null,
      "is_online": true,
      "aisles": [],
      "groups_carried": [],
      "placed_product_count": 0
    }
  ],
  "groups": [
    {
      "id": "pgr_01M6V9CT7846PSF8VHM36ZGEQV",
      "name": "Hardware",
      "member_count": 1
    }
  ]
}

For Rigel#

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