Stock Locations API Routes
A stock location is where stock-kept items (products) are kept.
Stock locations are linked to fulfillment providers used to fulfill items from this location.
A stock location is also link to a fulfillment set, indicating where an item is fulfilled from when an order is placed.
These API routes allow admin users to manage stock locations and their linked data.
GET /admin/stock-locations#
List Stock Locations
Retrieve a list of stock locations. The stock locations can be filtered by fields such as id. The stock locations can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionalnamestring | string[]Optionaladdress_idstring | string[]Optionalsales_channel_idstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberstock_locationsobject[]The list of stock locations.
stock_locationsobject[]estimate_countnumberOptional400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/stock-locations#
Create Stock Location
Create a stock location.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
namestringaddress_idstringOptionaladdressobjectOptionalThe details of the stock location address to create.
addressobjectOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/stock-locations/{id}#
Get a Stock Location
Retrieve a stock location by its ID. You can expand the stock location's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/stock-locations/{id}#
Update a Stock Location
Update a stock location's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
namestringOptionaladdressobjectOptionalThe details of the stock location address to create.
addressobjectOptionaladdress_idstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/stock-locations/{id}#
Delete a Stock Location
Delete a stock location.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "stock_location"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/stock-locations/{id}/fulfillment-providers#
Manage Fulfillment Providers of a Stock Location
Manage the fulfillment providers to add or remove them from a stock location.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
addstring[]Optionalremovestring[]OptionalRequest examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/stock-locations/{id}/fulfillment-sets#
Add Fulfillment Set to Stock Location
Create and add a fulfillment set to a stock location.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
namestringtypestringRequest examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/stock-locations/{id}/sales-channels#
Manage Sales Channels of a Stock Location
Manage the sales channels in a stock location by adding or removing them.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
addstring[]Optionalremovestring[]OptionalRequest examples
Responses
200 OK
stock_locationobjectThe stock location's details.
stock_locationobject400, 401, 404, 409, 422, 500: an error response is returned.