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": "8cdb2a16-a586-40c1-a599-999fb72e4a15",
"PurchaseOrderItems": [
{
"ProductId": "9f7afc9c-c034-4d47-babf-37f605c33b70",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "254262eb-16ce-4ff2-a2cd-41c1d99f66cc",
"Note": "sample string 6",
"TotalPrice": 7.0
},
{
"ProductId": "9f7afc9c-c034-4d47-babf-37f605c33b70",
"Quantity": 2,
"UnitPrice": 3.0,
"Discount": 4.0,
"DiscountType": 0,
"PurchaseOrderId": "254262eb-16ce-4ff2-a2cd-41c1d99f66cc",
"Note": "sample string 6",
"TotalPrice": 7.0
}
],
"Note": "sample string 1",
"PurchaseOrderDateTime": "2025-10-26T13:00:54.0171982+07:00",
"PayingAmount": 3.0,
"TotalOrder": 4.0,
"Discount": 5.0,
"DiscountType": 0,
"Status": 0,
"PaymentTime": "2025-10-26T13:00:54.0182067+07:00",
"PaymentNote": "sample string 7",
"SupplierId": 8,
"Code": "sample string 9",
"ImporterId": "dc3cd2c3-d062-4d75-9564-b1878a3f5c24",
"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>8cdb2a16-a586-40c1-a599-999fb72e4a15</Id>
<ImporterId>dc3cd2c3-d062-4d75-9564-b1878a3f5c24</ImporterId>
<Note>sample string 1</Note>
<PayingAmount>3</PayingAmount>
<PaymentNote>sample string 7</PaymentNote>
<PaymentTime>2025-10-26T13:00:54.0182067+07:00</PaymentTime>
<PaymentType>TIEN_MAT</PaymentType>
<PurchaseOrderDateTime>2025-10-26T13:00:54.0171982+07:00</PurchaseOrderDateTime>
<PurchaseOrderItems>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>9f7afc9c-c034-4d47-babf-37f605c33b70</ProductId>
<PurchaseOrderId>254262eb-16ce-4ff2-a2cd-41c1d99f66cc</PurchaseOrderId>
<Quantity>2</Quantity>
<TotalPrice>7</TotalPrice>
<UnitPrice>3</UnitPrice>
</PurchaseOrderItem>
<PurchaseOrderItem>
<Discount>4</Discount>
<DiscountType>VND</DiscountType>
<Note>sample string 6</Note>
<ProductId>9f7afc9c-c034-4d47-babf-37f605c33b70</ProductId>
<PurchaseOrderId>254262eb-16ce-4ff2-a2cd-41c1d99f66cc</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.