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": "2023-04-13T14:30:00Z",
"purposes": [
{
"purpose_type": "drop_off",
"cargo": {
"cargo_type": "container",
"container_number": "NYKU438409",
"container_type": "20DV",
"container_status": "full",
"weight": 12000,
"container_usage": "export",
"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": {
"id": 1234,
"fullname": "John Doe",
"license_number": "JD231",
"twic": "",
"number": "JD231",
"active": true,
"date_of_birth": null,
"telephone_number": null,
"email": null,
"remarks": null,
"trucking_company": "Blue Trucks",
"allowed_until": null,
"created_at": "2023-09-15T15:47:12Z",
"updated_at": "2023-09-15T15:47:12Z"
},
"comments": "On time",
"expected_at": "2023-04-13T14:30: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_id optional |
Truck driver ID. If this parameter is present, the truck_driver parameter will be ignored. Validations:
|
|
truck_driver optional |
Truck driver’s license number. If the truck_driver_id parameter is present, this will be ignored. 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’, ‘chassis’, ‘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. 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][chassis_number] optional |
Active Chassis number. Required if cargo_type is ‘chassis’. 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:
|
|
expected_at optional |
The date and time at which you expect a truck visit to use this pre advice, in ISO 8601 format (Eg 2023-04-13T14:30:00Z) Validations:
|