Skip to main content

Receiving Orders

4 API calls in this section.

List Receiving Orders

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

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

languageOptional
query string

en

pageOptional
query string

1

limitOptional
query string

20

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success — plain list200OK
Response body
json
1{2  "success": true,3  "message": "Receiving orders retrieved successfully",4  "receiving_orders": [5    {6      "id": "ro-uuid-1",7      "tenant_id": "tenant-uuid",8      "warehouse_id": "warehouse-uuid",9      "reference_number": "RO-1Z2X3C4V",10      "external_reference": "PO-9876",11      "supplier_id": "supplier-uuid",12      "supplier_name": "Acme Suppliers Inc.",13      "expected_arrival_date": "2026-06-15T00:00:00Z",14      "actual_arrival_date": null,15      "status": "pending",16      "total_items": 2,17      "total_quantity": 75,18      "items": [19        {20          "item_id": "item-uuid-1",21          "item_name": "Premium T-Shirt",22          "quantity": 50,23          "received_quantity": 0,24          "lot_number": "LOT123",25          "serial_number": "SN456",26          "bin_id": null,27          "attributes": {28            "color": "black",29            "size": "medium"30          }31        },32        {33          "item_id": "item-uuid-2",34          "item_name": "Cotton Polo Shirt",35          "quantity": 25,36          "received_quantity": 0,37          "lot_number": "LOT456",38          "serial_number": "SN789",39          "bin_id": null,40          "attributes": {41            "color": "white",42            "size": "large"43          }44        }45      ],46      "notes": "Monthly restock order",47      "created_at": "2026-05-01T10:00:00Z",48      "updated_at": "2026-05-01T10:00:00Z",49      "warehouse": {50        "id": "warehouse-uuid",51        "name": "Main Warehouse",52        "code": "WH001"53      },54      "received_by_user": null,55      "supplier": {56        "id": "supplier-uuid",57        "name": "Acme Suppliers Inc."58      }59    }60  ],61  "stats": {62    "total": 21,63    "pending": 5,64    "in_progress": 1,65    "received": 11,66    "partially_received": 3,67    "cancelled": 168  },69  "status_matrix": {70    "total": 21,71    "pending": 5,72    "in_progress": 1,73    "received": 11,74    "partially_received": 3,75    "cancelled": 176  },77  "page": 1,78  "limit": 20,79  "total": 2180}
Success — with column_filters (date range + numeric range)200OK
Response body
json
1{2  "success": true,3  "message": "Receiving orders retrieved successfully",4  "receiving_orders": [5    {6      "id": "ro-uuid-2",7      "reference_number": "RO-ABCD1234",8      "status": "pending",9      "expected_arrival_date": "2026-06-10T00:00:00Z",10      "total_items": 3,11      "total_quantity": 60,12      "items": [],13      "warehouse": {14        "id": "warehouse-uuid",15        "name": "Main Warehouse",16        "code": "WH001"17      },18      "received_by_user": null,19      "supplier": {20        "id": "supplier-uuid",21        "name": "Acme Suppliers Inc."22      }23    }24  ],25  "stats": {26    "total": 21,27    "pending": 5,28    "in_progress": 1,29    "received": 11,30    "partially_received": 3,31    "cancelled": 132  },33  "status_matrix": {34    "total": 21,35    "pending": 5,36    "in_progress": 1,37    "received": 11,38    "partially_received": 3,39    "cancelled": 140  },41  "page": 1,42  "limit": 20,43  "total": 144}
Error — Tenant Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error — Invalid column_filters JSON400Bad Request
Response body
json
1{2  "success": false,3  "field": "column_filters",4  "message": "invalid_json"5}
Error — Server Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "Internal server error"4}

Create Receiving Order

Warehousing / Receiving Orders
POST/warehousing/receiving-orders?tenant_id={{tenant_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/warehousing/receiving-orders?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "warehouse_id": "{{warehouse_id}}",7  "expected_arrival_date": "2023-06-15",8  "item_details": [9    {10      "item_id": "{{item_id_1}}",11      "quantity": 50,12      "lot_number": "LOT123",13      "serial_number": "SN456",14      "attributes": {15        "color": "black",16        "size": "medium"17      }18    },19    {20      "item_id": "{{item_id_2}}",21      "quantity": 25,22      "lot_number": "LOT456",23      "serial_number": "SN789",24      "attributes": {25        "color": "white",26        "size": "large"27      }28    }29  ],30  "reference_number": "RO-1Z2X3C4V",31  "external_reference": "PO-9876",32  "supplier_id": "{{supplier_id}}",33  "status": "pending",34  "receiving_details": {35    "tracking_number": "TRK12345",36    "carrier": "Express Shipping Co.",37    "shipping_method": "2-day",38    "notes": "Deliver at loading dock B"39  },40  "notes": "Monthly restock order"41}'
Request body
json
1{2  "warehouse_id": "{{warehouse_id}}",3  "expected_arrival_date": "2023-06-15",4  "item_details": [5    {6      "item_id": "{{item_id_1}}",7      "quantity": 50,8      "lot_number": "LOT123",9      "serial_number": "SN456",10      "attributes": {11        "color": "black",12        "size": "medium"13      }14    },15    {16      "item_id": "{{item_id_2}}",17      "quantity": 25,18      "lot_number": "LOT456",19      "serial_number": "SN789",20      "attributes": {21        "color": "white",22        "size": "large"23      }24    }25  ],26  "reference_number": "RO-1Z2X3C4V",27  "external_reference": "PO-9876",28  "supplier_id": "{{supplier_id}}",29  "status": "pending",30  "receiving_details": {31    "tracking_number": "TRK12345",32    "carrier": "Express Shipping Co.",33    "shipping_method": "2-day",34    "notes": "Deliver at loading dock B"35  },36  "notes": "Monthly restock order"37}

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

Request body fields

warehouse_idExample
string

Example field from the request body.

expected_arrival_dateExample
string

Example field from the request body.

item_detailsExample
array<object>

Example field from the request body.

item_details.item_idExample
string

Example field from the request body.

item_details.quantityExample
number

Example field from the request body.

item_details.lot_numberExample
string

Example field from the request body.

item_details.serial_numberExample
string

Example field from the request body.

item_details.attributesExample
object

Example field from the request body.

item_details.attributes.colorExample
string

Example field from the request body.

item_details.attributes.sizeExample
string

Example field from the request body.

reference_numberExample
string

Example field from the request body.

external_referenceExample
string

Example field from the request body.

supplier_idExample
string

Example field from the request body.

statusExample
string

Example field from the request body.

receiving_detailsExample
object

Example field from the request body.

receiving_details.tracking_numberExample
string

Example field from the request body.

receiving_details.carrierExample
string

Example field from the request body.

receiving_details.shipping_methodExample
string

Example field from the request body.

receiving_details.notesExample
string

Example field from the request body.

notesExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response201
Response body
json
1{2  "success": true,3  "message": "Receiving order created successfully",4  "receiving_order": {5    "id": "order-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "reference_number": "RO-1Z2X3C4V",9    "external_reference": "PO-9876",10    "supplier_id": "supplier-uuid",11    "expected_arrival_date": "2023-06-15T00:00:00Z",12    "status": "pending",13    "item_details": [14      {15        "item_id": "item-uuid-1",16        "quantity": 50,17        "lot_number": "LOT123",18        "serial_number": "SN456",19        "attributes": {20          "color": "black",21          "size": "medium"22        }23      },24      {25        "item_id": "item-uuid-2",26        "quantity": 25,27        "lot_number": "LOT456",28        "serial_number": "SN789",29        "attributes": {30          "color": "white",31          "size": "large"32        }33      }34    ],35    "receiving_details": {36      "tracking_number": "TRK12345",37      "carrier": "Express Shipping Co.",38      "shipping_method": "2-day",39      "notes": "Deliver at loading dock B"40    },41    "actual_arrival_date": null,42    "received_by": null,43    "notes": "Monthly restock order",44    "created_at": "2023-06-01T10:00:00Z",45    "updated_at": "2023-06-01T10:00:00Z"46  }47}
Error - Missing Required Field400
Response body
json
1{2  "success": false,3  "message": "Field required: warehouse_id"4}
Error - Invalid Item Details Format400
Response body
json
1{2  "success": false,3  "message": "Item details must be array"4}
Error - Empty Item Details400
Response body
json
1{2  "success": false,3  "message": "Item details cannot be empty"4}
Error - Invalid Item400
Response body
json
1{2  "success": false,3  "message": "Each item must have valid item_id and quantity (item 1)"4}
Error - Invalid Status400
Response body
json
1{2  "success": false,3  "message": "Invalid status value: unknown. Must be one of: pending, received, partially_received, cancelled"4}
Error - Invalid Receiving Details400
Response body
json
1{2  "success": false,3  "message": "Receiving details must be object"4}
Error - Invalid Receiving Details Field400
Response body
json
1{2  "success": false,3  "message": "Invalid receiving details field: invalid_field"4}
Error - Warehouse Not Found404
Response body
json
1{2  "success": false,3  "message": "Warehouse not found"4}
Error - Item Not Found404
Response body
json
1{2  "success": false,3  "message": "Item not found (item 1, id: item-uuid-1)"4}
Error - Supplier Not Found404
Response body
json
1{2  "success": false,3  "message": "Supplier not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}
Error - Server Error500
Response body
json
1{2  "success": false,3  "message": "Internal server error"4}

Get Receiving Order

Warehousing / Receiving Orders
GET/warehousing/receiving-orders/:id?tenant_id={{tenant_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/warehousing/receiving-orders/:id?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Path parameters

idRequired
path string

UUID of the receiving order to retrieve (required)

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Receiving order retrieved successfully",4  "receiving_order": {5    "id": "order-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "reference_number": "RO-1Z2X3C4V",9    "external_reference": "PO-9876",10    "supplier_id": "supplier-uuid",11    "expected_arrival_date": "2023-06-15T00:00:00Z",12    "status": "pending",13    "item_details": [14      {15        "item_id": "item-uuid-1",16        "quantity": 50,17        "lot_number": "LOT123",18        "serial_number": "SN456",19        "attributes": {20          "color": "black",21          "size": "medium"22        }23      },24      {25        "item_id": "item-uuid-2",26        "quantity": 25,27        "lot_number": "LOT456",28        "serial_number": "SN789",29        "attributes": {30          "color": "white",31          "size": "large"32        }33      }34    ],35    "receiving_details": {36      "tracking_number": "TRK12345",37      "carrier": "Express Shipping Co.",38      "shipping_method": "2-day",39      "notes": "Deliver at loading dock B"40    },41    "actual_arrival_date": null,42    "received_by": null,43    "notes": "Monthly restock order",44    "created_at": "2023-06-01T10:00:00Z",45    "updated_at": "2023-06-01T10:00:00Z",46    "warehouse": {47      "id": "warehouse-uuid",48      "name": "Main Warehouse",49      "code": "WH001"50    },51    "received_by_user": null,52    "supplier": {53      "id": "supplier-uuid",54      "name": "Acme Suppliers",55      "code": "SUP001"56    }57  }58}
Error - Order ID Required400
Response body
json
1{2  "success": false,3  "message": "Receiving order ID required"4}
Error - Order Not Found404
Response body
json
1{2  "success": false,3  "message": "Receiving order not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}

Update Receiving Order

Warehousing / Receiving Orders
PUT/warehousing/receiving-orders/:id?tenant_id={{tenant_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/warehousing/receiving-orders/:id?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "status": "received",7  "actual_arrival_date": "2023-06-15",8  "notes": "Received complete shipment on time",9  "receiving_details": {10    "tracking_number": "TRK12345-UPDATED",11    "carrier": "Express Shipping Co.",12    "shipping_method": "2-day",13    "notes": "Delivered at loading dock B"14  },15  "item_details": [16    {17      "item_id": "item-uuid-1",18      "quantity": 50,19      "lot_number": "LOT123",20      "serial_number": "SN456",21      "attributes": {22        "color": "black",23        "size": "medium",24        "condition": "perfect"25      }26    },27    {28      "item_id": "item-uuid-2",29      "quantity": 25,30      "lot_number": "LOT456",31      "serial_number": "SN789",32      "attributes": {33        "color": "white",34        "size": "large",35        "condition": "good"36      }37    }38  ]39}'
Request body
json
1{2  "status": "received",3  "actual_arrival_date": "2023-06-15",4  "notes": "Received complete shipment on time",5  "receiving_details": {6    "tracking_number": "TRK12345-UPDATED",7    "carrier": "Express Shipping Co.",8    "shipping_method": "2-day",9    "notes": "Delivered at loading dock B"10  },11  "item_details": [12    {13      "item_id": "item-uuid-1",14      "quantity": 50,15      "lot_number": "LOT123",16      "serial_number": "SN456",17      "attributes": {18        "color": "black",19        "size": "medium",20        "condition": "perfect"21      }22    },23    {24      "item_id": "item-uuid-2",25      "quantity": 25,26      "lot_number": "LOT456",27      "serial_number": "SN789",28      "attributes": {29        "color": "white",30        "size": "large",31        "condition": "good"32      }33    }34  ]35}

Path parameters

idRequired
path string

UUID of the receiving order to update (required)

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

Request body fields

statusExample
string

Example field from the request body.

actual_arrival_dateExample
string

Example field from the request body.

notesExample
string

Example field from the request body.

receiving_detailsExample
object

Example field from the request body.

receiving_details.tracking_numberExample
string

Example field from the request body.

receiving_details.carrierExample
string

Example field from the request body.

receiving_details.shipping_methodExample
string

Example field from the request body.

receiving_details.notesExample
string

Example field from the request body.

item_detailsExample
array<object>

Example field from the request body.

item_details.item_idExample
string

Example field from the request body.

item_details.quantityExample
number

Example field from the request body.

item_details.lot_numberExample
string

Example field from the request body.

item_details.serial_numberExample
string

Example field from the request body.

item_details.attributesExample
object

Example field from the request body.

item_details.attributes.colorExample
string

Example field from the request body.

item_details.attributes.sizeExample
string

Example field from the request body.

item_details.attributes.conditionExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Receiving order updated successfully",4  "receiving_order": {5    "id": "order-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "reference_number": "RO-1Z2X3C4V",9    "external_reference": "PO-9876",10    "supplier_id": "supplier-uuid",11    "expected_arrival_date": "2023-06-15T00:00:00Z",12    "status": "received",13    "item_details": [14      {15        "item_id": "item-uuid-1",16        "quantity": 50,17        "lot_number": "LOT123",18        "serial_number": "SN456",19        "attributes": {20          "color": "black",21          "size": "medium",22          "condition": "perfect"23        }24      },25      {26        "item_id": "item-uuid-2",27        "quantity": 25,28        "lot_number": "LOT456",29        "serial_number": "SN789",30        "attributes": {31          "color": "white",32          "size": "large",33          "condition": "good"34        }35      }36    ],37    "receiving_details": {38      "tracking_number": "TRK12345-UPDATED",39      "carrier": "Express Shipping Co.",40      "shipping_method": "2-day",41      "notes": "Delivered at loading dock B"42    },43    "actual_arrival_date": null,44    "received_by": null,45    "notes": "Received complete shipment on time",46    "created_at": "2023-06-01T10:00:00Z",47    "updated_at": "2023-06-01T10:00:00Z"48  }49}
Error - Order ID Required400
Response body
json
1{2  "success": false,3  "message": "Receiving order ID required"4}
Error - Order Not Found404
Response body
json
1{2  "success": false,3  "message": "Receiving order not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}