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" : "http://localhost:3000/api/v1/yard_areas.json?page=1",
         "method" : "GET"
      },
      "next" : {
         "url" : "http://localhost:3000/api/v1/yard_areas.json?page=2",
         "method" : "GET"
      },
      "previous" : {
         "url" : "http://localhost:3000/api/v1/yard_areas.json?page=0",
         "method" : "GET"
      },
      "index" : {
         "method" : "GET",
         "url" : "http://localhost:3000/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 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 Integer

per
optional

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

Validations:

  • Must be Integer