(Quick Reference) Service: Show a warehouse

Description: Returns the requested warehouse in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/warehouses/{id}

URL with external_id:

https://BASE_URL/api/VERSION/warehouses/reference/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe unique ID of the desired warehouseLong/Stringyes123

Success Output

Status: HTTP/1.1 200 OK

{
  "id": 4,
  "name": "entrepot1",
  "reference": "entrepot1",
  "organization": "entity1",
  "isRoot": false,
  "parentReference": "wh-01",
  "parentWhse": {
    "id": 2,
    "reference": "wh-01",
    "name": "Main warehouse",
    "href": "/api/v1.0/warehouses/2"
  },
  "description": "entrepot1",
  "address": "entrepot1",
  "isVan": false,
  "users": [
    {
      "id": 4,
      "reference": "emp-00",
      "href": "/api/v1.0/users/4"
    },
    {
      "id": 5,
      "reference": "emp-03",
      "href": "/api/v1.0/users/5"
    }
  ],
  "dateCreated": "2015-12-15T16:58:46Z",
  "lastUpdated": "2016-05-04T14:48:26Z"
}

Failure Output

Status: HTTP/1.1 404 Not Found

{
  "error": "not_found",
  "error_description": "The warehouse with the id 100 doesn't exist."
}

Status: HTTP/1.1 400 Bad Request

{
  "error": "invalid_param_type",
  "error_description": "The type of parameter id you provided is not valid for this request."
}