POST api/PurchaseOrder/CreateOrUpdate
Request Information
URI Parameters
None.
Body Parameters
CreatePurchaseOrderRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | globally unique identifier |
None. |
|
| PurchaseOrderItems | Collection of PurchaseOrderItem |
None. |
|
| Note | string |
None. |
|
| PurchaseOrderDateTime | date |
None. |
|
| PayingAmount | decimal number |
None. |
|
| TotalOrder | decimal number |
None. |
|
| Discount | decimal number |
None. |
|
| DiscountType | DiscountTypeEnum |
None. |
|
| Status | PurchaseOrderStatusEnum |
None. |
|
| PaymentTime | date |
None. |
|
| PaymentNote | string |
None. |
|
| SupplierId | integer |
None. |
|
| Code | string |
None. |
|
| ImporterId | globally unique identifier |
None. |
|
| Quantity | integer |
None. |
|
| PaymentType | PaymentTypeEnum |
None. |
Request Formats
application/json, text/json
Sample:
{
"id": "93b3d875-fd11-4e22-a1d9-5d94b717cc72",
"purchaseOrderItems": [
{
"productId": "cdeed4b1-6862-4e1d-a9f7-22125ec33a29",
"quantity": 2,
"unitPrice": 3.0,
"discount": 4.0,
"discountType": 0,
"purchaseOrderId": "040e135b-357d-4fd6-a4b8-48fa122fbd6c",
"note": "sample string 6",
"totalPrice": 7.0
},
{
"productId": "cdeed4b1-6862-4e1d-a9f7-22125ec33a29",
"quantity": 2,
"unitPrice": 3.0,
"discount": 4.0,
"discountType": 0,
"purchaseOrderId": "040e135b-357d-4fd6-a4b8-48fa122fbd6c",
"note": "sample string 6",
"totalPrice": 7.0
}
],
"note": "sample string 1",
"purchaseOrderDateTime": "2026-11-27T01:55:27.6996029+07:00",
"payingAmount": 3.0,
"totalOrder": 4.0,
"discount": 5.0,
"discountType": 0,
"status": 0,
"paymentTime": "2026-11-27T01:55:27.7005807+07:00",
"paymentNote": "sample string 7",
"supplierId": 8,
"code": "sample string 9",
"importerId": "d5a54a44-7c86-447e-ba38-0dda753c3347",
"quantity": 11,
"paymentType": 0
}
application/xml, text/xml
Sample:
<CreatePurchaseOrderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.Model.Request.PurchaseOrder">
<Code>sample string 9</Code>
<Discount>5</Discount>
<DiscountType>VND</DiscountType>
<Id>93b3d875-fd11-4e22-a1d9-5d94b717cc72</Id>
<ImporterId>d5a54a44-7c86-447e-ba38-0dda753c3347</ImporterId>
<Note>sample string 1</Note>
<PayingAmount>3</PayingAmount>
<PaymentNote>sample string 7</PaymentNote>
<PaymentTime>2026-11-27T01:55:27.7005807+07:00</PaymentTime>
<PaymentType>TIEN_MAT</PaymentType>
<PurchaseOrderDateTime>2026-11-27T01:55:27.6996029+07:00</PurchaseOrderDateTime>
<PurchaseOrderItems>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>cdeed4b1-6862-4e1d-a9f7-22125ec33a29</ProductId>
<PurchaseOrderId>040e135b-357d-4fd6-a4b8-48fa122fbd6c</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>cdeed4b1-6862-4e1d-a9f7-22125ec33a29</ProductId>
<PurchaseOrderId>040e135b-357d-4fd6-a4b8-48fa122fbd6c</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
</PurchaseOrderItems>
<Quantity>11</Quantity>
<Status>DRAFT</Status>
<SupplierId>8</SupplierId>
<TotalOrder>4</TotalOrder>
</CreatePurchaseOrderRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
None.