Codelayer API Documentation

  • Introduction

    • General
  • API Reference

    • System

      • License request
      • Register Device
      • Authentication
    • Accounts

      • Reports

        • Daily Statement
        • Daybook
        • Debtors Balance
    • Sales

      • Cancel

        • Cancel Request Register
        • Cancel Request Save
        • Pending Cancellations
      • Reports

        • Gatepass Register
        • Sales Summary
        • Vehicle Rent Details
    • Response Codes
Codelayer API Documentation
Sales Summary

Display the Sales Summary of the selected dates

URL

sales/reports/sales_summary

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 iEuRmowxUW6Dbcto466WI5UHZ6zEplpD Key obtained from authentiaction.
from String 10 10 M 2019-04-02 The from date in yyyy-MM-dd format
to String 10 10 M 2019-11-02 To date in yyyy-MM-dd format

 

Response Values
Name Data Type Min Length Max Length M/O Sample Value Comments
tax_summary Array 6 6 M Tax summary
item String 4 15 M Taxable Value Item description
Cash Decimal M 127156.00 Cash sale amount
Credit Decimal M 27365.00 Credit sale amount. This field always have 2 decimal places.
bill_count Array 1 3 M Number of bills by bill type.
type String 2 2 M BU Type of the bill. Currently there is only 3 types (BU, BB and BI)
count String M 52 Number of bills of the type.
product_summary Array O Product wise sales summary.
pname String 3 100 M 12MM[CFT] Name of the product
qty Decimal 1 M 29610.30 Quantity of the product.
amount Decimal 1 M 888699.00 The total amount for the product. This field always have 2 decimal places.

 

Sample Request
{
    "key": "QH7LlQ3wQMK9oYEKjeG5QOIVJQT4emeq",
    "from": "2019-04-02",
    "to": "2019-11-02"
}
Sample Success Response
{
    "tax_summary": [
        {
            "item": "Taxable Value",
            "Cash": "127156.00",
            "Credit": "27365.00"
        }
    ],
    "bill_count": [
        {
            "type": "BU",
            "count": "52"
        }
    ],
    "product_summary": [
        {
            "pname": "12MM[CFT]",
            "qty": "29610.30",
            "amount": "888699.00"
        }
    ],
    "e": 200,
    "msg": "Success"
}
Sample Failure Responses
{
    "e": 400,
    "msg": "Bad Request."
}