Save Purchase
API for Purchase Save
URL
purchase/save
Method
POST
Request Media type
application/json
Response Media type
application/json
Request Parameters
| Parameter | Data Type | Min | Max | M/O | Sample Value | Comments |
|---|---|---|---|---|---|---|
| key | String | 32 | 32 | M | 0ilpU7hJinahac8nffC35BX0aTm5eZ84 | Key obtained from authentiaction. |
| eventtype | String | M | E | E - for Edit | ||
| eventid | String | M | 1 | Form ID for Purchase | ||
| pdate | String | M | 2022-11-13 | Date in yyyy-MM-dd Format | ||
| slno | Integer | O | 1 | Mandatory for Edit | ||
| fyear | Integer | O | 22 | Mandatory for Edit | ||
| purchtype | String | M | BB | {"BB", "GST DEALER"}, {"BI", "INTERSTATE"}, {"BU", "UNREGISTERED DEALER"}, {"SO", "ADD ONLY TO STOCK"} | ||
| pbillno | String | M | SSR/1/22/11 | Purchase Bill No | ||
| pbilldate | String | M | 2022-11-13 | Purchase Bill Date | ||
| purchmode | String | M | D | {"D", "CREDIT"}, {"C", "CASH"} | ||
| debitto | Integer | M | 11 | Purchase Head Code | ||
| scode | Integer | M | 1245 | Supplier Code | ||
| cgstin | String | M | 12AAAAA1234AAZA | GSTIN | ||
| remarks | String | O | TEST ENTRY | Remarks | ||
| itceligibility | String | M | T | T for ITC Eligible F for ITC In-Eligible | ||
| reversetaxcalc | String | M | F | T for Reverse Tax Calculation F for Reverse Tax Calculation Not Required | ||
| taxcalcneeded | String | M | T | T for Tax Calculation F for Tax Calculation Not Required | ||
| supplier | String | M | SSR | Supplier name | ||
| debittoheadgroup | Integer | M | 12 | Account Group Code | ||
| placeid | Integer | M | 4 | Place ID | ||
| place | String | M | Kochi | Place Name | ||
| stateid | String | M | KER | State ID of Place | ||
| firmstateid | String | M | KER | Firm State ID | ||
| regmode | String | M | Normal | Customer GST Registration Mode Enum GSTRegistrationMode { Normal = 1, Compound = 2, Unregistered = 3, NotifiedServiceProviderWithReverseCharge = 4 } | ||
| iqmslno | Integer | M | 1 | Mandatory on Edit if Audited Entries, slno | ||
| iqmfyear | Integer | M | 22 | Mandatory on Edit if Audited Entries, fyear | ||
| roundoff | Decimal | M | 0 | Round Off Value | ||
| purchasedetails | Array | M | ||||
| itemcode | Integer | M | 1 | Item Code | ||
| ptype | String | M | M | Product Type of selected Item | ||
| hsnid | Integer | M | 1 | HSN Id of Item | ||
| qty | Decimal | M | 10 | Quantity | ||
| stockqty | Decimal | M | 10 | Qty to Stock. | ||
| uomid | Integer | M | 1 | Unit of measurement Id | ||
| stockuomid | Integer | M | 1 | StockUomid of selected item | ||
| uprice | Decimal | M | 100 | Price of Item | ||
| discount | Decimal | M | 0 | Discount given | ||
| scheduleid | Integer | M | 3 | Tax Schedule id | ||
| extra | Decimal | M | 0 | Any extra amount for item | ||
| stockamount | Decimal | M | 1000 | Stock amount calculated for item | ||
| taxdetails | Array | M | ||||
| TaxPercentage | Decimal | M | 5 | Percentage of Tax | ||
| TaxDisplayName | String | M | 5% | Tax Display name | ||
| PostingHeadCode | Integer | M | 1234 | Tax Posting Code | ||
| PostingReverseCode | Integer | M | 12345 | Reverse Posting Code | ||
| PostingAmount | Decimal | M | 25 | Posting Amount | ||
| TaxFormulaCode | String | M | SGST | Formula Code From Tax Class | ||
| taxrowid | Integer | M | 1 | Row Id From Tax Class | ||
| hsncode | String | M | 456789 | HSN Code of Item | ||
| itemname | String | M | Item Name | Name of Item | ||
| taxpercent | Decimal | M | 5 | Percentage of Tax | ||
| uom | String | M | no | Unit of Measurement | ||
| ledgerdetails | Array | M | ||||
| lfolio | String | M | PI | Purchase Folio | ||
| laccode | Integer | M | 11 | Account Code for Ledger Posting | ||
| extype | String | M | Expense Type (if Any) | |||
| lremark | Decimal | M | TEST ENTRY | Purchase Remarks | ||
| lamount | Decimal | M | 1000 | Amount to be posted | ||
| dc | String | M | D | D is Debit C is Credit | ||
| otherexpensedetails | Array | M | ||||
| accode | Integer | M | 11 | Account Code | ||
| credit | Decimal | M | 0 | Credit Amount | ||
| debit | Decimal | M | 1000 | Debit Amount | ||
| achead | String | M | Purchase Head | Account Head Name | ||
| purchdata | String | M | ||||
| gstreferanceno | String | O | PI/1 | Mandatory on Edit | ||
| debittohead | String | M | Purchase Head | Debitto Head |
Response Values
| Name | Data Type | Min Length | Max Length | M/O | Sample Value | Comments |
|---|---|---|---|---|---|---|
| islno | Integer | M | 1 | Sl No. | ||
| fyear | Integer | M | 22 | Financial Year | ||
| gstreferanceno | String | M | PI/1 | GST Referance No |
Sample Request
{
"key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
"eventtype": "E",
"eventid": "1",
"pdate": "2022-11-13",
"slno": "1",
"fyear": "22",
"purchtype": "BB",
"pbillno": "SSR/1/22/11",
"pbilldate": "2022-11-13",
"purchmode": "D",
"debitto": "11",
"scode": "1245",
"cgstin": "12AAAAA1234AAZA",
"remarks": "TEST ENTRY",
"itceligibility": "T",
"reversetaxcalc": "F",
"taxcalcneeded": "T",
"supplier": "SSR",
"debittoheadgroup": "12",
"placeid": "4",
"place": "Kochi",
"stateid": "KER",
"firmstateid": "KER",
"regmode": "Normal",
"iqmslno": "1",
"iqmfyear": "22",
"roundoff": "",
"purchasedetails": [
{
"itemcode": "1",
"ptype": "M",
"hsnid": "1",
"qty": "10",
"stockqty": "10",
"uomid": "1",
"stockuomid": "1",
"uprice": "100",
"discount": "0",
"scheduleid": "3",
"extra": "0",
"stockamount": "1000",
"taxdetails": [
{
"TaxPercentage": "5",
"TaxDisplayName": "5%",
"PostingHeadCode": "1234",
"PostingReverseCode": "12345",
"PostingAmount": "25",
"TaxFormulaCode": "SGST"
}
],
"taxrowid": "1",
"hsncode": "456789",
"itemname": "Item Name",
"taxpercent": "5",
"uom": "no"
}
],
"ledgerdetails": [
{
"lfolio": "PI",
"laccode": "11",
"extype": "",
"lremark": "TEST ENTRY",
"lamount": "1000",
"dc": "D"
}
],
"otherexpensedetails": [
{
"accode": "11",
"credit": "0",
"debit": "1000",
"achead": "Purchase Head"
}
],
"purchdata": "",
"gstreferanceno": "PI/1",
"debittohead": "Purchase Head"
}
Sample Success Response
{
"islno": "1",
"fyear": "22",
"gstreferanceno": "PI/1",
"e": 200,
"msg": "Success"
}
Sample Failure Responses
{
"e": 499,
"msg": "Invalid Session"
}