E-Khata API Integration
1. Stock API
2. Price API
URL :
http://122.129.66.75:8181/stock
Method:
Post
Data Params :
{ "SKU" :"FBDY0000364", "ShopId":"1"}
Response Code:
202 Content: {"Data":"[{"ShopId":"1","SKU":"FBDY0000364","Quantity":"0"}]"}
Error Response:
Code: 500 Content: { error : "---------" }
URL:
http://122.129.66.75:8181/price
Method:
Post
Data Params
{ "SKU" :"FBDY0000364", "ShopId":"1"}
Response Code: 202 Content:
{"Data":"[{"Price":"700","SKU":"FBDY0000364","Discount_Price":"100"}]"}
Error Response:
Code: 500 Content: { error : "---------" }
URL:
http://122.129.66.75:8181/create-order
Method:
Post
Data Params :
{ "salesOrder": { "OrderId": "#GK123_1", "ShopId":123, "OrderDate": "2021-09-20", "DiscountVoucher": "10%OFF", "DiscountType": "Fixed/Percentage", "TotalAmount":"150", "TotalQty": 1.0, "FirstName": "Ginkgo", "LastName": "Test", "CustomerEmail": "Ginkgo.test@ginkgoretail.com", "Address1": "Daftarkhawan Vogue Tower MM Alam Road", "Address2": "Gulberg III, Lahore", "City": "Lahore", "Country": "Pakistan", "State": "Punjab", "Telephone": "03210000000", "DiscountAmount": 0.0, "DiscountPercentage": 0.0, "ShippingCost": "0", "Products": [ { "SKU": "4062065285552", "Qty": 1, "DiscountAmount": 660.0, "UnitPrice": "4400.00" }, { "SKU": "4062065285553", "Qty": 2, "DiscountAmount": 1660.0, "UnitPrice": "2400.00" } ] } }
Response Code:
202 Content: {"Data":"invoice has saved"}
Error Response:
Code: 500 Content: { error : "---------"}
URL:
http://122.129.66.75:8181/update-order
Method:
Post
Data Params :
{ "salesOrder": { "OrderId": "#GK123_1", "ShopId":123, "OrderDate": "2021-09-20", "DiscountVoucher": "10%OFF", "DiscountType": "Fixed/Percentage", "TotalAmount":"150", "TotalQty": 1.0, "FirstName": "Ginkgo", "LastName": "Test", "CustomerEmail": "Ginkgo.test@ginkgoretail.com", "Address1": "Daftarkhawan Vogue Tower MM Alam Road", "Address2": "Gulberg III, Lahore", "City": "Lahore", "Country": "Pakistan", "State": "Punjab", "Telephone": "03210000000", "DiscountAmount": 0.0, "DiscountPercentage": 0.0, "ShippingCost": "0", "Products": [ { "SKU": "4062065285552", "Qty": 1, "DiscountAmount": 660.0, "UnitPrice": "4400.00" }, { "SKU": "4062065285553", "Qty": 2, "DiscountAmount": 1660.0, "UnitPrice": "2400.00" } ] } }
Response Code:
202 Content: {"Data":"invoice has updated"}
Error Response:
Code: 500 Content: { error : "---------"}
URL:
http://122.129.66.75:8181/create-order
Method:
Post
Data Params :
{ "returnOrder ": { "OrderId": "#GK123_1", "ShopId":123, "OrderDate": "2021-09-20", "DiscountVoucher": "10%OFF", "DiscountType": "Fixed/Percentage", "TotalAmount":"150", "TotalQty": 1.0, "FirstName": "Ginkgo", "LastName": "Test", "CustomerEmail": "Ginkgo.test@ginkgoretail.com", "Address1": "Daftarkhawan Vogue Tower MM Alam Road", "Address2": "Gulberg III, Lahore", "City": "Lahore", "Country": "Pakistan", "State": "Punjab", "Telephone": "03210000000", "DiscountAmount": 0.0, "DiscountPercentage": 0.0, "ShippingCost": "0", "Products": [ { "SKU": "4062065285552", "Qty": 1, "DiscountAmount": 660.0, "UnitPrice": "4400.00" }, { "SKU": "4062065285553", "Qty": 2, "DiscountAmount": 1660.0, "UnitPrice": "2400.00" } ] } }
Response Code:
202 Content: {"Data":"Return invoice has saved "}
Error Response:
Code: 500 Content: { error : "---------"}