Order Management
1 API call in this section.
APIs for confirming orders after invoice extraction and review
Confirm Order
/express-shipping/order/confirmAPI: Confirm Order
Endpoint
POST /express-shipping/order/confirm
Purpose
Create a package after customer reviews and confirms extracted invoice data. This is Step 2 of the order creation workflow.
Bearer token:
Authorization: Bearer {{access_token}}(required)API Key:
X-API-Key: {{api_key}}(alternative authentication method)
Content-Type
application/json
Form Fields
customer_id(string, required): Galina customer IDconfirmed_data(string, required): JSON string with corrected/confirmed extracted dataorder_number(string, required): Order number from storestore_name(string, required): Store/marketplace nametotal_amount(number, required): Total order amountcurrency(string, required): Currency code (USD, EUR, etc.)order_date(string, optional): Order date (YYYY-MM-DD)items(array, required): Array of order itemsname(string, required): Item namequantity(number, required): Quantity orderedunit_price(number, optional): Price per unittotal_price(number, optional): Total price for quantity
tax_amount(number, optional): Tax amountcustomer_name(string, optional): Customer name from invoicecustomer_email(string, optional): Customer email from invoicecustomer_address(string, optional): Customer address from invoiceinvoice_number(string, optional): Invoice number
invoice_file(file, required): Original invoice file (PDF, JPEG, PNG)
Business Logic
Validate tenant has active express shipping service
Verify customer exists and is verified
Calculate shipping price based on weight and configuration
Create package record with confirmed data
Generate tracking number
Create delivery, inventory, and receiving order records
Store invoice file for reference
Error Responses
400 - Missing Required Fields
400 - Invalid Order Data
404 - Customer Not Found
409 - Order Already Exists
500 - Order Creation Failed
Query parameters
| Parameter | Type | Description |
|---|---|---|
language | string | Preferred language for response messages (en, ar, ku) Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
X-EXPRESS-KEYRequired | string | Short-lived JWT from OTP verification (required) Example: |
Content-Type | string | JSON request body Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
order_number | string | — |
store_name | string | — |
total_amount | number | — |
currency | string | — |
order_date | string | — |
items | array<object> | — |
items.name | string | — |
items.quantity | number | — |
items.unit_price | number | — |
items.total_price | number | — |
tax_amount | number | — |
customer_name | string | — |
Show 4 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
customer_email | string | — |
customer_address | string | — |
invoice_number | string | — |
invoice_file_url | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/order/confirm?language=en" \2 --header "X-EXPRESS-KEY: ${EXPRESS_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "order_number": "TREND-ORD-98765",6 "store_name": "Trendyol",7 "total_amount": 125.5,8 "currency": "USD",9 "order_date": "2024-01-15",10 "items": [11 {12 "name": "Wireless Bluetooth Headphones",13 "quantity": 1,14 "unit_price": 75,15 "total_price": 7516 },17 {18 "name": "Phone Case",19 "quantity": 2,20 "unit_price": 25.25,21 "total_price": 50.522 }23 ],24 "tax_amount": 22.59,25 "customer_name": "John Doe",26 "customer_email": "[email protected]",27 "customer_address": "123 Main St, City",28 "invoice_number": "INV-2024-001",29 "invoice_file_url": "express/invoice/GAL1704067200000/1704067300000-invoice.pdf"30}'Response examples
1{2 "success": true,3 "data": {4 "package": {5 "tracking_number": "GL1706371234567",6 "order_id": "TREND-ORD-98765",7 "status": "claimed",8 "payment_status": "pending",9 "declared_value": 125.5,10 "currency": "USD",11 "store_name": "Trendyol",12 "quantity": 3,13 "weight": 350,14 "delivery_fee": 15,15 "claimed_at": "2024-01-27T10:00:00Z",16 "created_at": "2024-01-27T10:00:00Z"17 },18 "delivery": {19 "delivery_id": "DEL1706371234567",20 "status": "draft",21 "delivery_type": "express",22 "estimated_delivery": "2024-02-03"23 },24 "customer": {25 "customer_id": "GAL1704067200000",26 "full_name": "John Doe",27 "phone": "+919876543210",28 "delivery_address": {29 "full_address": "123 Main Street, Mumbai, India"30 }31 }32 },33 "message": "Order confirmed successfully. Package created and ready for shipping."34}