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": "3cb4a418-71d5-44cf-a1cb-88bf9346a0cb",
"PurchaseOrderItems": [
{
"ProductId": "64292e3a-bc30-4663-86a3-bd263210752f",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "a126f9fd-6230-4f4c-80f8-2d4f70241b90",
"Note": "sample string 6",
"TotalPrice": 7.0
},
{
"ProductId": "64292e3a-bc30-4663-86a3-bd263210752f",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "a126f9fd-6230-4f4c-80f8-2d4f70241b90",
"Note": "sample string 6",
"TotalPrice": 7.0
}
],
"Note": "sample string 1",
"PurchaseOrderDateTime": "2026-04-21T17:16:07.0997866+07:00",
"PayingAmount": 3.0,
"TotalOrder": 4.0,
"Discount": 5.0,
"DiscountType": 0,
"Status": 0,
"PaymentTime": "2026-04-21T17:16:07.0997866+07:00",
"PaymentNote": "sample string 7",
"SupplierId": 8,
"Code": "sample string 9",
"ImporterId": "e32abc45-f71a-4357-a925-81807e7b07ab",
"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>3cb4a418-71d5-44cf-a1cb-88bf9346a0cb</Id>
<ImporterId>e32abc45-f71a-4357-a925-81807e7b07ab</ImporterId>
<Note>sample string 1</Note>
<PayingAmount>3</PayingAmount>
<PaymentNote>sample string 7</PaymentNote>
<PaymentTime>2026-04-21T17:16:07.0997866+07:00</PaymentTime>
<PaymentType>TIEN_MAT</PaymentType>
<PurchaseOrderDateTime>2026-04-21T17:16:07.0997866+07:00</PurchaseOrderDateTime>
<PurchaseOrderItems>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>64292e3a-bc30-4663-86a3-bd263210752f</ProductId>
<PurchaseOrderId>a126f9fd-6230-4f4c-80f8-2d4f70241b90</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>64292e3a-bc30-4663-86a3-bd263210752f</ProductId>
<PurchaseOrderId>a126f9fd-6230-4f4c-80f8-2d4f70241b90</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.