Skip to content
Rigel docs
Open Rigel

Put a product in an aisle at a store

shopping.product.place

POST/api/v1/households/{household_id}/commands/shopping.product.place

  • Command
  • Rigel runs it
  • Applies offline

Records which aisle a product is in at a store. source person is someone's own choice and is never replaced by Rigel; only people may use it. source rigel is Rigel's best guess: it is ignored (placed: false) when a person already placed the product. aisle_id null clears the placement, whatever its source, so Rigel can place it again.

Parameters#

Put a product in an aisle at a store: 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.

Put a product in an aisle at a store: request body fields
FieldDescription
store_idstringrequired

The store.

product_idstringrequired

The product to place.

aisle_idstring or nullrequired

An aisle of that store, or null to clear the placement.

sourceone of: rigel, personrequired

rigel: Rigel's best guess, which never replaces a person's choice. person: someone picked it; Rigel can't use this.

Response#

200 The command was applied.

Put a product in an aisle at a store: response fields
FieldDescription
resultobjectrequired

What the command returned, such as the IDs it created.

result.placedbooleanrequired

True when the product is now in the aisle; false when nothing was placed.

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.

Put a product in an aisle at a store: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404store_not_foundA store that isn't there.
404product_not_foundA product that isn't there.
404aisle_not_found
  • An aisle that isn't there.
  • An aisle of another store.
404not_foundThe household doesn't exist, or you aren't a member of it.
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.

A person places a product

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: "ais_01JC000000000000000000000A",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0ZPXS77RAXKTPD7WD

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

A person moves a product, even from Rigel's guess

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000B",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: "ais_01JC000000000000000000000B",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000B",
  "source": "person"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0VNNA4352G11G9C6B

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

Rigel's guess doesn't replace a person's choice

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

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000B",
  "source": "rigel"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0F30P628PP84CGBPJ

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

Rigel's guess replaces its own earlier guess

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

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000B",
  "source": "rigel"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0G5KHJ04AFQGR29JB

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

Placing again where it already is writes nothing

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: "ais_01JC000000000000000000000A",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0XB03QWE0VMCB0VYA

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

Null clears a person's placement

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

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "rigel"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R08Q3QESX9MD1C9KH7

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

Null with nothing placed writes nothing

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: null,
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KGSVV6017T3MDKH9

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

A store that isn't there

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: null,
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R001DRTSFJ8RXWQZ14

{
  "error": {
    "code": "store_not_found",
    "message": "That store isn't there any more. No changes were applied.",
    "details": {
      "store_id": "sto_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R001DRTSFJ8RXWQZ14"
  }
}

A product that isn't there

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: null,
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": null,
  "source": "person"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DJ5Z59A5Y2TTJ4ZE

{
  "error": {
    "code": "product_not_found",
    "message": "That product isn't there any more. No changes were applied.",
    "details": {
      "product_id": "prd_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0DJ5Z59A5Y2TTJ4ZE"
  }
}

An aisle that isn't there

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: "ais_01JC000000000000000000000A",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DF1HKX5RP9G59M2Y

{
  "error": {
    "code": "aisle_not_found",
    "message": "That aisle isn't there any more. No changes were applied.",
    "details": {
      "aisle_id": "ais_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0DF1HKX5RP9G59M2Y"
  }
}

An aisle of another store

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
  -d '{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01JC000000000000000000000A",
    product_id: "prd_01JC000000000000000000000A",
    aisle_id: "ais_01JC000000000000000000000A",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA

{
  "store_id": "sto_01JC000000000000000000000A",
  "product_id": "prd_01JC000000000000000000000A",
  "aisle_id": "ais_01JC000000000000000000000A",
  "source": "person"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0ZTB14W7C4DVZEH6M

{
  "error": {
    "code": "aisle_not_found",
    "message": "That aisle isn't there any more. No changes were applied.",
    "details": {
      "aisle_id": "ais_01JC000000000000000000000A"
    },
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0ZTB14W7C4DVZEH6M"
  }
}

Say which aisle a product is in

A person's choice is never replaced by Rigel's. source is person or rigel.

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CT74KWEN0Z2VMSK2VE7K' \
  -d '{
  "store_id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
  "product_id": "prd_01M6V9CSAWSAMCWTBQ2M7F80H9",
  "aisle_id": "ais_01M6V9CT70JNDJQ7QC41ERRZK6",
  "source": "person"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CT74KWEN0Z2VMSK2VE7K",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
    product_id: "prd_01M6V9CSAWSAMCWTBQ2M7F80H9",
    aisle_id: "ais_01M6V9CT70JNDJQ7QC41ERRZK6",
    source: "person",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CT74KWEN0Z2VMSK2VE7K

{
  "store_id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
  "product_id": "prd_01M6V9CSAWSAMCWTBQ2M7F80H9",
  "aisle_id": "ais_01M6V9CT70JNDJQ7QC41ERRZK6",
  "source": "person"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT744H428YSFR9YNM0EN

{
  "result": {
    "placed": true
  },
  "version": 267
}

Place a product as Rigel's best guess

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CT75KQ9403MK5V4R9VW1' \
  -d '{
  "store_id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
  "product_id": "prd_01M6V9CSAQDSZHDQNXHXRCDA8Z",
  "aisle_id": "ais_01M6V9CT70D5FS0MQC395FBAYP",
  "source": "rigel"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CT75KQ9403MK5V4R9VW1",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    store_id: "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
    product_id: "prd_01M6V9CSAQDSZHDQNXHXRCDA8Z",
    aisle_id: "ais_01M6V9CT70D5FS0MQC395FBAYP",
    source: "rigel",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/shopping.product.place HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CT75KQ9403MK5V4R9VW1

{
  "store_id": "sto_01M6V9CT6QQBTTA6DBQXS60NCD",
  "product_id": "prd_01M6V9CSAQDSZHDQNXHXRCDA8Z",
  "aisle_id": "ais_01M6V9CT70D5FS0MQC395FBAYP",
  "source": "rigel"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT75JPAG6T7A4XTTNMKJ

{
  "result": {
    "placed": true
  },
  "version": 268
}

For Rigel#

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