POST
Create a warehouse
Scope:
inventory:warehouses.writehttps://api.holded.com/api/v2/warehousesCreates a new warehouse in your account. Warehouses are locations where you store inventory — each product's stock is tracked per warehouse. The response returns the new warehouse `id`. The first warehouse created is automatically set as the default.
Request body
object
namestringrequired
emailstring | nulloptional
phonestring | nulloptional
mobilestring | nulloptional
defaultbooleanoptional
addressobject | nulloptional
addressstring | null
citystring | null
provincestring | null
postal_codestring | null
countrystring | null
country_codestring | null
Request
python
import requests
url = "https://api.holded.com/api/v2/warehouses"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "string",
"email": "string",
"phone": "string",
"mobile": "string",
"default": false,
"address": {
"address": "string",
"city": "string",
"province": "string",
"postal_code": "string",
"country": "string",
"country_code": "string"
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
json
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201Warehouse createdapplication/jsonobject
idstring
Error responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json