POST api/InvoiceBP/AddInvoice
Request Information
URI Parameters
None.
Body Parameters
InvoiceAddDtoName | Description | Type | Additional information |
---|---|---|---|
UserId | integer |
None. |
|
ShopId | integer |
None. |
|
TotalAmount | decimal number |
None. |
|
PaperInvoiceId | integer |
None. |
|
Products | Collection of InvoiceProductsDto |
None. |
|
isWeb | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "UserId": 1, "ShopId": 2, "TotalAmount": 3.0, "PaperInvoiceId": 1, "Products": [ { "ProductId": 1, "BoxId": 2, "Count": 3, "Price": 4.0, "ProductCategoryId": 5, "UnitPrice": 6.0, "TotalQuantity": 7.1 }, { "ProductId": 1, "BoxId": 2, "Count": 3, "Price": 4.0, "ProductCategoryId": 5, "UnitPrice": 6.0, "TotalQuantity": 7.1 } ], "isWeb": true }
application/xml, text/xml
Sample:
<InvoiceAddDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BreakProtection.Common.Dto"> <PaperInvoiceId>1</PaperInvoiceId> <Products> <InvoiceProductsDto> <BoxId>2</BoxId> <Count>3</Count> <Price>4</Price> <ProductCategoryId>5</ProductCategoryId> <ProductId>1</ProductId> <TotalQuantity>7.1</TotalQuantity> <UnitPrice>6</UnitPrice> </InvoiceProductsDto> <InvoiceProductsDto> <BoxId>2</BoxId> <Count>3</Count> <Price>4</Price> <ProductCategoryId>5</ProductCategoryId> <ProductId>1</ProductId> <TotalQuantity>7.1</TotalQuantity> <UnitPrice>6</UnitPrice> </InvoiceProductsDto> </Products> <ShopId>2</ShopId> <TotalAmount>3</TotalAmount> <UserId>1</UserId> <isWeb>true</isWeb> </InvoiceAddDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ResponseName | Description | Type | Additional information |
---|---|---|---|
Status | integer |
None. |
|
Message | string |
None. |
|
Data | Object |
None. |
Response Formats
application/json, text/json
Sample:
{ "Status": 1, "Message": "sample string 2", "Data": {} }
application/xml, text/xml
Sample:
<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BreakProtection.Common.Dto"> <Data /> <Message>sample string 2</Message> <Status>1</Status> </Response>