Stock Locations
Update a Stock Location
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Stock Locations
Update a Stock Location
Updates a Stock Location
PATCH
/
api
/
v2
/
platform
/
stock_locations
/
{id}
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/stock_locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"stock_location": {
"name": "Warehouse 3",
"default": true,
"address1": "South St. 8",
"address2": "South St. 109",
"country_id": "2",
"state_id": "4",
"city": "Los Angeles",
"state_name": "California",
"zipcode": "90005",
"phone": "23333456",
"active": true,
"backorderable_default": true,
"propagate_all_variants": true,
"admin_name": "<string>"
}
}'
{
"data": {
"id": "182",
"type": "stock_location",
"attributes": {
"name": "Warehouse 3",
"created_at": "2022-11-08T19:35:32.309Z",
"updated_at": "2022-11-08T19:35:32.538Z",
"default": true,
"address1": "South Street 8/2",
"address2": null,
"city": "Los Angeles",
"state_name": null,
"zipcode": "11223",
"phone": "(202) 456-1111",
"active": true,
"backorderable_default": true,
"propagate_all_variants": false,
"admin_name": null
},
"relationships": {
"country": {
"data": {
"id": "420",
"type": "country"
}
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Body
application/json
Example:
"Warehouse 3"
Example:
"South St. 8"
Example:
"South St. 109"
Example:
"2"
Example:
"4"
Example:
"Los Angeles"
Example:
"California"
Example:
"90005"
Example:
"23333456"
Was this page helpful?
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/stock_locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"stock_location": {
"name": "Warehouse 3",
"default": true,
"address1": "South St. 8",
"address2": "South St. 109",
"country_id": "2",
"state_id": "4",
"city": "Los Angeles",
"state_name": "California",
"zipcode": "90005",
"phone": "23333456",
"active": true,
"backorderable_default": true,
"propagate_all_variants": true,
"admin_name": "<string>"
}
}'
{
"data": {
"id": "182",
"type": "stock_location",
"attributes": {
"name": "Warehouse 3",
"created_at": "2022-11-08T19:35:32.309Z",
"updated_at": "2022-11-08T19:35:32.538Z",
"default": true,
"address1": "South Street 8/2",
"address2": null,
"city": "Los Angeles",
"state_name": null,
"zipcode": "11223",
"phone": "(202) 456-1111",
"active": true,
"backorderable_default": true,
"propagate_all_variants": false,
"admin_name": null
},
"relationships": {
"country": {
"data": {
"id": "420",
"type": "country"
}
}
}
}
}