Supported Formats

json

GET /api/v1/bill_of_ladings.json
Returns a list of bill of ladings.

Supported Formats

json

Errors

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

Examples

curl "https://app.octopi.co/api/v1/bill_of_ladings.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
  "bill_of_ladings": [
    {
      "id": 123,
      "bl_number": "BL_123",
      "manifest": {
        "client_identifier": "2d7fe4c0-529a-4732-9927-7eadd9ea7879",
        "manifest_id": 76015
      },
      "voyage": {
        "voyage_id": 227966,
        "voyage_number": "20210801"
        "vessel_name": "TEST"
      }
    }
  ],
  "actions" : {
    "next_page" : {
        "method" : "GET",
        "url" : "https://app.octopi.co/api/v1/bill_of_ladings.json?page=2&per=10"
    }
  }
}

Params

Param name Description
bl_number
optional

Filter bill of ladings by the bl_number.

Validations:

  • Must be a String

voyage_number
optional

Filter bill of ladings by the voyage number.

Validations:

  • Must be a String

vessel_name
optional

Filter bill of ladings by the vessel name.

Validations:

  • Must be a String

voyage_id
optional

Filter bill of ladings by the voyage id.

Validations:

  • Must be a number.

manifest_id
optional

Filter bill of ladings by the manifest id.

Validations:

  • Must be a number.

client_identifier
optional

Filter bill of ladings by the client identifier.

Validations:

  • Must be a String

page
optional

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

Validations:

  • Must be a number.

per
optional

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

Validations:

  • Must be a number.


GET /api/v1/bill_of_ladings/:id.json
Returns the given 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/bill_of_ladings/123.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
  "bill_of_lading": {
    "id": 123,
    "bl_number": "BL_123",
    "manifest": {
      "client_identifier": "2d7fe4c0-529a-4732-9927-7eadd9ea7879",
      "manifest_id": 76015
    },
    "voyage": {
      "voyage_id": 227966,
      "voyage_number": "20210801",
      "vessel_name": "TEST"
    }
  }
}

Params

Param name Description
id
required

The bill of lading ID.

Validations:

  • Must be a number.


DELETE /api/v1/bill_of_ladings/:id
Deletes the given bill of lading.

Deletes the bill of lading the same way it is deleted in Octopi. For discharge bill of ladings, the manifest movements of its cargo are deleted as well. Breakbulk and vehicles with no other movements and no dock receipt are deleted; all other cargo is kept and is no longer linked to the bill of lading. The bill of lading cannot be deleted once the tally for its manifest has started, when the manifest movements of its cargo cannot be undone, or when other records such as interchanges or dock receipts reference it. In those cases nothing is deleted and a 422 response with the reason in errors is returned.

Supported Formats

json

Errors

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

Examples

curl "https://app.octopi.co/api/v1/bill_of_ladings/123.json" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{
  "errors": [
    "Bill of Lading cannot be deleted because the tally for its manifest has already started."
  ]
}

Params

Param name Description
id
required

The bill of lading ID.

Validations:

  • Must be a number.