POST api/Purchase/InsertPurchases

Request Information

URI Parameters

None.

Body Parameters

PurchaseHeadModel
NameDescriptionTypeAdditional information
priHeadnum

integer

None.

priDocPrefix

string

None.

priDocNumb

integer

None.

priDocDate

date

None.

priDocDueDate

date

None.

priEntyDate

date

None.

priDescrip

string

None.

supplierKey

integer

None.

supplierName

string

None.

supplierAdrs

string

None.

priReferNo

string

None.

priDocPost

string

None.

ledgerPurchKey

integer

None.

ledgerDiscKey

integer

None.

ledgerApKey

integer

None.

ledgerNoStockKey

integer

None.

ledgerCogsKey

integer

None.

ledgerTaxKey

integer

None.

ledgerCesKey

integer

None.

ledgerRoundKey

integer

None.

priDocType

string

None.

cashCust

string

None.

paymteDays

integer

None.

paymteName

string

None.

priModifyBy

string

None.

priModifyDt

date

None.

priRoundAmt

decimal number

None.

priPostedBy

integer

None.

priPostedDt

date

None.

currencyKey

integer

None.

currencyRate

decimal number

None.

yearKey

integer

None.

userKey

integer

None.

compKey

integer

None.

branchKey

integer

None.

addEdittag

string

None.

purchaseDetailist

Collection of PurchaseDetailModel

None.

sumDiscAmt

decimal number

None.

sumProductTotal

decimal number

None.

Subsordemo

string

None.

Request Formats

application/json, text/json

Sample:
{
  "priHeadnum": 1,
  "priDocPrefix": "sample string 2",
  "priDocNumb": 3,
  "priDocDate": "2026-04-02T05:21:24.7126165+04:00",
  "priDocDueDate": "2026-04-02T05:21:24.7126165+04:00",
  "priEntyDate": "2026-04-02T05:21:24.7126165+04:00",
  "priDescrip": "sample string 7",
  "supplierKey": 8,
  "supplierName": "sample string 9",
  "supplierAdrs": "sample string 10",
  "priReferNo": "sample string 11",
  "priDocPost": "sample string 12",
  "ledgerPurchKey": 13,
  "ledgerDiscKey": 14,
  "ledgerApKey": 15,
  "ledgerNoStockKey": 16,
  "ledgerCogsKey": 17,
  "ledgerTaxKey": 18,
  "ledgerCesKey": 19,
  "ledgerRoundKey": 20,
  "priDocType": "sample string 21",
  "cashCust": "sample string 22",
  "paymteDays": 23,
  "paymteName": "sample string 24",
  "priModifyBy": "sample string 25",
  "priModifyDt": "2026-04-02T05:21:24.7126165+04:00",
  "priRoundAmt": 27.1,
  "priPostedBy": 28,
  "priPostedDt": "2026-04-02T05:21:24.7126165+04:00",
  "currencyKey": 30,
  "currencyRate": 31.1,
  "yearKey": 32,
  "userKey": 33,
  "compKey": 34,
  "branchKey": 35,
  "addEdittag": "sample string 36",
  "purchaseDetailist": [
    {
      "priLinenum": 1,
      "priHeadnum": 2,
      "productKey": 3,
      "productName": "sample string 4",
      "priDescrip": "sample string 5",
      "productQty": 6.1,
      "productPrice": 7.1,
      "discPerc": 8.1,
      "discAmt": 9.1,
      "taxKeyOne": 10,
      "taxName": "sample string 11",
      "taxPerc": 12.1,
      "taxTag": "sample string 13",
      "taxAmount": 14.1,
      "productTotal": 15.1,
      "grvHeadnum": 16,
      "grvDLinenum": 17,
      "lpoHeadnum": 18,
      "lpoDLinenum": 19,
      "ledgerKey": 20,
      "ledgerName": "sample string 21",
      "jobKey": 22,
      "jobName": "sample string 23",
      "costCenterKey": 24,
      "costCenterName": "sample string 25",
      "compStoreKey": 26,
      "compStoreName": "sample string 27",
      "compKey": 28
    },
    {
      "priLinenum": 1,
      "priHeadnum": 2,
      "productKey": 3,
      "productName": "sample string 4",
      "priDescrip": "sample string 5",
      "productQty": 6.1,
      "productPrice": 7.1,
      "discPerc": 8.1,
      "discAmt": 9.1,
      "taxKeyOne": 10,
      "taxName": "sample string 11",
      "taxPerc": 12.1,
      "taxTag": "sample string 13",
      "taxAmount": 14.1,
      "productTotal": 15.1,
      "grvHeadnum": 16,
      "grvDLinenum": 17,
      "lpoHeadnum": 18,
      "lpoDLinenum": 19,
      "ledgerKey": 20,
      "ledgerName": "sample string 21",
      "jobKey": 22,
      "jobName": "sample string 23",
      "costCenterKey": 24,
      "costCenterName": "sample string 25",
      "compStoreKey": 26,
      "compStoreName": "sample string 27",
      "compKey": 28
    }
  ],
  "sumDiscAmt": 37.1,
  "sumProductTotal": 38.1,
  "Subsordemo": "sample string 39"
}

text/xml

Sample:
<PurchaseHeadModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Com.Probooks.ng.Domain.ViewModels">
  <Subsordemo>sample string 39</Subsordemo>
  <addEdittag>sample string 36</addEdittag>
  <branchKey>35</branchKey>
  <cashCust>sample string 22</cashCust>
  <compKey>34</compKey>
  <currencyKey>30</currencyKey>
  <currencyRate>31.1</currencyRate>
  <ledgerApKey>15</ledgerApKey>
  <ledgerCesKey>19</ledgerCesKey>
  <ledgerCogsKey>17</ledgerCogsKey>
  <ledgerDiscKey>14</ledgerDiscKey>
  <ledgerNoStockKey>16</ledgerNoStockKey>
  <ledgerPurchKey>13</ledgerPurchKey>
  <ledgerRoundKey>20</ledgerRoundKey>
  <ledgerTaxKey>18</ledgerTaxKey>
  <paymteDays>23</paymteDays>
  <paymteName>sample string 24</paymteName>
  <priDescrip>sample string 7</priDescrip>
  <priDocDate>2026-04-02T05:21:24.7126165+04:00</priDocDate>
  <priDocDueDate>2026-04-02T05:21:24.7126165+04:00</priDocDueDate>
  <priDocNumb>3</priDocNumb>
  <priDocPost>sample string 12</priDocPost>
  <priDocPrefix>sample string 2</priDocPrefix>
  <priDocType>sample string 21</priDocType>
  <priEntyDate>2026-04-02T05:21:24.7126165+04:00</priEntyDate>
  <priHeadnum>1</priHeadnum>
  <priModifyBy>sample string 25</priModifyBy>
  <priModifyDt>2026-04-02T05:21:24.7126165+04:00</priModifyDt>
  <priPostedBy>28</priPostedBy>
  <priPostedDt>2026-04-02T05:21:24.7126165+04:00</priPostedDt>
  <priReferNo>sample string 11</priReferNo>
  <priRoundAmt>27.1</priRoundAmt>
  <purchaseDetailist>
    <PurchaseDetailModel>
      <compKey>28</compKey>
      <compStoreKey>26</compStoreKey>
      <compStoreName>sample string 27</compStoreName>
      <costCenterKey>24</costCenterKey>
      <costCenterName>sample string 25</costCenterName>
      <discAmt>9.1</discAmt>
      <discPerc>8.1</discPerc>
      <grvDLinenum>17</grvDLinenum>
      <grvHeadnum>16</grvHeadnum>
      <jobKey>22</jobKey>
      <jobName>sample string 23</jobName>
      <ledgerKey>20</ledgerKey>
      <ledgerName>sample string 21</ledgerName>
      <lpoDLinenum>19</lpoDLinenum>
      <lpoHeadnum>18</lpoHeadnum>
      <priDescrip>sample string 5</priDescrip>
      <priHeadnum>2</priHeadnum>
      <priLinenum>1</priLinenum>
      <productKey>3</productKey>
      <productName>sample string 4</productName>
      <productPrice>7.1</productPrice>
      <productQty>6.1</productQty>
      <productTotal>15.1</productTotal>
      <taxAmount>14.1</taxAmount>
      <taxKeyOne>10</taxKeyOne>
      <taxName>sample string 11</taxName>
      <taxPerc>12.1</taxPerc>
      <taxTag>sample string 13</taxTag>
    </PurchaseDetailModel>
    <PurchaseDetailModel>
      <compKey>28</compKey>
      <compStoreKey>26</compStoreKey>
      <compStoreName>sample string 27</compStoreName>
      <costCenterKey>24</costCenterKey>
      <costCenterName>sample string 25</costCenterName>
      <discAmt>9.1</discAmt>
      <discPerc>8.1</discPerc>
      <grvDLinenum>17</grvDLinenum>
      <grvHeadnum>16</grvHeadnum>
      <jobKey>22</jobKey>
      <jobName>sample string 23</jobName>
      <ledgerKey>20</ledgerKey>
      <ledgerName>sample string 21</ledgerName>
      <lpoDLinenum>19</lpoDLinenum>
      <lpoHeadnum>18</lpoHeadnum>
      <priDescrip>sample string 5</priDescrip>
      <priHeadnum>2</priHeadnum>
      <priLinenum>1</priLinenum>
      <productKey>3</productKey>
      <productName>sample string 4</productName>
      <productPrice>7.1</productPrice>
      <productQty>6.1</productQty>
      <productTotal>15.1</productTotal>
      <taxAmount>14.1</taxAmount>
      <taxKeyOne>10</taxKeyOne>
      <taxName>sample string 11</taxName>
      <taxPerc>12.1</taxPerc>
      <taxTag>sample string 13</taxTag>
    </PurchaseDetailModel>
  </purchaseDetailist>
  <sumDiscAmt>37.1</sumDiscAmt>
  <sumProductTotal>38.1</sumProductTotal>
  <supplierAdrs>sample string 10</supplierAdrs>
  <supplierKey>8</supplierKey>
  <supplierName>sample string 9</supplierName>
  <userKey>33</userKey>
  <yearKey>32</yearKey>
</PurchaseHeadModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/xml

Sample:

Sample not available.