Skip to content

Catalog · Location

5 operations in the catalog.location namespace.

Archive a location

POST /rpc/v1/catalog.location.archiveLocation

Soft-archives the location. Rows are never deleted: inventory history and traceability records reference locations indefinitely.

Requires permission catalog.location.write and the core module on the organization’s plan.

Field Type Required Description
id string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.location.archiveLocation \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Create a location

POST /rpc/v1/catalog.location.createLocation

Requires permission catalog.location.write and the core module on the organization’s plan.

Field Type Required Description
name string yes
code string yes
kind roastery | warehouse | cafe | lab | transit | external yes
address object no
timezone string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.location.createLocation \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Get one location

POST /rpc/v1/catalog.location.getLocation

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Requires permission catalog.location.read and the core module on the organization’s plan.

Field Type Required Description
id string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.location.getLocation \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

List locations

POST /rpc/v1/catalog.location.listLocations

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Roasteries, warehouses, cafés and labs belonging to the organization.

Requires permission catalog.location.read and the core module on the organization’s plan.

Field Type Required Description
filter object no
page object no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.location.listLocations \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Update a location

POST /rpc/v1/catalog.location.updateLocation

Requires permission catalog.location.write and the core module on the organization’s plan.

Field Type Required Description
id string yes
name string no
kind roastery | warehouse | cafe | lab | transit | external no
address object no
timezone string no
isActive boolean no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.location.updateLocation \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'