Creates a pre-advice
Code | Description |
---|---|
404 | Not found. |
422 | Unprocessable Entity. |
500 | Internal Server Error. |
curl --location --request POST 'https://app.octopi.co/api/v1/pre_advices.json' --header 'Authorization: Bearer token_value' --header 'Content-Type: application/json' --data-raw '{ "advice_number": "ADVICE1234", "truck": "TRA123", "truck_driver": "JD231", "trucking_company": "Blue Trucks", "comments": "On time", "expected_at": "4 November, 2022, 12:00 PM", "purposes": [ { "purpose_type": "drop_off", "cargo": { "cargo_type": "container", "container_number": "NYKU438409", "container_type": "20DV", "container_status": "full", "goods": "play stations", "shipping_line": "MAERSK" }, "booking": "BOOK1234", "bill_of_lading": "BOL1234", "delivery_order": "DO1234", "interchange":{ "seals": "SEAL1,SEAL2,SEAL3", "weight": 12000 } } ] }'
{ "advice_number": "ADVICE1234", "truck": "TRA123", "truck_driver": "JD231", "trucking_company": "Blue Trucks", "comments": "On time", "expected_at": "2022-11-04T12:00:00Z", "purposes": [ { "purpose_type": "drop_off", "cargo": "NYKU438409", "booking": "BOOK1234", "bill_of_lading": "BOL1234", "delivery_order": "DO1234", "interchange":{ "seals": "SEAL1,SEAL2,SEAL3", "weight": 12000 } } ] }
Param name | Description |
---|---|
advice_number optional |
Unique advice number. Should be at least 4 characters. Octopi will auto-generate one if not provided. Validations:
|
truck required |
Truck’s license plate number. Required only if your organization requires it. Validations:
|
truck_driver optional |
Truck driver’s license number. Validations:
|
trucking_company optional |
The trucking company for this pre-advice. If a truck is present, then the trucking company in this parameter must match it. Similarly, if a truck driver is present, the driver’s company must match this trucking company. Validations:
|
comments optional |
Comments for this pre-advice. Validations:
|
purposes optional |
Truck visit’s purposes (multiple purposes allowed). Validations:
|
purposes[purpose_type] required |
Purpose type. Must be one of ‘drop off’, ‘drop_off’, ‘pick up’ or ‘pick_up’. Validations:
|
purposes[cargo] optional |
Cargo details Validations:
|
purposes[cargo][cargo_type] required |
Type of Cargo. Must be one of ‘container’, ‘general cargo’ or ‘general_cargo’. Validations:
|
purposes[cargo][container_number] optional |
Container number. Required if cargo_type is ‘container’ and if the purpose is not for pick-up empty. Validations:
|
purposes[cargo][container_type] optional |
Type of Container (eg 20DV). Required when creating a new container. Validations:
|
purposes[cargo][container_status] optional |
Status of container (full/empty). Required if cargo_type is ‘container’ Validations:
|
purposes[cargo][shipping_line] optional |
Shipping line code. Required when creating a new container if the purpose is not for pick-up empty. Validations:
|
purposes[cargo][goods] optional |
Goods description. Validations:
|
purposes[cargo][container_usage] optional |
The container’s usage. Validations:
|
purposes[cargo][weight] optional |
Total weight of the container in KGs. Validations:
|
purposes[booking] optional |
A valid booking number to drop off a full container or pick up an empty. Validations:
|
purposes[bill_of_lading] optional |
A valid Bill of Lading number to pick up a full container if your organization validates BOLs. Validations:
|
purposes[delivery_order] optional |
A valid delivery order number to pick up general cargo Validations:
|
purposes[interchange] optional |
Interchange details Validations:
|
purposes[interchange][seals] optional |
Comma separated values of seals on the container Validations:
|
purposes[interchange][weight] optional |
Total weight of the container in KGs. Validations:
|