(Quick Reference) Service: Show a loading

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

URL:

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

URL with external_id:

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

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired loadingLong/Stringyes123

Success Output

Status: HTTP/1.1 200 OK

{
      "id": 3,
      "reference": "10Crates",
      "warehouseReference": "entrepotA",
      "warehouse": {
        "id": 4,
        "reference": "entrepotA",
        "name": "entrepot A",
        "href": "/api/v1.0/warehouses/4"
      },
      "warehouseType": "1",
      "reason": {
        "id": 2,
        "name": "whse transaction",
        "href": "/api/v1.0/reasons/2"
      },
      "type": "1",
      "status": "1",
      "loadingDetails": [
        {
          "id": 8,
          "itemId": 495,
          "unitId": 1,
          "quantity": 7,
          "realAvailableQty": null,
     	  "availableQty": null,
          "href": "/api/v1.0/loadingDetails/8"
        }
      ],
      "organization": "entity1",
      "dateCreated": "2016-01-25T16:27:33Z",
      "lastUpdated": "2016-01-25T16:27:33Z"
}

Failure Output

Status: HTTP/1.1 404 Not Found

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