POST api/donhang/TaoDonHangNew
Tạo phiếu đặt nhà cung cấp Header truyền token Đã giao hàng 5, Đã Hủy 6 Hiện tại mặc đinh khi tạo đơn hàng thì tình trang đơn hàng sẽ là đang giao id=8 Thêm trường GhiChú và giảm giá đơn hàng sẽ dùng view để tính total Hàm dành cho giao diện mới 25/06/2018 bổ sung thêm loại giao hàng cho mobile
Request Information
URI Parameters
None.
Body Parameters
DonHangMoi| Name | Description | Type | Additional information |
|---|---|---|---|
| IdOrder | integer |
None. |
|
| IdKhachHang | integer |
None. |
|
| TenNguoiNhan | string |
None. |
|
| SDT | string |
None. |
|
| string |
None. |
||
| TinhThanh | string |
None. |
|
| QuanHuyen | string |
None. |
|
| MaQH | string |
None. |
|
| DiaChi | string |
None. |
|
| Total | decimal number |
None. |
|
| GiamGiaDH | decimal number |
None. |
|
| Prepaid | decimal number |
None. |
|
| HinhThucTT | string |
None. |
|
| GhiChu | string |
None. |
|
| Status | integer |
None. |
|
| CreatedDate | date |
None. |
|
| IdDN | integer |
None. |
|
| LoaiGiaoHang | integer |
None. |
|
| IDTTThanhToan | integer |
None. |
|
| TinhTrangDH | integer |
None. |
|
| HTGiaoHang | integer |
None. |
|
| PhiGiaoHang | integer |
None. |
|
| IDKhuyenMai | integer |
None. |
|
| ChiTiet | Collection of ChiTietDHNew |
None. |
Request Formats
application/json, text/json
Sample:
{
"IdOrder": 1,
"IdKhachHang": 2,
"TenNguoiNhan": "sample string 3",
"SDT": "sample string 4",
"Email": "sample string 5",
"TinhThanh": "sample string 6",
"QuanHuyen": "sample string 7",
"MaQH": "sample string 8",
"DiaChi": "sample string 9",
"Total": 10.1,
"GiamGiaDH": 11.1,
"Prepaid": 12.1,
"HinhThucTT": "sample string 13",
"GhiChu": "sample string 14",
"Status": 15,
"CreatedDate": "2026-06-17T13:36:43.0557231+07:00",
"IdDN": 17,
"LoaiGiaoHang": 18,
"IDTTThanhToan": 19,
"TinhTrangDH": 20,
"HTGiaoHang": 21,
"PhiGiaoHang": 22,
"IDKhuyenMai": 23,
"ChiTiet": [
{
"IdOrder": 1,
"IdSP": 2,
"Quantity": 3,
"Price": 4.1,
"IDKhuyenMai": 5
},
{
"IdOrder": 1,
"IdSP": 2,
"Quantity": 3,
"Price": 4.1,
"IDKhuyenMai": 5
}
]
}
application/xml, text/xml
Sample:
<DonHangMoi xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API_KD.Models">
<ChiTiet>
<ChiTietDHNew>
<IDKhuyenMai>5</IDKhuyenMai>
<IdOrder>1</IdOrder>
<IdSP>2</IdSP>
<Price>4.1</Price>
<Quantity>3</Quantity>
</ChiTietDHNew>
<ChiTietDHNew>
<IDKhuyenMai>5</IDKhuyenMai>
<IdOrder>1</IdOrder>
<IdSP>2</IdSP>
<Price>4.1</Price>
<Quantity>3</Quantity>
</ChiTietDHNew>
</ChiTiet>
<CreatedDate>2026-06-17T13:36:43.0557231+07:00</CreatedDate>
<DiaChi>sample string 9</DiaChi>
<Email>sample string 5</Email>
<GhiChu>sample string 14</GhiChu>
<GiamGiaDH>11.1</GiamGiaDH>
<HTGiaoHang>21</HTGiaoHang>
<HinhThucTT>sample string 13</HinhThucTT>
<IDKhuyenMai>23</IDKhuyenMai>
<IDTTThanhToan>19</IDTTThanhToan>
<IdDN>17</IdDN>
<IdKhachHang>2</IdKhachHang>
<IdOrder>1</IdOrder>
<LoaiGiaoHang>18</LoaiGiaoHang>
<MaQH>sample string 8</MaQH>
<PhiGiaoHang>22</PhiGiaoHang>
<Prepaid>12.1</Prepaid>
<QuanHuyen>sample string 7</QuanHuyen>
<SDT>sample string 4</SDT>
<Status>15</Status>
<TenNguoiNhan>sample string 3</TenNguoiNhan>
<TinhThanh>sample string 6</TinhThanh>
<TinhTrangDH>20</TinhTrangDH>
<Total>10.1</Total>
</DonHangMoi>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ObjectNone.
Response Formats
application/json, text/json
Sample:
{}
application/xml, text/xml
Sample:
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />