Skip to main content

Warehouse Package Scan

1 API call in this section.

Scan Delivery Package

Warehousing / Warehouse Package Scan
GET/warehousing/package-scan/{{delivery_barcode}}?tenant_id={{tenant_id}}&language=en

Scans a parent P&D delivery package barcode such as DEL1001 and returns a navigation instruction for the warehouse frontend. Authentication and access - Requires an authenticated user with a warehouse role. - The user must have an active warehouse_staff assignment for the receiving order's warehouse. - The warehouse must be active. Behavior - This endpoint is read-only and does not receive inventory, execute an outbound delivery, or complete a handoff. - The barcode must start with DEL and match receiving_orders.external_reference. - open_receiving_order directs the frontend to the receiving-order detail page. - open_handoff directs the frontend to the handoff detail page. - show_error indicates an inconsistent package workflow requiring investigation. Frontend routing - For open_receiving_order, navigate using entity_id as the receiving-order ID. - For open_handoff, navigate using entity_id as the handoff ID.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/warehousing/package-scan/{{delivery_barcode}}?tenant_id={{tenant_id}}&language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Path parameters

delivery_barcodeRequired
path string

Variable used inside the request path.

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant. Optional when available from the authenticated context.

languageOptional
query string

en

Response language.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Open Receiving Order - Ready To Receive200OK
Response body
json
1{2  "success": true,3  "action": "open_receiving_order",4  "entity_id": "receiving-order-uuid",5  "reason": "package_ready_to_receive",6  "message": "The package is ready to be received",7  "barcode": "DEL1001",8  "warehouse_context": {9    "staff_id": "warehouse-staff-uuid",10    "staff_role": "receiver",11    "warehouse": {12      "id": "warehouse-uuid",13      "name": "Main Warehouse",14      "code": "WH001",15      "status": "active"16    }17  },18  "receiving_order": {19    "id": "receiving-order-uuid",20    "reference_number": "RO-1001",21    "status": "pending"22  },23  "items": [24    {25      "id": "inventory-item-uuid",26      "sku": "PKG-1001",27      "name": "Delivery Package DEL1001",28      "barcode": "DEL1001",29      "item_code": "PKG-1001",30      "inbound_delivery_id": "inbound-delivery-uuid",31      "outbound_delivery_id": "outbound-delivery-uuid"32    }33  ],34  "inbound_deliveries": [35    {36      "id": "inbound-delivery-uuid",37      "delivery_code": "DEL1001A",38      "direction": "inbound",39      "status": "delivered"40    }41  ],42  "outbound_deliveries": [43    {44      "id": "outbound-delivery-uuid",45      "delivery_code": "DEL1001B",46      "direction": "outbound",47      "status": "draft"48    }49  ],50  "handoff": null51}
Open Receiving Order - Execute Outbound200OK
Response body
json
1{2  "success": true,3  "action": "open_receiving_order",4  "entity_id": "receiving-order-uuid",5  "reason": "outbound_ready_to_execute",6  "message": "The package is received and the outbound delivery is ready to execute",7  "barcode": "DEL1001",8  "warehouse_context": {9    "staff_id": "warehouse-staff-uuid",10    "staff_role": "receiver",11    "warehouse": {12      "id": "warehouse-uuid",13      "name": "Main Warehouse",14      "code": "WH001",15      "status": "active"16    }17  },18  "receiving_order": {19    "id": "receiving-order-uuid",20    "reference_number": "RO-1001",21    "status": "received"22  },23  "items": [],24  "inbound_deliveries": [],25  "outbound_deliveries": [26    {27      "id": "outbound-delivery-uuid",28      "delivery_code": "DEL1001B",29      "direction": "outbound",30      "status": "draft"31    }32  ],33  "handoff": null34}
Open Handoff200OK
Response body
json
1{2  "success": true,3  "action": "open_handoff",4  "entity_id": "handoff-uuid",5  "reason": "handoff_ready",6  "message": "The package is ready for warehouse handoff",7  "barcode": "DEL1001",8  "warehouse_context": {9    "staff_id": "warehouse-staff-uuid",10    "staff_role": "receiver",11    "warehouse": {12      "id": "warehouse-uuid",13      "name": "Main Warehouse",14      "code": "WH001",15      "status": "active"16    }17  },18  "receiving_order": {19    "id": "receiving-order-uuid",20    "reference_number": "RO-1001",21    "status": "received"22  },23  "items": [],24  "inbound_deliveries": [],25  "outbound_deliveries": [26    {27      "id": "outbound-delivery-uuid",28      "delivery_code": "DEL1001B",29      "direction": "outbound",30      "status": "pending"31    }32  ],33  "handoff": {34    "id": "handoff-uuid",35    "status": "pending",36    "delivery_id": "outbound-delivery-uuid",37    "picking_order_id": "picking-order-uuid",38    "driver_id": null,39    "warehouse_staff_id": null,40    "initiated_at": "2026-06-10T10:00:00Z",41    "completed_at": null42  }43}
Error - Barcode Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Barcode not found"4}
Error - Warehouse Access403Forbidden
Response body
json
1{2  "success": false,3  "message": "This package is not assigned to one of your active warehouses"4}
Error - Missing Handoff409Conflict
Response body
json
1{2  "success": false,3  "action": "show_error",4  "entity_id": null,5  "reason": "package_handoff_missing",6  "message": "The outbound delivery was executed but its handoff record is missing",7  "barcode": "DEL1001",8  "warehouse_context": {},9  "receiving_order": {},10  "items": [],11  "inbound_deliveries": [],12  "outbound_deliveries": [],13  "handoff": null14}