Create a Stock Location
POST
/admin/stock-locations
Stock Locations
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.medusa-commerce.com/admin/stock-locations' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
200 - Example 1
{
"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"
}
]
}
}
}
Request
Query Params
expand
string
optional
fields
string
optional
Body Params application/json
Responses
Modified at 2023-10-10 11:56:36