Delivery Orders

GET https://leads.qreq.com/api/delivery-orders
curl --request GET \
--url 'https://leads.qreq.com/api/delivery-orders' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "data": { "current_page": 1, "data": [ { "id": 1, "delivery_number": "DO-000001", "name": "test", "description": "test", "sales_order_id": null, "account_id": 3, "contact_id": 3, "shipping_provider_type_id": 1, "delivery_date": "2025-11-06T00:00:00.000000Z", "expected_delivery_date": "2025-11-17T00:00:00.000000Z", "status": "delivered", "tracking_number": "0121", "total_weight": "0.00", "shipping_cost": "0.00", "created_by": 9, "created_at": "2025-11-06T09:06:39.000000Z", "updated_at": "2025-11-06T09:08:44.000000Z", "formatted_status": "Delivered", "account": { "id": 3, "name": "test account" }, "contact": { "id": 3, "name": "test contact" }, "shipping_provider_type": { "id": 1, "name": "test" } } ], "first_page_url": "https://leads.qreq.com/api/delivery-orders?page=1", "last_page": 1, "per_page": 10, "total": 1 } }
GET https://leads.qreq.com/api/delivery-orders/{delivery_order_id}
curl --request GET \
--url 'https://leads.qreq.com/api/delivery-orders/{delivery_order_id}' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "data": { "id": 1, "delivery_number": "DO-000001", "name": "test", "description": "test", "sales_order_id": null, "account_id": 3, "contact_id": 3, "delivery_date": "2025-11-06T00:00:00.000000Z", "expected_delivery_date": "2025-11-17T00:00:00.000000Z", "status": "delivered", "tracking_number": "0121", "total_weight": "0.00", "shipping_cost": "0.00", "created_by": 9, "created_at": "2025-11-06T09:06:39.000000Z", "updated_at": "2025-11-06T09:08:44.000000Z", "account": { "id": 3, "name": "test account", "email": "[email protected]" }, "contact": { "id": 3, "name": "test contact", "phone": "031526356322" }, "shipping_provider_type": { "id": 1, "name": "test", "color": "#5c9aff" }, "creator": { "id": 9, "name": "marshall", "email": "[email protected]" }, "products": [] } }
POST https://leads.qreq.com/api/delivery-orders
Parameter Einzelheiten Beschreibung
name ErforderlichZeichenfolge Delivery order name
description OptionalZeichenfolge Short description
sales_order_id OptionalGanzzahl Related sales order ID
account_id OptionalGanzzahl Associated account ID
contact_id OptionalGanzzahl Associated contact ID
shipping_provider_type_id OptionalGanzzahl Shipping provider type ID
delivery_date ErforderlichDate Delivery date
expected_delivery_date OptionalDate Expected delivery date (after delivery_date)
status OptionalZeichenfolge Status: pending, in_transit, delivered, cancelled
assigned_to OptionalGanzzahl User ID to assign the delivery to
products OptionalArray Array of products (product_id, quantity, unit_weight)
curl --request POST \
--url 'https://leads.qreq.com/api/delivery-orders' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Test Delivery", "description": "Deliver to customer", "sales_order_id": null, "account_id": 3, "contact_id": 3, "shipping_provider_type_id": 1, "delivery_date": "2025-11-06", "expected_delivery_date": "2025-11-17", "status": "pending", "assigned_to": null, "products": [ { "product_id": 1, "quantity": 2, "unit_weight": 0.5 } ] }'
{ "success": true, "message": "Delivery order created successfully.", "data": { "id": 1, "delivery_number": "DO-000001", "status": "pending", "created_by": 9, "created_at": "2025-11-06T09:06:39.000000Z" } }
PUT https://leads.qreq.com/api/delivery-orders/{delivery_order_id}
Parameter Einzelheiten Beschreibung
name ErforderlichZeichenfolge Delivery order name
description Optional Short description
delivery_date Erforderlich Delivery date
expected_delivery_date Optional Expected delivery date (after delivery_date)
status Optional Status: pending, in_transit, delivered, cancelled
assigned_to Optional User ID to assign the delivery to
products Optional Array of products (product_id, quantity, unit_weight)
curl --request PUT \
--url 'https://leads.qreq.com/api/delivery-orders/{delivery_order_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated Delivery Name", "delivery_date": "2025-11-07", "expected_delivery_date": "2025-11-18", "status": "in_transit", "products": [ { "product_id": 1, "quantity": 3, "unit_weight": 0.5 } ] }'
{ "success": true, "message": "Delivery order updated successfully.", "data": { "id": 1, "delivery_number": "DO-000001", "status": "in_transit", "updated_at": "2025-11-06T09:08:44.000000Z" } }
DELETE https://leads.qreq.com/api/delivery-orders/{delivery_order_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/delivery-orders/{delivery_order_id}' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "message": "Delivery order deleted successfully." }
PUT https://leads.qreq.com/api/delivery-orders/{delivery_order_id}/toggle-status
curl --request PUT \
--url 'https://leads.qreq.com/api/delivery-orders/{delivery_order_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
{ "success": true, "message": "Delivery order status updated successfully.", "data": { "id": 1, "status": "in_transit", "updated_at": "2025-11-06T09:10:00.000000Z" } }
PUT https://leads.qreq.com/api/delivery-orders/{delivery_order_id}/assign-user
Parameter Einzelheiten Beschreibung
assigned_to ErforderlichGanzzahl User ID to assign the delivery order to
curl --request PUT \
--url 'https://leads.qreq.com/api/delivery-orders/{delivery_order_id}/assign-user' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "assigned_to": 24 }'
{ "success": true, "message": "User assigned successfully.", "data": { "id": 1, "assigned_to": 24, "updated_at": "2025-11-06T09:15:00.000000Z" } }