The Delivery Trip object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: draft
Default: false
{
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} /api/stock/delivery-trip/{id} Retrieve a delivery trip
Retrieves the details of an existing delivery trip. Supply the unique delivery trip ID that was returned from a previous request.
Path parameters
The identifier of the delivery trip to retrieve.
Returns
Returns the delivery trip object if a valid identifier was provided.
curl https://api.overplane.dev/api/stock/delivery-trip/delivery-trip_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} /api/stock/delivery-trip List all delivery trips
Returns a list of delivery trips. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of delivery trip objects.
curl https://api.overplane.dev/api/stock/delivery-trip \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
}
],
"has_more": false,
"total": 1
} /api/stock/delivery-trip Create a delivery trip
Creates a new delivery trip object.
Body parameters
Default: draft
Default: false
Returns
Returns the newly created delivery trip object if the call succeeded.
curl https://api.overplane.dev/api/stock/delivery-trip \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"company":"Example Corp","vehicle":"vehicle_example","departure_time":"departure_time_example"}' {
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} /api/stock/delivery-trip/{id} Update a delivery trip
Updates the specified delivery trip by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the delivery trip to update.
Body parameters
Default: draft
Default: false
Returns
Returns the updated delivery trip object.
curl https://api.overplane.dev/api/stock/delivery-trip/delivery-trip_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"status":"draft","company":"Example Corp"}' {
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} /api/stock/delivery-trip/{id} Delete a delivery trip
Permanently deletes a delivery trip. This cannot be undone.
Path parameters
The identifier of the delivery trip to delete.
Returns
Returns a confirmation that the delivery trip has been deleted.
curl https://api.overplane.dev/api/stock/delivery-trip/delivery-trip_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "delivery-trip_abc123",
"deleted": true
} /api/stock/delivery-trip/{id}/submit Submit a delivery trip
Submits a draft delivery trip, transitioning its status from draft to submitted.
Path parameters
The identifier of the delivery trip to act on.
Returns
Returns the delivery trip object with updated status.
curl https://api.overplane.dev/api/stock/delivery-trip/delivery-trip_abc123/submit \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} /api/stock/delivery-trip/{id}/cancel Cancel a delivery trip
Cancels a submitted delivery trip, transitioning its status to cancelled.
Path parameters
The identifier of the delivery trip to act on.
Returns
Returns the delivery trip object with updated status.
curl https://api.overplane.dev/api/stock/delivery-trip/delivery-trip_abc123/cancel \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "delivery-trip_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"email_notification_sent": false,
"driver": "driver_example",
"driver_name": "driver_name_example",
"total_distance": 0,
"uom": "uom_example",
"vehicle": "vehicle_example",
"departure_time": "departure_time_example",
"driver_address": "driver_address_example",
"driver_email": "[email protected]",
"employee": "employee_example"
} Line items
Child objects that belong to this delivery trip. These are accessed via the parent's ID.
Delivery Stop
Attributes
Endpoints
/api/stock/delivery-stop?parent_id={id} /api/stock/delivery-stop /api/stock/delivery-stop/{id} /api/stock/delivery-stop/{id} /api/stock/delivery-stop/reorder {
"id": "delivery-stop_abc123",
"idx": 1,
"delivery_trip_id": "delivery_trip_id_example",
"customer": "customer_example",
"address": "address_example",
"locked": false,
"customer_address": "customer_address_example",
"visited": false,
"delivery_note": "delivery_note_example",
"grand_total": 0,
"contact": "contact_example",
"email_sent_to": "[email protected]",
"customer_contact": "customer_contact_example",
"distance": 0,
"estimated_arrival": "estimated_arrival_example",
"lat": 0,
"uom": "uom_example",
"lng": 0,
"details": "details_example"
}