Saltar al contingut principal
GET

Obtenir un magatzem per ID

Scope:inventory:warehouses.read
https://api.holded.com/api/v2/warehouses/{warehouseId}

Recupera els detalls d'un magatzem específic pel seu identificador únic.

Paràmetres

Paràmetres de ruta

warehouseIdstringobligatori

ID del magatzem (ObjectId hexadecimal de 24 caràcters)

Petició

python
import requests

url = "https://api.holded.com/api/v2/warehouses/{warehouseId}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011",
  "user_id": "string",
  "name": "string",
  "notes": "string",
  "email": "string",
  "phone": "string",
  "mobile": "string",
  "default": false,
  "color": "#3498db",
  "icon": "string",
  "address": {
    "address": "string",
    "city": "string",
    "province": "string",
    "postal_code": "string",
    "country": "string",
    "country_code": "ES"
  }
}

Respostes exitoses

200Magatzem trobatapplication/json
object
idstring

Unique identifier of the warehouse

user_idstring | null

Identifier of the user managing this warehouse

namestring

Name of the warehouse

notesstring | null

Additional notes about the warehouse

emailstring | null

Contact email for the warehouse

phonestring | null

Phone number of the warehouse

mobilestring | null

Mobile phone number of the warehouse

defaultboolean

Whether this is the default warehouse

colorstring

Color assigned to the warehouse for visual identification

iconstring

Icon identifier for the warehouse

addressobject

Physical address of the warehouse

addressstring | null
citystring | null
provincestring | null
postal_codestring | null
countrystring | null
country_codestring | null

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Magatzem no trobatapplication/json
429Límit de sol·licituds exceditapplication/json