Mobile App Solution - Billing API Developer Guide (API Version 2013-08-01)

Download PDF

Mobile App Solution - Billing API

With the help of this plan, the customers will be able to get access to the Advanced features i.e. view the data of Current Stock, able to push own Invoice detail with own rate.

MobileAppSolution - Billing API consist of 2 API’s:

  • MargMST2017 (Post API)
  • Insert Retail Billing API (Post API)

MargMST2017

This API is basically for those customers who need a compact solution. This service/feature can be used for Master Sync. For example: Party/Customer, Product, User Master, Rate updation etc. In this API

we will provide the following Masters:

  1. Party Master : In Party master, we will provide all details related to the Party.
  2. Item Master : In Item master, we will provide all type of Item
  3. User Master : In user master, we will provide different types of users like Salesman, Retailer, Admin, etc.
  4. Other Master : In other master, we will provide different types of Area, Route, Company masters

URL: https://wservices.margcompusoft.com/api/eOnlineData/MargMST2017

API URL

https://wservices.margcompusoft.com/api/eOnlineData/MargMST2017

Interface/API Name

MargMST2017

Json Input

{ "CompanyCode": "", "MargID": "", "Datetime": "", "Index": "" }

Request Type

POST

Content  Type

Application Json

Interface Description

This service/feature is used For Master Sync. For example Customer, Product, User Master, Rate updation etc.

Request (Input Parameters)

Field Name Data Type Sample Value Remark
CompanyCode String MARGLIVE MARGLIVE
MargID Integer 8835 MARGID (Provided by Margerp)
Datetime Date Time (Json Format) If DateTimepass blank then API return ALL Data.Other wise provide incremental data. Datetime format – (2017-01-14 13:53:20)
index Integer 0 Defult 0

Example : Sample Json Input

{
"CompanyCode": "VIKRAMNEGI2",
"MargID": "314539",
"Datetime": "",
"index": "0"
}

Response (Output Parameters)

Json Object name Field name Data Type Length/Decimal Sample Value Remark
Pro_N Rid Integer 9 20170110 Row ID
" " CatCode Varchar 6 Z1 Item Category Code
" " Code Varchar 22 1000005 Item Code
" " Name Varchar 45 BETNSOL INJ. Item Name
" " Stock Numeric 15,3 1.00 Current Stock
" " Remark Varchar 200
" " Company String 40 Cadila Pharma Name of Product Company
" " ShopCode
" " MRP Numeric 10,2 0.00 Maximum Retail Price
" " Rate Numeric 10,2 0.00 Billing Price
" " Deal Numeric 5 10 Deal on (10 if Deal is 10+1)
" " Free Numeric 5 1 Free Qty(1 deal is 10+1)
" " PRate Numeric 10,2 0.00 Purchase Price
" " Is_Deleted Integer 6 0 or 1 If product is deleted or not 0=Not Deleted, 1=Deleted
" " CurBatch Varchar 12 ABC0002 Current Running batch of the item
" " Exp Varchar 20 20/03/2015 Expiry Date of current batch
" " GCode Varchar 6 CP002 Product Company Code
" " MargCode Varchar 200
" " Conversion Varchar 200 15 Item conversion
" " Salt Varchar 6 "A" Salt code
" " ENCODE Varchar 25 " " Barcode
" " Remarks Varchar Remarks information
" " Gcode6 Varchar SJU HSN code (internal code)
" " ProductCode
Pro_U Rid Integer 9 20170110 Row ID (It will Return when Pass Date & Time)
" " CatCode Varchar 6 Z1 Item Category Code
" " Code Varchar 22 1000005 Item Code
" " Name Varchar 45 BETNSOL INJ. Item Name
" " Stock Numeric 15,3 1.00 Current Stock
" " Remark Varchar 200
" " Company String 40 Cadila Pharma Name of Product Company
" " ShopCode
" " MRP Numeric 10,2 0.00 Maximum Retail Price
" " Rate Numeric 10,2 0.00 Billing Price
" " Deal Numeric 5 10 Deal on (10 if Deal is 10+1)
" " Free Numeric 5 1 Free Qty(1 deal is 10+1)
" " PRate Numeric 10,2 0.00 Purchase Price
" " Is_Deleted Integer 6 0 or 1 If product is deleted or not 0=Not Deleted, 1=Deleted
" " CurBatch Varchar 12 ABC0002 Current Running batch of the item
" " Exp Varchar 20 20/03/2015 Expiry Date of current batch
" " GCode Varchar 6 CP002 Product Company Code
" " MargCode Varchar 200
" " Conversion Varchar 200 15 Item conversion
" " Salt Varchar 6 "A" Salt Code
" " ENCODE Varchar 25 "" Barcode
" " Remarks Varchar Remarks information
" " Gcode6 Varchar SJU HSN code (internal code)
" " ProductCode
Pro_S Code Varchar 22 124 Item internal Code (It will Return when Pass Date & Time)
" " Stock Varchar 15,3 "0" item stock Qty
" " ProductCode
Pro_R Code Varchar 22 124 Item internal Code (It will Return when Pass Date & Time)
" " Stock Numeric 0.00 Item Stock Qty
" " MRP Numeric 10,2 0.00 MRP Rate
" " Rate Numeric 10,2 "1.66" Sale rate
" " Deal Varchar 5 "0" Deal Qty
" " Free Varchar 5 "0" Free Qty
" " PRate Numeric 10,2 0.00 Purchase rate
" " ProductCode
" " Curbatch Varchar "BFE456" Current Batch (FIFO base)
Stype Rid Integer 6 85344 Row ID(Identity)
" " Sgcode Varchar 6 "AREA" Sub Master Code,,, For Company 'AREA' for Category CATEGO','.'ROUT'
" " Scode Varchar 6 "A9" Sub Master Code
" " Name String 45 CADILA PHARMA Name of Group/area/company/route
" " Is_Deleted Integer 0 0=not deleted ,1=deleted
Party Rid Integer 186999 Row ID ( Identity)
" " Area String 6 " " Area Code
" " Code String 6 CREDIT Party Code
" " Address String 150 " " Party Address
" " Name String 45 CREDIT CARD Party Name
" " Balance Numeric 14,2 0.00 Current Party Balance
" " Pdc Numeric 14,2 0.00 PDC amount of party
" " Gcode String 6 C6 Ledger Type ( Group Debtor, creditor, sales man etc)
" " Opening Numeric 14,2 0.00 Party Opening as on start of the financial year
" " Is_Deleted Integer 0 1=deleted , 0 = not deleted
" " Phone1 String 12 8527812345 phone number-1
" " Phone2 String 12 8527812345 phone number-2
" " Phone3 String 12 8527812345 phone number-3
" " Phone4 String 12 8527812345 phone number-4
" " Email String 45 test1@gmail.com Email ID-1
" " Emai2 String 45 test1@gmail.com Email ID-2
" " Email3 String 45 test1@gmail.com Email ID-3
" " Bank String 45 " " Bank Name For Payment
" " Branch String 45 " " Bank Branch Name
" " MargCode String 20 " "
" " GSTIN String 15 " "
" " DlNo. String 45 " "
" " LedgerCode
Users RowID Integer 12361 Row ID ( Identity)
" " UserID String 50 PNC User ID
" " Name String 100 PNC User Name
" " Address1 String 60 F-11 Roshanara Plaza, User Address-1
" " Address2 String 60 Roshanara Road, User Address-2
" " Address3 String 60 Delhi User Address-3
" " Phone String 25 011 30969600 User Phone
" " Mobile String 25 9329203638 User Mobile
" " Email String 50 test@gmail.com User Email ID
" " Is_Deleted Integer 0 1=deleted , 0 = not deleted
" " Type String 1 S User Type (S-salesman)
Index Integer 500000
DataStatus String 10 Completed
DataStatus String 10 Completed
Status String 10 Success Message
DateTime Date & TIme 26 2017-01-14 13:53:20 API Returns Date & Time.(it will use for next time)

Example : Sample Json Output

{
    "Details": {
        "pro_N": [
            {
                "rid": "31579023",
                "catcode": "SFB   ",
                "code": "1010049",
                "name": "ITEM CATEGORY",
                "stock": "0.000",
                "remark": "",
                "company": "COMPANY ABC",
                "shopcode": "",
                "MRP": "0.00",
                "Rate": "0.00",
                "Deal": "0",
                "Free": "0",
                "PRate": "0.00",
                "Is_Deleted": "0",
                "curbatch": "",
                "exp": "        ",
                "gcode": "FE    ",
                "MargCode": "",
                "Conversion": "0",
                "Salt": "SFB",
                "ENCODE": "",
                "remarks": "P;9;2; ;1;;;;;;PCS ;;;0;9;;;",
                "Gcode6": null,
                "ProductCode": ""
            }
        ],
        "pro_U": [
            {
                "rid": "31579023",
                "catcode": "SFB   ",
                "code": "1010049",
                "name": "ITEM CATEGORY",
                "stock": "0.000",
                "remark": "",
                "company": "COMPANY ABC",
                "shopcode": "",
                "MRP": "0.00",
                "Rate": "0.00",
                "Deal": "0",
                "Free": "0",
                "PRate": "0.00",
                "Is_Deleted": "0",
                "curbatch": "",
                "exp": "        ",
                "gcode": "FE    ",
                "MargCode": "",
                "Conversion": "0",
                "Salt": "SFB",
                "ENCODE": "",
                "remarks": "P;9;2; ;1;;;;;;PCS ;;;0;9;;;",
                "Gcode6": null,
                "ProductCode": ""
            }
        ],
        "pro_S": [
            {
                "code": "1010045",
                "stock": "27.000",
                "ProductCode": ""
            }
        ],
        "pro_R": [
            {
                "code": "1010019",
                "stock": "0.000",
                "MRP": "300.00",
                "Rate": "220.00",
                "Deal": "0",
                "Free": "0",
                "PRate": "200.00",
                "ProductCode": "",
                "Curbatch": ""
            }
        ],
        "Stype": [
            {
                "rid": "3704087",
                "sgcode": "CATEGO",
                "scode": "SFB   ",
                "name": "CETEGORY",
                "Is_Deleted": "0"
            }
        ],
        "Party": [
            {
                "rid": "4790934",
                "area": "      ",
                "code": "KJ    ",
                "address": "",
                "name": "B",
                "balance": "600.00",
                "pdc": "0.00",
                "gcode": "C6    ",
                "opening": "0.00",
                "Is_Deleted": "0",
                "phone1": "",
                "phone2": "            ",
                "phone3": "            ",
                "phone4": "            ",
                "email1": "",
                "email2": "",
                "email3": "",
                "bank": "",
                "branch": "",
                "MargCode": "0000      ",
                "GSTIN": "",
                "DlNo": "",
                "LedgerCode": ""
            }
        ],
        "Users": [
            {
                "RowID": "171339",
                "UserID": "SALES",
                "Name": "SALESMAN",
                "Address1": "",
                "Address2": "",
                "Address3": "",
                "Phone": "",
                "Mobile": "",
                "Email": "",
                "Is_Deleted": "0",
                "Type": "S"
            }
        ],
        "Index": "500000",
        "Datastatus": "Completed",
        "Status": "Sucess",
        "DateTime": "2022-03-25 16:07:44"
    }
}

Field Description:

  • Pro_N ->NewProduct
  • Pro_U -> UpdatedProduct
  • Pro_S -> Stock updatedProduct
  • Pro_R -> Rate updatedproduct
  • Stype -> Product wisecompany
  • Party -> partytable
  • Index -> 0
  • Status ->Success/Failure
  • Datetime -> Response Date &Time