Submit Order Get Submit Order Details by passing required parameter.
Key | Value |
---|---|
URL | https://api.ovvihq.com/OnlineOrder/SubmitOrder |
APIkey | Provided by OVVI (Pass APIKey in header.) |
ClientOrderDetail | XML of Order Details. |
- Note:Pass APIKey in header.
- Pass requried parameter using "form".below is ClientOrderDetail format.
- <ticket>
- <order_id> 1 </order_id>
- <source>
- <source_name> Uber Eats </source_name>
- </source>
- <type> Delivery <type>
- <comments><comments>
- <customer>
- <customer_id> 4 </customer_id>
- <phone> 1256125656 </phone>
- <firstname> abcd </firstname>
- <lastname> efgh </lastname>
- <email> abcd@gmail.com </email>
- </customer>
- <delivery_address>
- <firstname> abcd </firstname>
- <lastname> efgh </lastname>
- <phone> 1256125656 </phone>
- <company_name> </company_name>
- <line1> sd df sdf </line1>
- <line2> sdf dsf </line2>
- <city> texas </city>
- <state> 1 </state>
- <zip> 380043 </zip>
- </delivery_address>
- <created_timestamp> 2019-03-25T12:17:44.353 </created_timestamp>
- <requested_timestamp> 2019-03- 25T12:30:36.798259+05:30 </requested_timestamp>
- <items>
- <item id= "1" pos_id= "Plates_00000017" pos_name= "24. Mixed Kabab Kings w/ Rice” size_override=" 0">
- <name> 24. Mixed Kabab Kings w/ Rice </name>
- <firstname> abcd </firstname>
- <size> </size>
- <quantity> 1.00 </quantity>
- <price> 16.63 </price>
- <modifiers>
- <modifier id= "1" pos_id= "Plates_00000030" pos_name= "Garlic Sauce type=" 0"included=" no">
- <name> Garlic Sauce </name>
- <price> 0.00 </price>
- <quantity> 1.00 </quantity>
- <label> </label>
- <level> </level>
- </modifier>
- </modifiers>
- </item>
- </items>
- <subtotal> 30.60 </subtotal>
- <tax> 2.52 </tax>
- <coupon_name> Garlic Sauce </coupon_name>
- <discount> 0.00 </discount>
- <deliverycharges> </deliverycharges>
- <total> 33.12 </total>
- <PaymentType> Cash </PaymentType>
- <PaymentStatus> O </PaymentStatus>
- </ticket>
Success Response: | |
---|---|
Code | Content |
200 OK | {OnlineOrderID : "12004", POSOrderID : "12504"}. |
Note: It can return 0 value for POSOrderID if the order XML is submitted successfully and order sent to POS but not processed in a timely fashion. You can check the status of that order later by calling CheckOrderStatus API. |
Error Response: | ||
---|---|---|
Error Code | Error Message | Description |
404 | API Key not provided. | This error comes when the user does not provide API Key. |
404 | Order details not provided. | This error comes when the user does not provide order XML. |
400 | Invalid API Key. | This error comes when the user does not provide valid API Key. |
404 | Order ID Not Found In XML. | Order details XML does not contain an Order ID tag. |
400 | Item Tag Not Found In XML. | Order details XML does not contain Item tag. |
400 | Order Type Tag Not Found In XML. | Order details XML does not contain order type. Valid order types can be TAKEOUT or DELIVERY. |
400 | First name tag not found. | Customer's First name is required. |
400 | Last name tag not found. | Customer's Last name is required. |
400 | Phone tag not found. | Customer's Phone / Mobile number is required. |
400 | SubTotal tag not found. | SubTotal is required. |
400 | Tax tag not found. | Tax is required. |
400 | Total tag not found. | Total is required. |
400 | Delivery charge tag not found. | Delivery charge is required. |
400 | Payment type tag not found. | Payment type is required. |
400 | Payment Status tag not found. | Payment Status is required. |
400 | Source tag not found. | Source is required. |
400 | Source name tag not found. | Source name is required. |
400 | Source name is empty. | Source name should not be empty. |
400 | Item name tag not found. | Item name is required. |
404 | Item quantity tag not found. | Item quantity is required. |
400 | Item Price tag not found. | Item Price is required. |
400 | POSID Price tag not found. | Item tag of Order XML should contain the POS_ID tag which will represent the item code of POS. |
400 | Created timestamp Tag Not Found In XML. | Order details XML does not contain Created timestamp tag. |
400 | Invalid Date in created time Tag. | Order details XML contains the invalid date and time value |
Xml Node | Description | Required/Optional |
---|---|---|
Order_Id | Order_Id contains the Order Id of Online Ordering Platform. | Required |
Source | ||
Source_Name | Name of Source from where the order is generated. | Required |
Type | Type is an Order Type It can be Delivery or Take Out. | Required |
Comments | Order Notes. | Optional |
Customer | ||
Customer_Id | Unique Id of the customer. | Optional |
Phone | Contact number of the customer. | Required |
First_Name | First Name of the customer. | Required |
Last_Name | Last Name of customer. | Required |
Email Address | Required | |
Delivery Address | ||
First_Name | First Name of the customer. | Required |
Last_Name | Last Name of customer. | Required |
Company_Name | Company name of the customer. | Required |
Line_1 | Address Line 1. | Optional |
Line_2 | Address Line 2. | Optional |
City | City name of the customer. | Required |
State | State name of the customer. State should be state code. For ex. FL,TX. | Required |
Zip | Zip Code of the customer. | Required |
Created_timestamp | Date and time of ordering when order is created. | Required |
Requested_timestamp | Date and time for delivery type order. (Order should be delivered by a defined date and time). | Required |
Items | ||
Item_Id | Unique Id of the item. It also contains the POS_Id of the items and pos_name of the item. | Required |
Name | Item name. | Required |
Quantity | Item Quantity. | Required |
Price | Item price. | Required |
Comments | Item Instruction. | Optional |
Size | Size of Pizza Item. For example <size>8”</size> | Optional |
Modifiers | ||
Modifier Id | It contains the modifier Id. | Required if modifiers available |
Name | Modifier Name. | Required if modifiers available. |
Price | Modifier Price.. | Required if modifiers available. |
Sales Tax | Sales Tax in Percentage. | Required if modifiers available. |
Quantity | Modifier Item quantity. | Required if modifiers available. |
Label | It contains region for modifiers in Pizza items like Whole,1st half or 2nd Half. | Required in pizza item |
Subtotal | Subtotal of the order. | Required |
Tax | If tax is included in the order. | Required |
Discount | If any discount is applied in the order. | Required |
Total | Grand Total of the order. | Required |
deliverycharges | If the delivery charge is applied in the order. | Required |
PaymentType | It contains the payment information like CC,CA. Payment type should be short description provided in payment type API. | Required |
PaymentStatus | PAID or UNPAID. | Required |
Gratuity | Tip amount. | Required |