Sales API’s Documentation.
Save New Transactions
Link: localhost/masterpiece_api/sales/saveSales
Method: POST
action:sale
act:Onlysave
id[txt_transactiontype]:Sale
id[txt_sales_date]:01/25/2023
id[hiddensalesdate]:01/25/2023 //today date
id[credit_paymentamount]: // GUI Cal fun CheckCredit
id[use_credit]: // GUI Cal fun CheckCredit
id[cust_credit_amt]: blank value //From API getAddress
id[hiddendbdate]: // 2023-02-05 23:21:20 today date
id[defaultshipping]:3923045 //From API getAddress
id[defaultmailing]:3923044 ////From API getAddress
id[actionon]:updatereturn
id[isaddresschanged]:0 //1,0 default 0
id[sytemnewdate]:12/31/1969
id[sytemtodaysdate]:01/25/2023 today
id[txt_transaction_number]:
id[txt_idcompany_customer]:
id[txt_maxdiscount]: //From API getAddress.
id[geniusdeviceip]:192.168.60.280 // from geniusdeviceip first api
id[retailpricesetting]:0 // from first api default 0
id[dd_saletype999]:1 // Always 1
id[txt_returnupdate]:returnupdate
id[txt_clientID]:4626840 //As we have client in database. If not leave
blank
id[customernumber]:3382586 //To get customer number use getAddress
API from old system when you enter client name say inspect page and in
network you will get getAddress API in that go in Preview/Response you
will get0 Customer number.
id[txt_client_name]:Navneet Singh Chera Chera of company name
id[txt_title]:
id[txt_firstname]:Navneet Singh Chera
id[txt_lastname]:Chera
id[txt_company]:company name
id[txt_spousepartner]:
id[txt_emailid]:
[email protected]id[txt_normalper]: //from textbox Normal %
id[txt_membership]: //from textbox membership
id[txt_expiry]: //from textbox
id[txt_mname]:Navneet Singh Chera Chera
id[txt_maddress]:Flat no 901, Iris Towers,Nepean Sea Road
id[txt_maddress2]:South Mumbai
id[txt_mcity]:Mumbai
id[txt_mstate]:Maharashtra
id[txt_zipcode]:411001
id[txt_country]:India
id[txt_phoneno]:+91 87898 78988
id[txt_shippingname]:Navneet Singh Chera Chera
id[txt_shippingaddress]:DG1 test12
id[txt_shippingaddress2]:South Mumbai
id[txt_shippingcity]:Mumbai
id[txt_shippingstate]:Maharashtra
id[txt_shippingzipcode]:411001
id[txt_shippingcountry]:India
id[txt_shippingphoneno]:+91 87898 78988
id[quickrow]:1
id[qbo_discount]:0
id[txt_totalsalestax]:0.00
id[quickbook_tax]:0.00
id[txt_newtotalamount]:500.00 // CAL GUI
id[txt_nontaxableamount]:500.00 // CAL GUI
id[txt_taxesamount]:0.00 // CAL GUI
id[txt_paymentsamount]:500.00 // CAL GUI
id[txt_balanceamount]:0.00 // CAL GUI
id[dueamt]:0.00 // CAL GUI
id[paidamt]:500.00
id[amounttopay]:0.00
id[amountpaid]:500.00
id[txt_due_date]:
id[txt_date_paid]:
id[siteID]:PUOKDC086 // if($tsys_setting==1) $merchant_id else “”
id[mkey]:04YJI-MSJ13-PYGPT-TH17K-AK3U4 // from var merchant_key
id[merchantname]:ACME // from var $merchant_name
id[company_name]:ACME // from company details var
id[hidden_class_cardno]:
id[hiddenenccardno]:82A58497836B0D951262FFFEE2520444
id[txt_payment_due_date]:500.00
id[txt_amount_to_differ]:500.00
id[txt_no_of_payments]:1.00
id[txt_first_due_date]:01/25/2023
id[hiddentoday]:01/25/2023
id[hiddenmonth]:2023-02-25
id[radio1]:1 explained below.
id[xtotalpaidamt]:500
id[xtotaldueamt]:0.00
id[xtotalbalance]:0.00
id[paymentamount_genius]:0.00
id[entry_mode_swipe]:swipe
id[isItemchk]:on
id[attributeVal]:50
id1[isItemchk]:on
id2[dd_Location]:1227
id2[dd_tax_type]:6250
id2[selectmailingaddress]:3923044
id2[selectshippingaddress]:3923045
id2[dd_EditionType]:
id2[dd_TaxType]:6250
id2[attributeList]:7741
id4[ta_shippingnotes]:notes update
id4[ta_contactnotes]:cont notes update
id4[ta_transactionnotes]:trans notes update
id4[ta_emailnotes]:email notes update
itemsArray[0][id]:63d22043e539e_6262485 //As we have item. // if now
leave blank
itemsArray[0][rowtype]:sale //if quicksale then value is quicksalenew
itemsArray[0][itemid]:6262485
itemsArray[0][retailprice]:500.00
itemsArray[0][itemtitle]:Test Data for the Sale 22
itemsArray[0][himageurl]:
itemsArray[0][ArtistFirst]:RasjitASD
itemsArray[0][ArtistLast]:Yadav
itemsArray[0][ItemDimensions]:0 x 0
itemsArray[0][discount_percentage]:
itemsArray[0][vendordiscount]:
itemsArray[0][itemqty]:1
itemsArray[0][salestax]:0
itemsArray[0][subtotal]:500.00
itemsArray[0][taxtype]:6250
itemsArray[0][itemedition]:1
itemsArray[0][itemeditiontitle]:Open
itemsArray[0][itemeditiontype]:Open
itemsArray[0][itemeditiontypenew]:1
itemsArray[0][limitededition]:
itemsArray[0][idcompanyitemedition]:
itemsArray[0][pricenow]:500.00
itemsArray[1][id]:63d22043e539e_6262485
itemsArray[1][rowtype]:sale
itemsArray[1][itemid]:6262481
itemsArray[1][retailprice]:500.00
itemsArray[1][itemtitle]:Test Data for the Sale 220
itemsArray[1][himageurl]:
itemsArray[1][ArtistFirst]:RasjitASD
itemsArray[1][ArtistLast]:Yadav
itemsArray[1][ItemDimensions]:0 x 0
itemsArray[1][discount_percentage]:
itemsArray[1][vendordiscount]:
itemsArray[1][itemqty]:1
itemsArray[1][salestax]:0
itemsArray[1][subtotal]:500.00
itemsArray[1][taxtype]:6250
itemsArray[1][itemedition]:1
itemsArray[1][itemeditiontitle]:Open
itemsArray[1][itemeditiontype]:Open
itemsArray[1][itemeditiontypenew]:1
itemsArray[1][limitededition]:
itemsArray[1][idcompanyitemedition]:
itemsArray[1][pricenow]:500.00
paymentsArray[0][id]:
paymentsArray[0][is_genius_sale]:0
paymentsArray[0][date_due]:01/25/2023
paymentsArray[0][date_paid]:01/25/2023
paymentsArray[0][amount_due]:500.00
paymentsArray[0][amount_paid]:500.00
paymentsArray[0][pay_type]:test by dg1
paymentsArray[0]
[card_checknumber]:82A58497836B0D951262FFFEE2520444
paymentsArray[0][expiry]:23
paymentsArray[0][card_name]:card name
paymentsArray[0][cvvcode]:2356
paymentsArray[0][paymenttype]:21316
paymentsArray[0][auth_code]:
paymentsArray[0][appstatus]:
paymentsArray[0][islayway]:0
paymentsArray[0][paymentreturnstatus]:
paymentsArray[0][paymentby]:
CommitionArray[0][id]:
CommitionArray[0][is_main]:1
CommitionArray[0][sale_percent]:50
CommitionArray[0][idcompany_staff]:7741
CommitionArray[1][id]:
CommitionArray[1][is_main]:
CommitionArray[1][sale_percent]:50
CommitionArray[1][idcompany_staff]:9620
billingaddress:3923044
shippingaddress:3923045
Radio1 param.
Weekly send value 1
BiWeekly 2
Semimonthly 3
Monthly 4
Today 5
When click on Find Client:
localhost/masterpiece_api/sales/getClientDetails?clientID=4626787
Click on Find Items.
Encrypt Card
localhost/masterpiece_api/sales/encryptsave
Edit Sales
localhost/masterpiece_api/sales/editSalesRecords?id=4225866&contactid=4626657
Return Button
localhost/masterpiece_api/sales/getReturnSales
When Click on
http://localhost/masterpiece_api/sales/getNewtax?taxId=6250&pricenow=100
To update after it.
Payload. For that particular row
Id[txt_transactiontype] : Return
action: sale
itemsArray[0][ rowtype]: return
itemsArray[0][ returnstatus]: 1
When you click here
http://localhost/masterpiece_api/sales/getNewtax?taxId=6250
Now update. Pass one new paramer.
deletedItemsArray[0]: 7622216 //Id of removed Item.
deletedItemsArray[1]: 7622216
Click on
http://localhost/masterpiece_api/sales/getQuoteDataForConversion
Now update
action: sale
id[txt_transactiontype]: Sale
itemsArray[0][rowtype]: quotestosale
For Quote.
//new creation
action:quote
act:Onlysave
is_active_quote:1
id[is_active_quote]:1
id[txt_transactiontype]:Quote
id[txt_sales_date]:01/25/2023
id[hiddensalesdate]:01/25/2023
id[credit_paymentamount]:
id[use_credit]:
id[cust_credit_amt]:
id[hiddendbdate]:
id[defaultshipping]:3923045
id[defaultmailing]:3923044
id[actionon]:updatereturn
id[isaddresschanged]:0
id[systemdbdate]:
id[sytemnewdate]:12/31/1969
id[sytemtodaysdate]:01/25/2023
id[txt_transaction_number]:
id[txt_idcompany_customer]:
id[txt_maxdiscount]:
id[geniusdeviceip]:192.168.60.280
id[retailpricesetting]:0
id[dd_saletype999]:1
id[txt_returnupdate]:returnupdate
id[txt_clientID]:3596518
id[customernumber]:3382586
id[txt_client_name]:Navneet Singh Chera Chera of company name
id[txt_title]:
id[txt_firstname]:Navneet Singh Chera
id[txt_lastname]:Chera
id[txt_company]:company name
id[txt_spousepartner]:
id[txt_emailid]:[email protected]
id[txt_normalper]:
id[txt_membership]:
id[txt_expiry]:
id[txt_mname]:Navneet Singh Chera Chera
id[txt_maddress]:Flat no 901, Iris Towers,Nepean Sea Road
id[txt_maddress2]:South Mumbai
id[txt_mcity]:Mumbai
id[txt_mstate]:Maharashtra
id[txt_zipcode]:411001
id[txt_country]:India
id[txt_phoneno]:+91 87898 78988
id[txt_shippingname]:Navneet Singh Chera Chera
id[txt_shippingaddress]:DG1 test12
id[txt_shippingaddress2]:South Mumbai
id[txt_shippingcity]:Mumbai
id[txt_shippingstate]:Maharashtra
id[txt_shippingzipcode]:411001
id[txt_shippingcountry]:India
id[txt_shippingphoneno]:+91 87898 78988
id[txt_itemqty]: 1
id[txt_subtotal]:500.00
id[qbo_discount]:0
id[txt_totalsalestax]:0.00
id[quickbook_tax]:0.00
id[txt_newtotalamount]:500.00
id[txt_nontaxableamount]:500.00
id[txt_taxesamount]:0.00
id[txt_paymentsamount]:500.00
id[txt_balanceamount]:0.00
id[dueamt]:0.00
id[paidamt]:500.00
id[amounttopay]:0.00
id[amountpaid]:500.00
id[txt_due_date]:
id[txt_date_paid]:
id[siteID]:PUOKDC086
id[mkey]:04YJI-MSJ13-PYGPT-TH17K-AK3U4
id[merchantname]:ACME
id[company_name]:ACME
id[hidden_class_cardno]:
id[hiddenenccardno]:82A58497836B0D951262FFFEE2520444
id[txt_payment_due_date]:500.00
id[txt_amount_to_differ]:500.00
id[txt_no_of_payments]:1.00
id[txt_first_due_date]:01/25/2023
id[hiddentoday]:01/25/2023
id[hiddenmonth]:2023-02-25
id[radio1]:1
id[xtotalpaidamt]:500
id[xtotaldueamt]:0.00
id[xtotalbalance]:0.00
id[paymentamount_genius]:0.00
id[entry_mode_swipe]:swipe
id[isItemchk]:on
id[attributeVal]:50
id1[isItemchk]:on
id2[dd_Location]:1227
id2[dd_tax_type]:6250
id2[selectmailingaddress]:3923044
id2[selectshippingaddress]:3923045
id2[dd_EditionType]:
id2[dd_TaxType]:6250
id2[attributeList]:7741
id4[ta_shippingnotes]:notes update
id4[ta_contactnotes]:cont notes update
id4[ta_transactionnotes]:trans notes update
id4[ta_emailnotes]:email notes update
itemsArray[0][id]:63d22043e539e_6262485
itemsArray[0][rowtype]:sale
itemsArray[0][itemid]:6262485
itemsArray[0][retailprice]:500.00
itemsArray[0][itemtitle]:Test Data for the Sale 22
itemsArray[0][himageurl]:
itemsArray[0][ArtistFirst]:RasjitASD
itemsArray[0][ArtistLast]:Yadav
itemsArray[0][ItemDimensions]:0 x 0
itemsArray[0][discount_percentage]:
itemsArray[0][vendordiscount]:
itemsArray[0][itemqty]:1
itemsArray[0][salestax]:0
itemsArray[0][subtotal]:500.00
itemsArray[0][taxtype]:6250
itemsArray[0][itemedition]:1
itemsArray[0][itemeditiontitle]:Open
itemsArray[0][itemeditiontype]:Open
itemsArray[0][itemeditiontypenew]:1
itemsArray[0][limitededition]:
itemsArray[0][idcompanyitemedition]:
itemsArray[0][pricenow]:500.00
itemsArray[1][id]:63d22043e539e_6262485
itemsArray[1][rowtype]:sale
itemsArray[1][itemid]:6262481
itemsArray[1][retailprice]:500.00
itemsArray[1][itemtitle]:fake item title
itemsArray[1][himageurl]:
itemsArray[1][ArtistFirst]:RasjitASD
itemsArray[1][ArtistLast]:Yadav
itemsArray[1][ItemDimensions]:0 x 0
itemsArray[1][discount_percentage]:
itemsArray[1][vendordiscount]:
itemsArray[1][itemqty]:1
itemsArray[1][salestax]:0
itemsArray[1][subtotal]:500.00
itemsArray[1][taxtype]:6250
itemsArray[1][itemedition]:1
itemsArray[1][itemeditiontitle]:Open
itemsArray[1][itemeditiontype]:Open
itemsArray[1][itemeditiontypenew]:1
itemsArray[1][limitededition]:
itemsArray[1][idcompanyitemedition]:
itemsArray[1][pricenow]:500.00
paymentsArray[0][id]:
paymentsArray[0][is_genius_sale]:0
paymentsArray[0][date_due]:01/25/2023
paymentsArray[0][date_paid]:01/25/2023
paymentsArray[0][amount_due]:500.00
paymentsArray[0][amount_paid]:500.00
paymentsArray[0][pay_type]:test by dg1
paymentsArray[0][card_checknumber]:82A58497836B0D951262FFFEE2520444
paymentsArray[0][expiry]:23
paymentsArray[0][card_name]:card name
paymentsArray[0][cvvcode]:2356
paymentsArray[0][paymenttype]:21316
paymentsArray[0][auth_code]:
paymentsArray[0][appstatus]:
paymentsArray[0][islayway]:0
paymentsArray[0][paymentreturnstatus]:
paymentsArray[0][paymentby]:
CommitionArray[0][id]:
CommitionArray[0][is_main]:1
CommitionArray[0][sale_percent]:50
CommitionArray[0][idcompany_staff]:7741
CommitionArray[1][id]:
CommitionArray[1][is_main]:
CommitionArray[1][sale_percent]:50
CommitionArray[1][idcompany_staff]:9620
billingaddress:3923044
shippingaddress:3923045
Approval
//new Approval:
action:UpdateApproval
act:Onlysave
id[txt_transactiontype]:Approval
id[txt_sales_date]:01/25/2023
id[hiddensalesdate]:01/25/2023
id[credit_paymentamount]:
id[use_credit]:
id[quickrow]:2
id[cust_credit_amt]:
id[hiddendbdate]:
id[defaultshipping]:3923045
id[defaultmailing]:3923044
id[actionon]:updatereturn
id[isaddresschanged]:0
id[systemdbdate]:
id[sytemnewdate]:12/31/1969
id[sytemtodaysdate]:01/25/2023
id[txt_transaction_number]:
id[txt_idcompany_customer]:
id[txt_maxdiscount]:
id[geniusdeviceip]:192.168.60.280
id[retailpricesetting]:0
id[dd_saletype999]:1
id[txt_returnupdate]:returnupdate
id[txt_clientID]:3596518
id[customernumber]:3382586
id[txt_client_name]:Navneet Singh Chera Chera of company name
id[txt_title]:
id[txt_firstname]:Navneet Singh Chera
id[txt_lastname]:Chera
id[txt_company]:company name
id[txt_spousepartner]:
id[txt_emailid]:[email protected]
id[txt_normalper]:
id[txt_membership]:
id[txt_expiry]:
id[txt_mname]:Navneet Singh Chera Chera
id[txt_maddress]:Flat no 901, Iris Towers,Nepean Sea Road
id[txt_maddress2]:South Mumbai
id[txt_mcity]:Mumbai
id[txt_mstate]:Maharashtra
id[txt_zipcode]:411001
id[txt_country]:India
id[txt_phoneno]:+91 87898 78988
id[txt_shippingname]:Navneet Singh Chera Chera
id[txt_shippingaddress]:DG1 test12
id[txt_shippingaddress2]:South Mumbai
id[txt_shippingcity]:Mumbai
id[txt_shippingstate]:Maharashtra
id[txt_shippingzipcode]:411001
id[txt_shippingcountry]:India
id[txt_shippingphoneno]:+91 87898 78988
id[txt_itemqty]: 1
id[txt_subtotal]:500.00
id[qbo_discount]:0
id[txt_totalsalestax]:0.00
id[quickbook_tax]:0.00
id[txt_newtotalamount]:500.00
id[txt_nontaxableamount]:500.00
id[txt_taxesamount]:0.00
id[txt_paymentsamount]:500.00
id[txt_balanceamount]:0.00
id[dueamt]:0.00
id[paidamt]:500.00
id[amounttopay]:0.00
id[amountpaid]:500.00
id[txt_due_date]:
id[txt_date_paid]:
id[siteID]:PUOKDC086
id[mkey]:04YJI-MSJ13-PYGPT-TH17K-AK3U4
id[merchantname]:ACME
id[company_name]:ACME
id[hidden_class_cardno]:
id[hiddenenccardno]:82A58497836B0D951262FFFEE2520444
id[txt_payment_due_date]:500.00
id[txt_amount_to_differ]:500.00
id[txt_no_of_payments]:1.00
id[txt_first_due_date]:01/25/2023
id[hiddentoday]:01/25/2023
id[hiddenmonth]:2023-02-25
id[radio1]:1
id[xtotalpaidamt]:500
id[xtotaldueamt]:0.00
id[xtotalbalance]:0.00
id[paymentamount_genius]:0.00
id[entry_mode_swipe]:swipe
id[isItemchk]:on
id[attributeVal]:50
id1[isItemchk]:on
id2[dd_Location]:1227
id2[dd_tax_type]:6250
id2[selectmailingaddress]:3923044
id2[selectshippingaddress]:3923045
id2[dd_EditionType]:
id2[dd_TaxType]:6250
id2[attributeList]:7741
id4[ta_shippingnotes]:notes update
id4[ta_contactnotes]:cont notes update
id4[ta_transactionnotes]:trans notes update
id4[ta_emailnotes]:email notes update
itemsArray[0][id]:63d22043e539e_6262485
itemsArray[0][rowtype]:sale
itemsArray[0][itemid]:6262485
itemsArray[0][retailprice]:500.00
itemsArray[0][itemtitle]:Test Data for the Sale 22
itemsArray[0][himageurl]:
itemsArray[0][ArtistFirst]:RasjitASD
itemsArray[0][ArtistLast]:Yadav
itemsArray[0][ItemDimensions]:0 x 0
itemsArray[0][discount_percentage]:
itemsArray[0][vendordiscount]:
itemsArray[0][itemqty]:1
itemsArray[0][salestax]:0
itemsArray[0][subtotal]:500.00
itemsArray[0][taxtype]:6250
itemsArray[0][itemedition]:1
itemsArray[0][itemeditiontitle]:Open
itemsArray[0][itemeditiontype]:Open
itemsArray[0][itemeditiontypenew]:1
itemsArray[0][limitededition]:
itemsArray[0][idcompanyitemedition]:
itemsArray[0][pricenow]:500.00
itemsArray[1][id]:63d22043e539e_6262485
itemsArray[1][rowtype]:sale
itemsArray[1][itemid]:6262481
itemsArray[1][retailprice]:500.00
itemsArray[1][itemtitle]:fake item title
itemsArray[1][himageurl]:
itemsArray[1][ArtistFirst]:RasjitASD
itemsArray[1][ArtistLast]:Yadav
itemsArray[1][ItemDimensions]:0 x 0
itemsArray[1][discount_percentage]:
itemsArray[1][vendordiscount]:
itemsArray[1][itemqty]:1
itemsArray[1][salestax]:0
itemsArray[1][subtotal]:500.00
itemsArray[1][taxtype]:6250
itemsArray[1][itemedition]:1
itemsArray[1][itemeditiontitle]:Open
itemsArray[1][itemeditiontype]:Open
itemsArray[1][itemeditiontypenew]:1
itemsArray[1][limitededition]:
itemsArray[1][idcompanyitemedition]:
itemsArray[1][pricenow]:500.00
CommitionArray[0][id]:
CommitionArray[0][is_main]:1
CommitionArray[0][sale_percent]:50
CommitionArray[0][idcompany_staff]:7741
CommitionArray[1][id]:
CommitionArray[1][is_main]:
CommitionArray[1][sale_percent]:50
CommitionArray[1][idcompany_staff]:9620
billingaddress:3923044
shippingaddress:3923045
Listing
Transaction List.
http://localhost/masterpiece_api/sales/TransactionList
Sales Approval List
http://localhost/masterpiece_api/sales/salesApprovalList
Sales Quote Litst
http://localhost/masterpiece_api/sales/quotesList?
Delete
Transaction List. http://localhost/masterpiece_api/sales/deleteTransaction
Quote List http://localhost/masterpiece_api/sales/deletequote
Approval http://localhost/masterpiece_api/sales/deleteApproval
I
Update
Transaction
id[tranType]: Sale
id[actionon]: updatereturn
id[txt_returnupdate]: returnupdate
action: sale
act: Onlysave
Quote
id[txt_transactiontype]: Quote
action: quote
transType: Qonlysave
is_active_quote:1
Approval
id[txt_transactiontype]: Approval
action: UpdateApproval