Updates the fields of an existing appointment and/or reschedule an appointment.
Code | Description |
---|---|
404 | Not found. |
422 | Unprocessable Entity. |
500 | Internal Server Error. |
curl --location --request PUT 'https://app.octopi.co/api/v1/appointments/OCTOAPPT1108301' --header 'Authorization: Bearer token_value' --header 'Content-Type: application/json' --data-raw '{ "appointment_date_time": "2023-08-24T09:30:00Z", "terminal": "Main Terminal", "reschedule_reason": "Late Arrival.", "truck_driver_license": "LIDEW9784FY", "comment": "Rescheduled appointment due to delay, changed truck driver, and updated container.", "purposes": [ { "purpose_type": "drop_off", "cargo": { "cargo_type": "container", "container_number": "CMAU2101273", "container_status": "full" }, "booking": "RUNNINGBOOKING", "delivery_order": "dol" } ] }'
{ "appointment_number": "OCTOAPPT1108602", "appointment_slot_id": 1096, "appointment_date": "2023-08-24", "appointment_timings": "03:00 PM - 04:00 PM", "status": "Pending", "truck": "TN01CH0010", "truck_driver": { "id": 1234, "fullname": "John Doe", "license_number": "LIDEW9784FY", "twic": "", "number": "633353", "active": true, "date_of_birth": null, "telephone_number": null, "email": null, "remarks": null, "trucking_company": "FAST DELIVERIES, INC", "allowed_until": null, "created_at": "2017-09-15T15:47:12Z", "updated_at": "2023-09-15T15:47:12Z" }, "trucking_company": "TruckingCo1", "truck_visit": null, "comment": "Rescheduled appointment due to delay, changed truck driver, and updated container.", "reschedule_reason": "Late Arrival.", "purposes": [ { "purpose_type": "drop_off", "cargo_type": "container", "cargo_status": "full", "cargo": "CMAU2101273", "container_usage": null, "booking": "RUNNINGBOOKING", "bill_of_lading": null, "delivery_order": "dol" } ] }
Param name | Description |
---|---|
appointment_number required |
The appointment’s number. Validations:
|
appointment_slot_id optional |
Specify the new appointment slot to which you want to reschedule the appointment to. Either appointment_slot_id or appointment_date_time is mandatory for rescheduling an appointment. Validations:
|
appointment_date_time optional |
The date and time at which you want to reschedule the appointment for, in ISO 8601 format (Eg 2023-08-18T14:00:00Z) in UTC. Either appointment_date_time or appointment_slot_id is mandatory for rescheduling an appointment. Validations:
|
terminal optional |
The name of the terminal to which you want to reschedule the appointment. Terminal is mandatory if there are multiple active terminals present for your organization and you are passing the appointment_date_time instead of appointment_slot_id. Validations:
|
reschedule_reason optional |
The reason for rescheduling the appointment. Required if you want to reschedule the appointment. Validations:
|
truck_license optional |
Truck’s license plate number. Validations:
|
truck_driver_id optional |
Truck driver ID. If this parameter is present, the truck_driver_license parameter will be ignored. Validations:
|
truck_driver_license 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 appointment. 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:
|
comment optional |
Comments for this appointment. Validations:
|
purposes optional |
Truck visit’s purposes (multiple purposes allowed). The purposes provided in this API will override the existing purposes in that appointment. Validations:
|
purposes[cargo] optional |
Cargo details Validations:
|
purposes[cargo][purpose_type] required |
Purpose type. Validations:
|
purposes[cargo][cargo_type] required |
Type of 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] required |
Status of container. 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[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:
|