Codelayer API Documentation

  • Introduction

    • General Information
  • API Reference

    • Fetch

      • Account Group
      • Account Heads
      • Firm Details
      • Purchase
      • Sales Invoice
      • Stock Item
      • UOM
      • Vouchers
    • Purchase

      • Purchase Invoice
    • Sales

      • Invoice
      • StockItem
      • UOM
    • System

      • Authentication
    • Accounts

      • Account Group
      • Account Heads
      • Firm Details
      • Vouchers
    • Response Codes
Codelayer API Documentation
Purchase Invoice

Purchase Details

URL

purchase/purchaseinvoice

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 fPsXCbkanXtXDgzYjXMOrzKEZeFrz8fe Key obtained from authentiaction.
tfirmid Integer M 1 Firm ID from Tally
clientid String 20 M ABC_01 Client ID
purchases Array M Array of Purchases
transportedby String O KL01 AB 123 Transported By
invoicedetails Array O Item Details in Invoice
itemname String O 20MM Metal Name of item
hsncode String 35 O 998714 HSN Code of Item
qty Decimal O 10 Actual Quantity
billedqty Decimal O 10 Billed Quantity
rate Decimal O 120 Rate of Item
taxablevalue Decimal O 1200 Taxable Value
cgstrate Decimal O 2.5 Percentage of CGST
cgstamount Decimal O 30 CGST Amount
cgsthead String O CGST 2.5 Ledger Name for CGST
sgstrate Decimal O 2.5 Percentage of SGST
sgstamount Decimal O 30 SGST Amount
sgsthead String O SGST 2.5 Ledger Name for SGST
igstrate Decimal O 0 IGST Rate
igstamount Decimal O 0 IGST Amount
igsthead String O IGST 2.5 Ledger Name for IGST
cessdetails Array O Cess Details
cessrate Decimal O 1 Percentage of Cess
cessamount Decimal O 12 Amount of Cess
cesshead String O State Cess Ledger Name for Cess
ledgerdetails Array M Ledger Details
ledgername String M John Name of Ledger
amount Decimal M 1200 Amount
isdeemedpositive String M Yes Yes or No
tnarration String O Purchase Narration in Voucher
tvoucherid String M 3 Voucher ID from tally
invoiceno String M 1 Invoice No
invoicetype String M Purchase Type of Voucher
invoicedate String M 2010-10-15 Invoice Date
partyname String M John Name of Supplier
partyledgername String M John Ledger Name of Supplier
partygstin String O 01AMBPG7773M002 Supplier GSTIN
placeofsupply String O Kerala Place of Supply - State
place String O Kochi Supplied From

 

Response Values
Name Data Type Min Length Max Length M/O Sample Value Comments
status String M OK Updation Status

 

Sample Request
{
    "key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
    "tfirmid": "1",
    "clientid": "ABC_01",
    "purchases": [
        {
            "transportedby": "KL01 AB 123",
            "invoicedetails": [
                {
                    "itemname": "20MM Metal",
                    "hsncode": "998714",
                    "qty": "10",
                    "billedqty": "10",
                    "rate": "120",
                    "taxablevalue": "1200",
                    "cgstrate": "2.5",
                    "cgstamount": "30",
                    "cgsthead": "CGST 2.5",
                    "sgstrate": "2.5",
                    "sgstamount": "30",
                    "sgsthead": "SGST 2.5",
                    "igstrate": "0",
                    "igstamount": "0",
                    "igsthead": "IGST 2.5",
                    "cessdetails": [
                        {
                            "cessrate": "1",
                            "cessamount": "12",
                            "cesshead": "State Cess"
                        }
                    ]
                }
            ],
            "ledgerdetails": [
                {
                    "ledgername": "John",
                    "amount": "1200",
                    "isdeemedpositive": "Yes",
                    "tnarration": "Purchase"
                }
            ],
            "tvoucherid": "3",
            "invoiceno": "1",
            "invoicetype": "Purchase",
            "invoicedate": "2010-10-15",
            "partyname": "John",
            "partyledgername": "John",
            "partygstin": "01AMBPG7773M002",
            "placeofsupply": "Kerala",
            "place": "Kochi"
        }
    ]
}
Sample Success Response
{
    "status": "OK",
    "e": 200,
    "msg": "Success"
}