Supported Formats

json

GET /api/v1/voyages/:voyage_number/bill_of_ladings.json

This endpoint returns a list of bill of ladings and their packing list items for a voyage.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not Found.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR_TOKEN"
{
   "bill_of_ladings":[
     {
       "manifest":{
         "client_identifier":null
       },
       "cargo" : [
         {
            "container_type" : {
               "iso_type_code" : "20T0",
               "description" : "",
               "code" : "20TK"
            },
            "id" : 12,
            "actions" : {
               "show" : {
                  "method" : "GET",
                  "url" : "https://app.octopi.co/api/v1/containers/ABCU1234567.json"
               },
               "movements" : {
                  "method" : "GET",
                  "url" : "https://app.octopi.co/api/v1/containers/ABCU1234567/movements.json"
               }
            },
            "quantity" : 1,
            "reference_number" : null,
            "cargo_type" : "container",
            "number" : "ABCU1234567",
            "package_type_code" : null,
            "description" : "REFRIGRATED LIQUID OXYGEN"
         },
         {
            "package_type_code" : "IA",
            "package_type" : "pkg",
            "description" : "BANANAS",
            "id" : 25,
            "reference_number" : '121agda12',
            "actions" : {
               "show" : {
                 "url" : "https://app.octopi.co/api/v1/containers/25.json",
                  "method" : "GET"
               },
               "movements" : {
                  "method" : "GET",
                  "url" : "https://app.octopi.co/api/v1/containers/25/movements.json"
               }
            },
            "cargo_type" : "breakbulk",
            "number" : null,
            "quantity" : 225
         }
       ],
       "number":"COSU6156797970",
       "quantity": "1,
       "remarks":null,
       "weight":22048.0,
       "volume_in_cubic_meters":"0.00",
       "goods_description":"13 PALLETS 1,194 PCSAUTOMOTIVE BATTERIESCONTRACT NO. : 2P17100001",
       "destination_code": "S4B4",
       "usage": "import",
       "port_of_loading":{
         "locode":"JMKST"
       },
       "port_of_discharge":{
         "locode":"HTPAP"
       },
       "consignee":{
         "id": 123,
         "name":"P.R.ENTREPRISE S.A."
       },
       "consignee_address":null,
       "exporter":{
         "name":"ATLASBX CO., LTD"
       },
       "exporter_address":null,
       "shipping_marks":"M",
       "package_type":{
         "code":"1D",
         "description": "Drum"
       },
       "has_packing_list_items":false,
       "packing_list_items":[]},
       "actions":{
         "show":{
           "method":"GET",
           "url":"http://app.octopi.co/api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/COSU6156797970.json"
         }
       }
     },
     {
       "manifest":{
         "client_identifier":null
       },
       "number":"COSU6156797975",
       "quantity":1,
       "remarks":null,
       "weight":22048.0,
       "volume_in_cubic_meters":"0.00",
       "goods_description":"13 PALLETS 1,194 PCSAUTOMOTIVE BATTERIESCONTRACT NO. : 2P17100001",
       "destination_code": "S4B4",
       "usage": "import",
       "port_of_loading":{
         "locode":"JMKST"
       },
       "port_of_discharge":{
         "locode":"HTPAP"
       },
       "consignee":{
         "id": 444,
         "name":"P.R.ENTREPRISE S.A.",
         "address": "10 Wall St"
       },
       "consignee_address": "10 Wall St",
       "exporter":{
         "id": 1231,
         "name":"ATLASBX CO., LTD",
         "address": "123 Main St"
       },
       "exporter_address": "123 Main St",
       "shipping_marks":"M",
       "package_type":{
         "code":"1D",
         "description": "Drum"
       },
       "has_packing_list_items":true,
       "packing_list_items":[
         {
           "id":27908,
           "reference_number":"ELNUMBER",
           "bill_of_lading":{
             "number":"COSU6156797975"
           },
           "container":{
             "number":"CCLU3597801"
           },
           "consignee":{
             "name":"ACCENT DECOR  CADEAUX"
           },
           "quantity":100,
           "weight":0.0,
           "volume":0.0,
           "package_type":{
             "code":"1D",
             "description":"drum"
           },
           "description":"STUFF",
           "consignee_address":"",
           "shipping_marks":"",
           "dock_receipt_number":"",
           "has_been_stripped":false,
           "has_been_delivered":false,
           "stripped_quantity":0
         }
       ]
       "actions":{
         "show":{
           "method":"GET",
           "url":"http://app.octopi.co/api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/COSU6156797975.json"
         }
       }
     }
   ]
 }

Params

Param name Description
voyage_number
required

Validations:

  • Must be a String


GET /api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/BILL_OF_LADING_NUMBER.json

This API endpoint will return a bill of lading.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not Found.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/BILL_OF_LADING_NUMBER.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
  "bill_of_lading": {
    "manifest":{
     "client_identifier":null
    },
    "number":"COSU6156797970",
    "quantity":1,
    "remarks":null,
    "weight":22048.0,
    "volume_in_cubic_meters":"0.00",
    "goods_description":"13 PALLETS 1,194 PCSAUTOMOTIVE BATTERIESCONTRACT NO. : 2P17100001",
    "destination_code": "S4B4",
    "usage": "import",
    "manifested_count": 2,
    "cargo_at_terminal_destination_count":2,
    "cargo_at_terminal_count":2,
    "cargo_delivered_count":1,
    "packing_list_items_at_terminal_destination_count":2,
    "packing_list_items_at_terminal_count":2,
    "packing_list_items_delivered_count":0,
    "port_of_loading":{
     "locode":"JMKST"
    },
    "port_of_discharge":{
      "locode":"HTPAP"
    },
    "consignee":{
      "id": 444,
      "name":"P.R.ENTREPRISE S.A.",
      "address": "10 Wall St"
    },
    "consignee_address": "10 Wall St",
    "exporter":{
      "id": 1231,
      "name":"ATLASBX CO., LTD",
      "address": "123 Main St"
    },
    "exporter_address": "123 Main St",
    "shipping_marks":"M",
    "package_type":{
      "code":"1D",
      "description": "Drum"
    },
    "has_packing_list_items":false,
    "cargo":[{
      "number": "12345RACK",
      "size": "20GT",
      "is_reefer": true,
      "reefer_plugged_in_time_in_hours": 8
      "reefer_plugged_in_time_in_minutes": 60
      "reefer_plug_movements" [{
        "plug_action": "plugged_in",
        "plug_action_at": "2018-02-22T01:12:14Z"
      }]
      "cargo_type": "container",
      "container_status": "full",
      "weight": 34556,
      ...
    }],
    "packing_list_items":[
      {
        "id":200214,
        "reference_number":"",
        "bill_of_lading":{"number":"number:one"},
        "container":{"number":"BMLU5000813"},
        "consignee":{"name":"CABBAGE PALM INVESTMENTS INC"},
        "quantity":100,
        "weight":0.0,
        "volume":0.0,
        "package_type":
          {
            "code":"1D",
            "description":"drum"
          },
        "description":"100 drums",
        "consignee_address":"",
        "shipping_marks":"",
        "dock_receipt_number":"",
        "has_been_stripped":false,
        "has_been_delivered":false,
        "stripped_quantity":0
      },
      {
        "id":200213,
        "reference_number":"",
        "bill_of_lading":{
          "number":"number:one"
        },
        "container":{
          "number":"BMLU5000813"
        },
        "consignee":{
          "name":"ACCENT & DECOR INC"
        },
        "quantity":100,
        "weight":0.0,
        "volume":0.0,
        "package_type":{
          "code":"2C",
          "description":"barrel"
        },
        "description":"2c Barrels",
        "consignee_address":"",
        "shipping_marks":"",
        "dock_receipt_number":"",
        "has_been_stripped":false,
        "has_been_delivered":false,
        "stripped_quantity":75
       }
    ],
    "actions":{
      "show":{
        "method":"GET",
        "url":"http://app.octopi.co/api/v1/voyages/VOYAGE_NUMBER/bill_of_ladings/COSU6156797970.json"
      }
    }
  }
}

Params

Param name Description
voyage_number
required

The bill of lading number.

Validations:

  • Must be a String

bill_of_lading_number
required

The bill of lading number.

Validations:

  • Must be a String