POST api/Sales
Request Information
URI Parameters
None.
Body Parameters
SaleModel| Name | Description | Type | Additional information |
|---|---|---|---|
| salesId | integer |
None. |
|
| code | string |
None. |
|
| invoiceNumber | string |
None. |
|
| createdBy | integer |
None. |
|
| dateCreated | date |
None. |
|
| isCancelled | boolean |
None. |
|
| cancelledBy | integer |
None. |
|
| customerId | integer |
None. |
|
| customerName | string |
None. |
|
| discountAmount | decimal number |
None. |
|
| totalAmount | decimal number |
None. |
|
| amountTendered | decimal number |
None. |
|
| amountChange | decimal number |
None. |
|
| datePaid | date |
None. |
|
| paymentAssistedBy | integer |
None. |
|
| storeId | integer |
None. |
|
| isPaid | boolean |
None. |
|
| qouteReference | string |
None. |
|
| items | Collection of SalesItemModel |
None. |
|
| payments | Collection of PaymentModel |
None. |
Request Formats
application/json, text/json
Sample:
{
"salesId": 1,
"code": "sample string 2",
"invoiceNumber": "sample string 3",
"createdBy": 4,
"dateCreated": "2025-12-11T22:09:04.9886212+08:00",
"isCancelled": true,
"cancelledBy": 7,
"customerId": 8,
"customerName": "sample string 9",
"discountAmount": 10.0,
"totalAmount": 11.0,
"amountTendered": 12.0,
"amountChange": 13.0,
"datePaid": "2025-12-11T22:09:04.9886212+08:00",
"paymentAssistedBy": 15,
"storeId": 16,
"isPaid": true,
"qouteReference": "sample string 18",
"items": [
{
"salesId": 1,
"salesItemId": 2,
"itemId": 3,
"code": "sample string 4",
"description": "sample string 5",
"category": "sample string 6",
"productId": 7,
"unit": "sample string 8",
"dateCreated": "2025-12-11T22:09:04.9886212+08:00",
"createdBy": 10,
"unitPrice": 11.0,
"quantity": 12.0,
"totalItemAmount": 13.0,
"storeId": 14,
"isDeleted": true
},
{
"salesId": 1,
"salesItemId": 2,
"itemId": 3,
"code": "sample string 4",
"description": "sample string 5",
"category": "sample string 6",
"productId": 7,
"unit": "sample string 8",
"dateCreated": "2025-12-11T22:09:04.9886212+08:00",
"createdBy": 10,
"unitPrice": 11.0,
"quantity": 12.0,
"totalItemAmount": 13.0,
"storeId": 14,
"isDeleted": true
}
],
"payments": [
{
"paymentId": 1,
"paymentTypeId": 2,
"paymentType": "sample string 3",
"purpose": "sample string 4",
"checkNumber": "sample string 5",
"bankName": "sample string 6",
"paymentDate": "2025-12-11T22:09:04.9886212+08:00",
"salesId": 7,
"amount": 8.0,
"customerId": 9,
"isCancelled": true,
"dueDate": "2025-12-11T22:09:04.9886212+08:00",
"dateCreated": "2025-12-11T22:09:04.9886212+08:00",
"createdBy": 12,
"isPaid": true,
"isDeleted": true
},
{
"paymentId": 1,
"paymentTypeId": 2,
"paymentType": "sample string 3",
"purpose": "sample string 4",
"checkNumber": "sample string 5",
"bankName": "sample string 6",
"paymentDate": "2025-12-11T22:09:04.9886212+08:00",
"salesId": 7,
"amount": 8.0,
"customerId": 9,
"isCancelled": true,
"dueDate": "2025-12-11T22:09:04.9886212+08:00",
"dateCreated": "2025-12-11T22:09:04.9886212+08:00",
"createdBy": 12,
"isPaid": true,
"isDeleted": true
}
]
}
application/xml, text/xml
Sample:
<SaleModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/prjHardwareConstruction.Models">
<amountChange>13</amountChange>
<amountTendered>12</amountTendered>
<cancelledBy>7</cancelledBy>
<code>sample string 2</code>
<createdBy>4</createdBy>
<customerId>8</customerId>
<customerName>sample string 9</customerName>
<dateCreated>2025-12-11T22:09:04.9886212+08:00</dateCreated>
<datePaid>2025-12-11T22:09:04.9886212+08:00</datePaid>
<discountAmount>10</discountAmount>
<invoiceNumber>sample string 3</invoiceNumber>
<isCancelled>true</isCancelled>
<isPaid>true</isPaid>
<items>
<SalesItemModel>
<category>sample string 6</category>
<code>sample string 4</code>
<createdBy>10</createdBy>
<dateCreated>2025-12-11T22:09:04.9886212+08:00</dateCreated>
<description>sample string 5</description>
<isDeleted>true</isDeleted>
<itemId>3</itemId>
<productId>7</productId>
<quantity>12</quantity>
<salesId>1</salesId>
<salesItemId>2</salesItemId>
<storeId>14</storeId>
<totalItemAmount>13</totalItemAmount>
<unit>sample string 8</unit>
<unitPrice>11</unitPrice>
</SalesItemModel>
<SalesItemModel>
<category>sample string 6</category>
<code>sample string 4</code>
<createdBy>10</createdBy>
<dateCreated>2025-12-11T22:09:04.9886212+08:00</dateCreated>
<description>sample string 5</description>
<isDeleted>true</isDeleted>
<itemId>3</itemId>
<productId>7</productId>
<quantity>12</quantity>
<salesId>1</salesId>
<salesItemId>2</salesItemId>
<storeId>14</storeId>
<totalItemAmount>13</totalItemAmount>
<unit>sample string 8</unit>
<unitPrice>11</unitPrice>
</SalesItemModel>
</items>
<paymentAssistedBy>15</paymentAssistedBy>
<payments>
<PaymentModel>
<amount>8</amount>
<bankName>sample string 6</bankName>
<checkNumber>sample string 5</checkNumber>
<createdBy>12</createdBy>
<customerId>9</customerId>
<dateCreated>2025-12-11T22:09:04.9886212+08:00</dateCreated>
<dueDate>2025-12-11T22:09:04.9886212+08:00</dueDate>
<isCancelled>true</isCancelled>
<isDeleted>true</isDeleted>
<isPaid>true</isPaid>
<paymentDate>2025-12-11T22:09:04.9886212+08:00</paymentDate>
<paymentId>1</paymentId>
<paymentType>sample string 3</paymentType>
<paymentTypeId>2</paymentTypeId>
<purpose>sample string 4</purpose>
<salesId>7</salesId>
</PaymentModel>
<PaymentModel>
<amount>8</amount>
<bankName>sample string 6</bankName>
<checkNumber>sample string 5</checkNumber>
<createdBy>12</createdBy>
<customerId>9</customerId>
<dateCreated>2025-12-11T22:09:04.9886212+08:00</dateCreated>
<dueDate>2025-12-11T22:09:04.9886212+08:00</dueDate>
<isCancelled>true</isCancelled>
<isDeleted>true</isDeleted>
<isPaid>true</isPaid>
<paymentDate>2025-12-11T22:09:04.9886212+08:00</paymentDate>
<paymentId>1</paymentId>
<paymentType>sample string 3</paymentType>
<paymentTypeId>2</paymentTypeId>
<purpose>sample string 4</purpose>
<salesId>7</salesId>
</PaymentModel>
</payments>
<qouteReference>sample string 18</qouteReference>
<salesId>1</salesId>
<storeId>16</storeId>
<totalAmount>11</totalAmount>
</SaleModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
HttpResponseMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| Version | Version |
None. |
|
| Content | HttpContent |
None. |
|
| StatusCode | HttpStatusCode |
None. |
|
| ReasonPhrase | string |
None. |
|
| Headers | Collection of Object |
None. |
|
| RequestMessage | HttpRequestMessage |
None. |
|
| IsSuccessStatusCode | boolean |
None. |