Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/bill_of_ladings/:id/line_items.json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=ADD TOKEN HERE"
{ "line_items": [ { "id": 1211, "container_id": 1902, "quantity": 1.0, "container_number": "ABC123", "cargo_type": "container", "container_type_label": "20DV", "container_weight": 4000, "container_weight_unit": "kg" "flex_fields": [ { label: "flex_field_label", value: "flex_field_value" } ] } ], "actions" : { "next_page" : { "method" : "GET", "url" : "https://app.octopi.co/api/v1/bill_of_ladings/:id/line_items.json?page=2&per=10" } } }
Param name | Description |
---|---|
page optional |
Indicates which page of results to fetch. The default is 1. Validations:
|
per optional |
The number of items to be displayed per page. This default is 10 and the maximum allowed value is 100. Validations:
|
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/bill_of_ladings/:id/line_items.json" -d '{ "line_item": { "container_id": 123456789, "container_type_label": "40DV", "container_weight": 4000.0, "container_weight_unit": "kg", "flex_fields": [{ "label": "flex_field_label", "value": "flex_field_value"}] } }' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "id": 38, "container_id": 123456789, "quantity": 1.0, "container_number": "OCTO1231239", "cargo_type": "container", "container_type_label": "40DV", "container_weight": 4000.0, "container_weight_unit": "kg", "flex_fields": [ { "label": "flex_field_label", "value": "flex_field_value" } ] }
Param name | Description |
---|---|
id required |
Validations:
|
line_item optional |
Validations:
|
line_item[container_id] required |
an id of the container to be assigned to the BL line item, required, the container must belong to the organization Validations:
|
line_item[container_type_label] optional |
Container Type label to be assigned to the Line Item. Can be one of the container types defined by the organization. Validations:
|
line_item[container_weight] optional |
Weight of the Bill of Lading line item Validations:
|
line_item[container_weight_unit] optional |
Unit to be used for the Bill of Lading weight Validations:
|
line_item[flex_fields] optional |
Validations:
|
line_item[flex_fields][label] optional |
The name of the flex field Validations:
|
line_item[flex_fields][value] optional |
The value of the flex field Validations:
|
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/bill_of_ladings/:bill_of_lading_id/line_items/:id.json" -d '{ "line_item": { "container_id": 123456789, "container_type_label": "40DV", "container_weight": 4200.0, "container_weight_unit": "kg", "flex_fields": [{ "label": "flex_field_label", "value": "flex_field_value"}] } }' -X PATCH -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "id": 38, "container_id": 123456789, "quantity": 1.0, "container_number": "OCTO1231239", "cargo_type": "container", "container_type_label": "40DV", "container_weight": 4200.0, "container_weight_unit": "kg", "flex_fields": [ { "label": "flex_field_label", "value": "flex_field_value" } ] }
Param name | Description |
---|---|
bill_of_lading_id required |
Validations:
|
id required |
Validations:
|
line_item optional |
Validations:
|
line_item[container_id] optional |
An ID of the container that will assigned to the Line Item. Validations:
|
line_item[container_type_label] optional |
Container Type label assigned to the Line Item. Can be one of the container types defined by the organization. Validations:
|
line_item[container_weight] optional |
Validations:
|
line_item[container_weight_unit] optional |
Validations:
|
line_item[flex_fields] optional |
Validations:
|
line_item[flex_fields][label] optional |
The name of the flex field Validations:
|
line_item[flex_fields][value] optional |
The value of the flex field Validations:
|
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/bill_of_ladings/:bill_of_lading_id/line_items/:id.json'" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
Param name | Description |
---|---|
bill_of_lading_id required |
The bill of lading ID Validations:
|
id required |
The bill of lading line item ID Validations:
|