- Store API
- Admin API
- Auth
- Batch Jobs
- Currencies
- Customers
- Customer Groups
- Discounts
- Draft Orders
- Gift Cards
- Inventory Items
- Invites
- Notes
- Notifications
- Orders
- Create a Reservation
- Cancel Claim's Fulfillment
- Ship a Claim's Fulfillment
- Cancel Swap's Fulfilmment
- Get Order Reservations
- Add a Shipping Method
- Create a Refund
- Get an Order
- Update an Order
- Create a Fulfillment
- Cancel a Swap
- List Orders
- Create a Swap
- Complete an Order
- Create a Swap Fulfillment
- Cancel a Claim
- Process a Swap Payment
- Ship a Fulfillment
- Capture an Order's Payments
- Archive Order
- Update a Claim
- Request a Return
- Create a Claim Fulfillment
- Ship a Swap's Fulfillment
- Cancel a Fulfilmment
- Create a Claim
- Cancel an Order
- Order Edits
- Payments
- Payment Collections
- Product Collections
- Product Tags
- Product Types
- Product Variants
- Price Lists
- Products
- Product Categories
- Publishable Api Keys
- Reservations
- Regions
- Return Reasons
- Returns
- Sales Channels
- Shipping Options
- Shipping Profiles
- Stock Locations
- Store
- Swaps
- Uploads
- Tax Rates
- Users
- 【Demo】Products
Update a Stock Location
POST
/admin/stock-locations/{id}
Admin API/Stock LocationsStock Locations
Request
Path Params
id
string
required
Query Params
expand
string
optional
fields
string
optional
Body Params application/json
name
string
optional
address_id
string
optional
metadata
object
optional
Example:
{"car":"white"}
address
object (Stock Location Address Input)
optional
address_1
string
required
Example:
35, Jhon Doe Ave
address_2
string
optional
Example:
apartment 4432
city
string
optional
Example:
Mexico city
country_code
string
required
Example:
MX
phone
string
optional
Example:
+1 555 61646
postal_code
string
optional
Example:
HD3-1G8
province
string
optional
Example:
Sinaloa
metadata
object
optional
Example:
{"car":"white"}
Example
{
"name": "string",
"address_id": "string",
"metadata": {
"car": "white"
},
"address": {
"address_1": "35, Jhon Doe Ave",
"address_2": "apartment 4432",
"city": "Mexico city",
"country_code": "MX",
"phone": "+1 555 61646",
"postal_code": "HD3-1G8",
"province": "Sinaloa",
"metadata": {
"car": "white"
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/stock-locations/' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
stock_location
object (StockLocationExpandedDTO)
required
id
string
required
Example:
sloc_51G4ZW853Y6TFXWPG5ENJ81X42
address_id
string
required
Example:
laddr_05B2ZE853Y6FTXWPW85NJ81A44
name
string
required
Example:
Main Warehouse
created_at
string <date-time>
required
updated_at
string <date-time>
required
deleted_at
string <date-time>
optional
metadata
object
optional
Example:
{"car":"white"}
address
object
optional
sales_channels
object
Sales Channel
Example
{
"stock_location": {
"id": "sloc_51G4ZW853Y6TFXWPG5ENJ81X42",
"address_id": "laddr_05B2ZE853Y6FTXWPW85NJ81A44",
"name": "Main Warehouse",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"metadata": {
"car": "white"
},
"address": {
"id": "laddr_51G4ZW853Y6TFXWPG5ENJ81X42",
"address_1": "35, Jhon Doe Ave",
"address_2": "apartment 4432",
"company": "Medusa",
"city": "Mexico city",
"country_code": "MX",
"phone": "+1 555 61646",
"postal_code": "HD3-1G8",
"province": "Sinaloa",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"metadata": {
"car": "white"
}
},
"sales_channels": {
"id": "sc_01G8X9A7ESKAJXG2H0E6F1MW7A",
"name": "Market",
"description": "Multi-vendor market",
"is_disabled": false,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"metadata": {
"car": "white"
},
"locations": [
{
"id": "scloc_01G8X9A7ESKAJXG2H0E6F1MW7A",
"sales_channel_id": "sc_01G8X9A7ESKAJXG2H0E6F1MW7A",
"location_id": "string",
"sales_channel": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
]
}
}
}
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2024-05-23 07:10:14