Supported Formats

json

GET /api/v1/yard_areas.json
Gets a list of yard areas

This API endpoint allows you to fetch information about yard areas.

Supported Formats

json

Errors

Code Description
404 Not Found
400 Invalid request.
500 Server crashed.

Examples

curl "https://app.octopi.co/api/v1/yard_areas.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE" -d '{"terminal_id": 5}'
{
   "yard_areas" : [
      {
         "name" : "A",
         "current_containers_count" : 73,
         "area_type" : "grid",
         "capacity" : "20x9x2",
         "id" : 455,
         "current_teu_count" : 146,
         "description" : "Area used for reefers",
         "terminal" : {
            "name" : "Port Miami",
            "id" : 2
         }
      }
   ],
   "actions" : {
     "last" : {
       "url" : "https://app.octopi.co/api/v1/yard_areas.json?page=1",
       "method" : "GET"
     },
     "next" : {
       "url" : "https://app.octopi.co/api/v1/yard_areas.json?page=2",
       "method" : "GET"
     },
     "previous" : {
       "url" : "https://app.octopi.co/api/v1/yard_areas.json?page=0",
       "method" : "GET"
     },
     "index" : {
       "method" : "GET",
       "url" : "https://app.octopi.co/api/v1/yard_areas"
     }
   }
}

Params

Param name Description
terminal_id
optional

Filter for a specific terminal. You must pass the terminal’s Octopi ID.

Validations:

  • Must be a String

area_type
optional

Validations:

  • Must be one of: grid, heap, warehouse.

page
optional

Specify which page of results to fetch. This value defaults to 1.

Validations:

  • Must be a Integer

per
optional

The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100.

Validations:

  • Must be a Integer


GET /api/v1/yard_areas/:id.json

This API endpoint allows you to fetch information about a yard area.

Supported Formats

json

Errors

Code Description
404 Not Found
400 Invalid request.
500 Server crashed.

Examples

curl "https://app.octopi.co/api/v1/yard_areas/54321.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
 {
  "yard_area": {
   "id": 54321,
   "name": "A",
   "description": "Area used for reefers",
   "area_type": "grid",
   "capacity": "20x9x2",
   "terminal": {"id": 2, "name": "Port Miami"},
   "current_containers_count": 73,
   "current_teu_count": 146,
   "yard_slots": [
      {
        "id": 5,
        "custom_name": "slot 1",
        "description": nil,
        "row": 1,
        "depth": 1,
        "height": 1,
        "lat": nil,
        "lng": nil,
        "enabled": true
      }
    ]
  }
}