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": "b65ac9af-4431-4fb6-9ef8-f2bf472424d4",
"PurchaseOrderItems": [
{
"ProductId": "9ff187cf-e9de-44c5-9a2c-85fa77c6fa7f",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "0d047399-d22c-4d3f-a88b-98330e935f19",
"Note": "sample string 6",
"TotalPrice": 7.0
},
{
"ProductId": "9ff187cf-e9de-44c5-9a2c-85fa77c6fa7f",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "0d047399-d22c-4d3f-a88b-98330e935f19",
"Note": "sample string 6",
"TotalPrice": 7.0
}
],
"Note": "sample string 1",
"PurchaseOrderDateTime": "2025-12-24T20:22:05.1728913+07:00",
"PayingAmount": 3.0,
"TotalOrder": 4.0,
"Discount": 5.0,
"DiscountType": 0,
"Status": 0,
"PaymentTime": "2025-12-24T20:22:05.1744829+07:00",
"PaymentNote": "sample string 7",
"SupplierId": 8,
"Code": "sample string 9",
"ImporterId": "0df7c7bf-6a92-40b9-becf-72cc313ec3b8",
"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>b65ac9af-4431-4fb6-9ef8-f2bf472424d4</Id>
<ImporterId>0df7c7bf-6a92-40b9-becf-72cc313ec3b8</ImporterId>
<Note>sample string 1</Note>
<PayingAmount>3</PayingAmount>
<PaymentNote>sample string 7</PaymentNote>
<PaymentTime>2025-12-24T20:22:05.1744829+07:00</PaymentTime>
<PaymentType>TIEN_MAT</PaymentType>
<PurchaseOrderDateTime>2025-12-24T20:22:05.1728913+07:00</PurchaseOrderDateTime>
<PurchaseOrderItems>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>9ff187cf-e9de-44c5-9a2c-85fa77c6fa7f</ProductId>
<PurchaseOrderId>0d047399-d22c-4d3f-a88b-98330e935f19</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>9ff187cf-e9de-44c5-9a2c-85fa77c6fa7f</ProductId>
<PurchaseOrderId>0d047399-d22c-4d3f-a88b-98330e935f19</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:
Sample not available.
Response Information
Resource Description
None.