POST api/v1/orders/create
Request Information
URI Parameters
None.
Body Parameters
GraphOrderParamName | Description | Type | Additional information |
---|---|---|---|
Id |
id đơn hàng |
globally unique identifier |
None. |
Type |
Loại đơn hàng 1 - Đặt chỗ 2 - Order |
EnumOrderType |
None. |
No |
Mã đơn hàng |
string |
None. |
Status |
Trạng thái đơn hàng |
EnumOrderStatus |
None. |
ShippingDate |
Giờ hẹn trả khách |
date |
None. |
CustomerId |
Id khách hàng |
globally unique identifier |
None. |
CustomerName |
Tên khách hàng |
string |
None. |
CustomerTel |
Số điện thoại khách hàng |
string |
None. |
EmployeeId |
Id nhân viên |
globally unique identifier |
None. |
EmployeeName |
Tên nhân viên |
string |
None. |
ShippingAddress |
Địa chỉ giao hàng |
string |
None. |
DeliveryAmount |
Phí giao hàng |
decimal number |
None. |
DepositAmount |
Tiền đặt khách trước |
decimal number |
None. |
OrderDetails |
Danh sách các order detail |
Collection of GraphOrderDetail |
None. |
PaymentMethods | Collection of GraphSAInvoicePayment |
None. |
|
BranchId |
Id chi nhánh |
globally unique identifier |
None. |
Version |
Phiên bản |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "Id": "da5b31cf-f290-48f1-9261-2709280b0989", "Type": 1, "No": "sample string 2", "Status": 0, "ShippingDate": "2025-06-25T21:11:27.0090091+07:00", "CustomerId": "69b5324d-da4d-4ce2-b228-2bb4c52c2589", "CustomerName": "sample string 3", "CustomerTel": "sample string 4", "EmployeeId": "cb78afef-0c37-468f-b59c-5ea1fbcf1279", "EmployeeName": "sample string 5", "ShippingAddress": "sample string 6", "DeliveryAmount": 7.0, "DepositAmount": 8.0, "OrderDetails": [ { "Id": "83ce15a5-ef41-4762-a50b-aa057ee441b8", "ItemId": "566baad1-0fc9-4a8a-929e-396946228d26", "ItemName": "sample string 3", "AdditionId": "7331fb35-2d78-4d1a-bc8b-58705cc6fbfa", "UnitId": "6ae732fc-ca16-4e28-be40-0debb5f95aa9", "UnitName": "sample string 4", "Quantity": 5.0, "Status": 1, "Description": "sample string 6", "Price": 7.0, "Amount": 8.0, "SortOrder": 9 }, { "Id": "83ce15a5-ef41-4762-a50b-aa057ee441b8", "ItemId": "566baad1-0fc9-4a8a-929e-396946228d26", "ItemName": "sample string 3", "AdditionId": "7331fb35-2d78-4d1a-bc8b-58705cc6fbfa", "UnitId": "6ae732fc-ca16-4e28-be40-0debb5f95aa9", "UnitName": "sample string 4", "Quantity": 5.0, "Status": 1, "Description": "sample string 6", "Price": 7.0, "Amount": 8.0, "SortOrder": 9 } ], "PaymentMethods": [ { "SAInvoicePaymentID": "1b212579-ea45-4ca4-ba43-d14bb2ad3f8d", "RefID": "f811c6d2-dc59-4df1-96b0-822fd189f226", "PaymentType": 3, "Amount": 1.0, "CustomerID": "c49d8ba5-a448-4dfd-8212-6e0d597689d6", "CustomerName": "sample string 6", "PaymentName": "sample string 5", "VoucherID": "4792baa8-8cd7-4acb-87ae-57e4f1ec1f62", "VoucherQuantity": 1.0, "VoucherAmount": 1.0, "VoucherCode": "sample string 4", "VoucherName": "sample string 8", "RefNo": "sample string 15", "RefDate": "2025-06-25T21:11:27.0090091+07:00", "CardID": "52780edb-b410-409a-9b45-4df3f9095ef2", "CardName": "sample string 7", "ApplyVoucherType": 12, "VoucherAllAmount": 9.0, "VoucherFoodAmount": 10.0, "VoucherDrinkAmount": 11.0, "CardNo": "sample string 13", "ApprovalCode": "sample string 14", "CustomerAddress": "sample string 16", "BankName": "sample string 17", "BankAccountNumber": "sample string 18", "CurrencyID": "sample string 19", "MainCurrency": "sample string 20", "ExchangeRate": 21.0, "ExchangeAmount": 22.0 }, { "SAInvoicePaymentID": "1b212579-ea45-4ca4-ba43-d14bb2ad3f8d", "RefID": "f811c6d2-dc59-4df1-96b0-822fd189f226", "PaymentType": 3, "Amount": 1.0, "CustomerID": "c49d8ba5-a448-4dfd-8212-6e0d597689d6", "CustomerName": "sample string 6", "PaymentName": "sample string 5", "VoucherID": "4792baa8-8cd7-4acb-87ae-57e4f1ec1f62", "VoucherQuantity": 1.0, "VoucherAmount": 1.0, "VoucherCode": "sample string 4", "VoucherName": "sample string 8", "RefNo": "sample string 15", "RefDate": "2025-06-25T21:11:27.0090091+07:00", "CardID": "52780edb-b410-409a-9b45-4df3f9095ef2", "CardName": "sample string 7", "ApplyVoucherType": 12, "VoucherAllAmount": 9.0, "VoucherFoodAmount": 10.0, "VoucherDrinkAmount": 11.0, "CardNo": "sample string 13", "ApprovalCode": "sample string 14", "CustomerAddress": "sample string 16", "BankName": "sample string 17", "BankAccountNumber": "sample string 18", "CurrencyID": "sample string 19", "MainCurrency": "sample string 20", "ExchangeRate": 21.0, "ExchangeAmount": 22.0 } ], "BranchId": "7fff6fcf-ff96-4d1e-83ed-24dda7848b86", "Version": "sample string 10" }
text/html
Sample:
{ "Id": "da5b31cf-f290-48f1-9261-2709280b0989", "Type": 1, "No": "sample string 2", "Status": 0, "ShippingDate": "2025-06-25T21:11:27.0091704+07:00", "CustomerId": "69b5324d-da4d-4ce2-b228-2bb4c52c2589", "CustomerName": "sample string 3", "CustomerTel": "sample string 4", "EmployeeId": "cb78afef-0c37-468f-b59c-5ea1fbcf1279", "EmployeeName": "sample string 5", "ShippingAddress": "sample string 6", "DeliveryAmount": 7.0, "DepositAmount": 8.0, "OrderDetails": [ { "Id": "83ce15a5-ef41-4762-a50b-aa057ee441b8", "ItemId": "566baad1-0fc9-4a8a-929e-396946228d26", "ItemName": "sample string 3", "AdditionId": "7331fb35-2d78-4d1a-bc8b-58705cc6fbfa", "UnitId": "6ae732fc-ca16-4e28-be40-0debb5f95aa9", "UnitName": "sample string 4", "Quantity": 5.0, "Status": 1, "Description": "sample string 6", "Price": 7.0, "Amount": 8.0, "SortOrder": 9 }, { "Id": "83ce15a5-ef41-4762-a50b-aa057ee441b8", "ItemId": "566baad1-0fc9-4a8a-929e-396946228d26", "ItemName": "sample string 3", "AdditionId": "7331fb35-2d78-4d1a-bc8b-58705cc6fbfa", "UnitId": "6ae732fc-ca16-4e28-be40-0debb5f95aa9", "UnitName": "sample string 4", "Quantity": 5.0, "Status": 1, "Description": "sample string 6", "Price": 7.0, "Amount": 8.0, "SortOrder": 9 } ], "PaymentMethods": [ { "SAInvoicePaymentID": "1b212579-ea45-4ca4-ba43-d14bb2ad3f8d", "RefID": "f811c6d2-dc59-4df1-96b0-822fd189f226", "PaymentType": 3, "Amount": 1.0, "CustomerID": "c49d8ba5-a448-4dfd-8212-6e0d597689d6", "CustomerName": "sample string 6", "PaymentName": "sample string 5", "VoucherID": "4792baa8-8cd7-4acb-87ae-57e4f1ec1f62", "VoucherQuantity": 1.0, "VoucherAmount": 1.0, "VoucherCode": "sample string 4", "VoucherName": "sample string 8", "RefNo": "sample string 15", "RefDate": "2025-06-25T21:11:27.0091704+07:00", "CardID": "52780edb-b410-409a-9b45-4df3f9095ef2", "CardName": "sample string 7", "ApplyVoucherType": 12, "VoucherAllAmount": 9.0, "VoucherFoodAmount": 10.0, "VoucherDrinkAmount": 11.0, "CardNo": "sample string 13", "ApprovalCode": "sample string 14", "CustomerAddress": "sample string 16", "BankName": "sample string 17", "BankAccountNumber": "sample string 18", "CurrencyID": "sample string 19", "MainCurrency": "sample string 20", "ExchangeRate": 21.0, "ExchangeAmount": 22.0 }, { "SAInvoicePaymentID": "1b212579-ea45-4ca4-ba43-d14bb2ad3f8d", "RefID": "f811c6d2-dc59-4df1-96b0-822fd189f226", "PaymentType": 3, "Amount": 1.0, "CustomerID": "c49d8ba5-a448-4dfd-8212-6e0d597689d6", "CustomerName": "sample string 6", "PaymentName": "sample string 5", "VoucherID": "4792baa8-8cd7-4acb-87ae-57e4f1ec1f62", "VoucherQuantity": 1.0, "VoucherAmount": 1.0, "VoucherCode": "sample string 4", "VoucherName": "sample string 8", "RefNo": "sample string 15", "RefDate": "2025-06-25T21:11:27.0091704+07:00", "CardID": "52780edb-b410-409a-9b45-4df3f9095ef2", "CardName": "sample string 7", "ApplyVoucherType": 12, "VoucherAllAmount": 9.0, "VoucherFoodAmount": 10.0, "VoucherDrinkAmount": 11.0, "CardNo": "sample string 13", "ApprovalCode": "sample string 14", "CustomerAddress": "sample string 16", "BankName": "sample string 17", "BankAccountNumber": "sample string 18", "CurrencyID": "sample string 19", "MainCurrency": "sample string 20", "ExchangeRate": 21.0, "ExchangeAmount": 22.0 } ], "BranchId": "7fff6fcf-ff96-4d1e-83ed-24dda7848b86", "Version": "sample string 10" }
application/xml, text/xml
Sample:
<GraphOrderParam xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MISA.QLNH.BE.BO"> <Version>sample string 10</Version> <BranchId>7fff6fcf-ff96-4d1e-83ed-24dda7848b86</BranchId> <CustomerID>69b5324d-da4d-4ce2-b228-2bb4c52c2589</CustomerID> <CustomerName>sample string 3</CustomerName> <CustomerTel>sample string 4</CustomerTel> <DeliveryAmount>7</DeliveryAmount> <DepositAmount>8</DepositAmount> <EmployeeID>cb78afef-0c37-468f-b59c-5ea1fbcf1279</EmployeeID> <EmployeeName>sample string 5</EmployeeName> <OrderDetails> <GraphOrderDetail> <Amount>8</Amount> <Description>sample string 6</Description> <InventoryItemAdditionID>7331fb35-2d78-4d1a-bc8b-58705cc6fbfa</InventoryItemAdditionID> <ItemID>566baad1-0fc9-4a8a-929e-396946228d26</ItemID> <ItemName>sample string 3</ItemName> <OrderDetailID>83ce15a5-ef41-4762-a50b-aa057ee441b8</OrderDetailID> <OrderDetailStatus>NotSend</OrderDetailStatus> <OrderID>5b881693-cf9b-44f9-a9c5-6ef0e36be663</OrderID> <Quantity>5</Quantity> <SortOrder>9</SortOrder> <UnitID>6ae732fc-ca16-4e28-be40-0debb5f95aa9</UnitID> <UnitName>sample string 4</UnitName> <UnitPrice>7</UnitPrice> </GraphOrderDetail> <GraphOrderDetail> <Amount>8</Amount> <Description>sample string 6</Description> <InventoryItemAdditionID>7331fb35-2d78-4d1a-bc8b-58705cc6fbfa</InventoryItemAdditionID> <ItemID>566baad1-0fc9-4a8a-929e-396946228d26</ItemID> <ItemName>sample string 3</ItemName> <OrderDetailID>83ce15a5-ef41-4762-a50b-aa057ee441b8</OrderDetailID> <OrderDetailStatus>NotSend</OrderDetailStatus> <OrderID>5b881693-cf9b-44f9-a9c5-6ef0e36be663</OrderID> <Quantity>5</Quantity> <SortOrder>9</SortOrder> <UnitID>6ae732fc-ca16-4e28-be40-0debb5f95aa9</UnitID> <UnitName>sample string 4</UnitName> <UnitPrice>7</UnitPrice> </GraphOrderDetail> </OrderDetails> <OrderID>da5b31cf-f290-48f1-9261-2709280b0989</OrderID> <OrderNo>sample string 2</OrderNo> <OrderStatus>None</OrderStatus> <OrderType>ServeAtRestaurant</OrderType> <PaymentMethods> <GraphSAInvoicePayment> <Amount>1</Amount> <ApplyVoucherType>12</ApplyVoucherType> <ApprovalCode>sample string 14</ApprovalCode> <BankAccountNumber>sample string 18</BankAccountNumber> <BankName>sample string 17</BankName> <CardID>52780edb-b410-409a-9b45-4df3f9095ef2</CardID> <CardName>sample string 7</CardName> <CardNo>sample string 13</CardNo> <CurrencyID>sample string 19</CurrencyID> <CustomerAddress>sample string 16</CustomerAddress> <CustomerID>c49d8ba5-a448-4dfd-8212-6e0d597689d6</CustomerID> <CustomerName>sample string 6</CustomerName> <ExchangeAmount>22</ExchangeAmount> <ExchangeRate>21</ExchangeRate> <MainCurrency>sample string 20</MainCurrency> <PaymentName>sample string 5</PaymentName> <PaymentType>3</PaymentType> <RefDate>2025-06-25T21:11:27.0091704+07:00</RefDate> <RefID>f811c6d2-dc59-4df1-96b0-822fd189f226</RefID> <RefNo>sample string 15</RefNo> <SAInvoicePaymentID>1b212579-ea45-4ca4-ba43-d14bb2ad3f8d</SAInvoicePaymentID> <VoucherAllAmount>9</VoucherAllAmount> <VoucherAmount>1</VoucherAmount> <VoucherCode>sample string 4</VoucherCode> <VoucherDrinkAmount>11</VoucherDrinkAmount> <VoucherFoodAmount>10</VoucherFoodAmount> <VoucherID>4792baa8-8cd7-4acb-87ae-57e4f1ec1f62</VoucherID> <VoucherName>sample string 8</VoucherName> <VoucherQuantity>1</VoucherQuantity> </GraphSAInvoicePayment> <GraphSAInvoicePayment> <Amount>1</Amount> <ApplyVoucherType>12</ApplyVoucherType> <ApprovalCode>sample string 14</ApprovalCode> <BankAccountNumber>sample string 18</BankAccountNumber> <BankName>sample string 17</BankName> <CardID>52780edb-b410-409a-9b45-4df3f9095ef2</CardID> <CardName>sample string 7</CardName> <CardNo>sample string 13</CardNo> <CurrencyID>sample string 19</CurrencyID> <CustomerAddress>sample string 16</CustomerAddress> <CustomerID>c49d8ba5-a448-4dfd-8212-6e0d597689d6</CustomerID> <CustomerName>sample string 6</CustomerName> <ExchangeAmount>22</ExchangeAmount> <ExchangeRate>21</ExchangeRate> <MainCurrency>sample string 20</MainCurrency> <PaymentName>sample string 5</PaymentName> <PaymentType>3</PaymentType> <RefDate>2025-06-25T21:11:27.0091704+07:00</RefDate> <RefID>f811c6d2-dc59-4df1-96b0-822fd189f226</RefID> <RefNo>sample string 15</RefNo> <SAInvoicePaymentID>1b212579-ea45-4ca4-ba43-d14bb2ad3f8d</SAInvoicePaymentID> <VoucherAllAmount>9</VoucherAllAmount> <VoucherAmount>1</VoucherAmount> <VoucherCode>sample string 4</VoucherCode> <VoucherDrinkAmount>11</VoucherDrinkAmount> <VoucherFoodAmount>10</VoucherFoodAmount> <VoucherID>4792baa8-8cd7-4acb-87ae-57e4f1ec1f62</VoucherID> <VoucherName>sample string 8</VoucherName> <VoucherQuantity>1</VoucherQuantity> </GraphSAInvoicePayment> </PaymentMethods> <ShippingAddress>sample string 6</ShippingAddress> <ShippingDueDate>2025-06-25T21:11:27.0091704+07:00</ShippingDueDate> </GraphOrderParam>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
GraphServiceActionResultName | Description | Type | Additional information |
---|---|---|---|
Code |
Mã HTTP trả về cho client |
HttpStatusCode |
None. |
ErrorType |
Loại lỗi |
GrapAPIServiceErrorType |
None. |
ErrorMessage |
Thông tin lỗi |
string |
None. |
Data |
Dữ liệu trả về cho client |
Object |
None. |
Total |
Tổng số bản ghi trên grid |
integer |
None. |
Success |
Thực thi Service thành công |
boolean |
None. |
PrimaryKeyValue |
Trả về ID của đối tượng khi cất thành công Phục vụ cho việc cập nhật ID của record trên grid sau khi thêm đối tượng |
Object |
None. |
Response Formats
application/json, text/json, text/html
Sample:
{ "Code": 100, "ErrorType": 0, "ErrorMessage": "sample string 1", "Data": {}, "Total": 3, "Success": true, "PrimaryKeyValue": {} }
application/xml, text/xml
Sample:
<GraphServiceActionResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MISA.QLNH.BE.BO"> <ActionType>Login</ActionType> <Code>Continue</Code> <Data /> <ErrorMessage>sample string 1</ErrorMessage> <ErrorType>None</ErrorType> <PrimaryKeyValue /> <ServerExceptionTraceMessage>sample string 6</ServerExceptionTraceMessage> <Success>true</Success> <Total>3</Total> </GraphServiceActionResult>