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": "4511597b-9bdf-40b9-92b7-6792f15890dc",
"PurchaseOrderItems": [
{
"ProductId": "8a4ec084-1e5b-4e03-9a3a-3c9a52ab3b9b",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "46751027-0ab0-43ea-b6da-2cafcc9d7f54",
"Note": "sample string 6",
"TotalPrice": 7.0
},
{
"ProductId": "8a4ec084-1e5b-4e03-9a3a-3c9a52ab3b9b",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "46751027-0ab0-43ea-b6da-2cafcc9d7f54",
"Note": "sample string 6",
"TotalPrice": 7.0
}
],
"Note": "sample string 1",
"PurchaseOrderDateTime": "2026-04-14T21:47:01.2548324+07:00",
"PayingAmount": 3.0,
"TotalOrder": 4.0,
"Discount": 5.0,
"DiscountType": 0,
"Status": 0,
"PaymentTime": "2026-04-14T21:47:01.2548324+07:00",
"PaymentNote": "sample string 7",
"SupplierId": 8,
"Code": "sample string 9",
"ImporterId": "d4b206eb-a102-4cc3-89d9-07992929f36e",
"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>4511597b-9bdf-40b9-92b7-6792f15890dc</Id>
<ImporterId>d4b206eb-a102-4cc3-89d9-07992929f36e</ImporterId>
<Note>sample string 1</Note>
<PayingAmount>3</PayingAmount>
<PaymentNote>sample string 7</PaymentNote>
<PaymentTime>2026-04-14T21:47:01.2548324+07:00</PaymentTime>
<PaymentType>TIEN_MAT</PaymentType>
<PurchaseOrderDateTime>2026-04-14T21:47:01.2548324+07:00</PurchaseOrderDateTime>
<PurchaseOrderItems>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>8a4ec084-1e5b-4e03-9a3a-3c9a52ab3b9b</ProductId>
<PurchaseOrderId>46751027-0ab0-43ea-b6da-2cafcc9d7f54</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>8a4ec084-1e5b-4e03-9a3a-3c9a52ab3b9b</ProductId>
<PurchaseOrderId>46751027-0ab0-43ea-b6da-2cafcc9d7f54</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.