MetorialDocs

Stores

Create and manage instance stores backed by Cargo.

The Store object

store.json
{
  "object": "store",
  "id": "example_id",
  "name": "example_name",
  "access": "private",
  "item_count": 0,
  "created_at": "2026-09-29T11:53:10.477Z",
  "updated_at": "2026-09-29T11:53:10.477Z"
}
object"store"required
idstringrequired
namestringrequired
access"private" | "public_read" | "public_write"required
item_countnumberrequired
created_atdaterequired
updated_atdaterequired

Endpoints

List stores

GET/stores

Returns a paginated list of stores owned by the instance.

Query parameters

idstring or string[]optional

Filter by store ID

Example request

curl -X GET "https://api.metorial.com/stores" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Create store

POST/stores

Creates a new store for the instance.

Request body

namestringrequired
access"private" | "public_read" | "public_write"optional
template_idstringoptional
parent_idstringoptional

Example request

curl -X POST "https://api.metorial.com/stores" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "access": "private",
  "template_id": "example_template_id",
  "parent_id": "example_parent_id"
}'

Get store by ID

GET/stores/:store_id

Retrieves a store by its ID.

Path parameters

store_idstringrequired

The unique identifier for the store

Example request

curl -X GET "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Update store by ID

PATCH/stores/:store_id

Updates a specific store.

Path parameters

store_idstringrequired

The unique identifier for the store

Request body

namestringoptional
access"private" | "public_read" | "public_write"optional

Example request

curl -X PATCH "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "access": "private"
}'

Delete store by ID

DELETE/stores/:store_id

Deletes a specific store.

Path parameters

store_idstringrequired

The unique identifier for the store

Example request

curl -X DELETE "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Modify store items

PATCH/stores/:store_id/items

Applies bulk item operations to a specific store.

Path parameters

store_idstringrequired

The unique identifier for the store

Request body

Example request

curl -X PATCH "https://api.metorial.com/stores/sto_Rm4Mnheq2bfEPhBhP7SY/items" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "operations": [
    {
      "type": "add"
    },
    {
      "type": "add"
    }
  ]
}'