POST api/Purchases/Insert
Request Information
URI Parameters
None.
Body Parameters
clsPurchaseRequestDto| Name | Description | Type | Additional information |
|---|---|---|---|
| IdSupplier | integer |
None. |
|
| BranchName | string |
None. |
|
| PaymentMethod | string |
None. |
|
| ProductsToBuy | Collection of ProductWithQuantityToPurchaseDto |
None. |
Request Formats
application/json, text/json
Sample:
{
"IdSupplier": 1,
"BranchName": "sample string 2",
"PaymentMethod": "sample string 3",
"ProductsToBuy": [
{
"Product": {
"Name": "sample string 1",
"Description": "sample string 2",
"CategoryName": "sample string 3",
"BrandName": "sample string 4",
"CostPrice": 5.0,
"SalePrice": 6.0,
"WarrantyMonths": 7
},
"Quantity": 1
},
{
"Product": {
"Name": "sample string 1",
"Description": "sample string 2",
"CategoryName": "sample string 3",
"BrandName": "sample string 4",
"CostPrice": 5.0,
"SalePrice": 6.0,
"WarrantyMonths": 7
},
"Quantity": 1
}
]
}
application/xml, text/xml
Sample:
<clsPurchaseRequestDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eBuy.Clases.DTOS">
<BranchName>sample string 2</BranchName>
<IdSupplier>1</IdSupplier>
<PaymentMethod>sample string 3</PaymentMethod>
<ProductsToBuy>
<ProductWithQuantityToPurchaseDto>
<Product>
<BrandName>sample string 4</BrandName>
<CategoryName>sample string 3</CategoryName>
<CostPrice>5</CostPrice>
<Description>sample string 2</Description>
<Name>sample string 1</Name>
<SalePrice>6</SalePrice>
<WarrantyMonths>7</WarrantyMonths>
</Product>
<Quantity>1</Quantity>
</ProductWithQuantityToPurchaseDto>
<ProductWithQuantityToPurchaseDto>
<Product>
<BrandName>sample string 4</BrandName>
<CategoryName>sample string 3</CategoryName>
<CostPrice>5</CostPrice>
<Description>sample string 2</Description>
<Name>sample string 1</Name>
<SalePrice>6</SalePrice>
<WarrantyMonths>7</WarrantyMonths>
</Product>
<Quantity>1</Quantity>
</ProductWithQuantityToPurchaseDto>
</ProductsToBuy>
</clsPurchaseRequestDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
stringResponse Formats
application/json, text/json
Sample:
"sample string 1"
application/xml, text/xml
Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>