Catalog · Location
5 operations in the catalog.location namespace.
catalog.location.archiveLocation
Section titled “catalog.location.archiveLocation”Archive a location
POST /rpc/v1/catalog.location.archiveLocationSoft-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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'catalog.location.createLocation
Section titled “catalog.location.createLocation”Create a location
POST /rpc/v1/catalog.location.createLocationRequires permission catalog.location.write and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
code |
string | yes | |
kind |
roastery | warehouse | cafe | lab | transit | external |
yes | |
address |
object | no | |
timezone |
string | no |
Example
Section titled “Example”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 '{}'catalog.location.getLocation
Section titled “catalog.location.getLocation”Get one location
POST /rpc/v1/catalog.location.getLocationAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'catalog.location.listLocations
Section titled “catalog.location.listLocations”List locations
POST /rpc/v1/catalog.location.listLocationsAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
filter |
object | no | |
page |
object | no |
Example
Section titled “Example”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 '{}'catalog.location.updateLocation
Section titled “catalog.location.updateLocation”Update a location
POST /rpc/v1/catalog.location.updateLocationRequires permission catalog.location.write and the core module on the organization’s plan.
Request
Section titled “Request”| 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 |
Example
Section titled “Example”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 '{}'