eVitalRx
  • API - powered by eVitalRx
  • Getting Started with eVitalRx
  • API FOR Product Catalogue
    • Introduction
    • Medicines
      • Search Product
      • Product Details
      • Search Content
      • Request Product
      • Get Categories
      • Get Category Products
  • API FOR Patient App
    • Introduction
    • Login/Signup
      • Signup send OTP
      • Signup
      • Login
      • Forgot password send OTP
      • Reset password
      • Change password
    • Patients
      • Add Patient
      • Update Patient
      • Get Patient
      • Add Patient family member
    • Addresses
      • List Addresses
      • Add-Update Address
      • Set Default Address
      • Delete Address
    • Medicines
      • Search Products
      • Search Manufacturer
      • Product Details
      • Get Stock details
      • Get Product Batch
      • Search Content
      • Branded to Generic
      • Get Categories
      • Get Category Products
      • Get Entity Categories
      • Get Entity Category Products
    • Orders
      • Place Order
      • Cancel Order
      • Save
      • Order Details
      • Order List
      • Mark as Accept
      • Mark as Reject
      • Get Reject Reasons
      • Get Chemist Order Settings
      • â›”Mark as Shipped
      • Mark as Delivered
      • Order Return
      • Order Return Details
  • API FOR EMR/HMIS SOFTWARE
    • Introduction
    • Medicines
      • Search Products
      • Product Details
      • Get Inventory Status
      • Get Inventory Items
      • Get Alternatives
      • Get Product Batch
      • Get Expired Batches
      • Request Product
      • Branded to Generic
      • Search Content
      • Add Favorite Medicine
    • Patients
      • Add Patient
      • Get Patient
      • Update Patient
      • Add Patient family member
    • Orders
      • Push Prescription
      • Order Details
      • Order List
      • â›”Update Order
      • Save
  • API FOR Custom Fields
    • Introduction
    • Add Custom Fields
    • Update Custom Field
    • Delete Custom Fields
    • List Custom Fields
  • API FOR MASTER
    • Reports
      • Margin Report
      • Stock Summary
  • API FOR FULFILLMENT
    • Introduction
    • Medicines
      • Search Products
      • Product Details
    • Orders
      • â›”Check Serviceability
      • Check Serviceability V3
      • â›”Checkout V2
      • Checkout V3
      • â›”Place Order V2
      • Place Order V3
      • â›”Order Details
      • Order Details V2
      • â›”Cancel Order
      • Cancel Order V2
      • Get Reject Reasons
    • Patients
      • Add Patient
      • Get Patient
  • API FOR B2B
    • Introduction
    • Orders
      • Order Save
      • Order Save as Draft
      • Order List
      • Order Details
      • Order Return Save
      • Order Return List
      • Order Return Details
    • Customers
      • Add / Update Customer
      • Customer List
  • Webhook Responses
    • Introduction
    • Medicine Webhook
    • Transaction Webhook
    • Draft Save
    • Draft Edit
    • Order Save
    • Order Edit
    • Order Accepted
    • Order Rejected
    • Order Shipped
    • Order Delivered
    • Order Split
  • Others
    • Terms & Conditions
Powered by GitBook
On this page

Was this helpful?

  1. API FOR MASTER
  2. Reports

Margin Report

To view Margin of Sales/Sales Return

PreviousReportsNextStock Summary

Last updated 5 months ago

Was this helpful?

Margin Report

POST

Request Body

Name
Type
Description

start_date*

String

Start Date of the report. Must be less than equals to current Date or End Date.

Format = YYYY-MM-DD

end_date*

String

End Date of the report. Must be greater than equals to Start Date and less than equals to current Date.

Format = YYYY-MM-DD

The duration between End Date and Start Date must be less than equals to 31 days.

apikey*

String

Authentication token

view_by

String

item_wise | bill_item_wise

bill_item_wise: Show the margin on Sales bills.

item_wise: Show the margin on items.

Default Value: bill_item_wise

requested_by

String

sales | sale_return

sales: Show Sales Margin Report.

sale_return: Show Sales Return Margin Report.

Default: sales

tags

String

["headache", "painkiller"]

filter by tags in the bill_item_wise report.

child_chemist_code

String

chemist_code of Child Chemist.

It will show the margin report of the child chemist.

{
    "status_code": "1",
    "status_message": "Success",
    "datetime": "2023-01-09 15:06:22",
    "data": {
        "type": "sales",
        "current_page": 1,
        "summary": {
            "total_purchase": 138.88,
            "total_sell": 225.6,
            "total_net_gst": 4.56,
            "profit": 82.16,
            "margin": 38.5
        },
        "results": [
            {
                "order_id": "hXdqB4ImyDFgNkqnvDQfSg==",
                "created_date": "2022-11-08 18:48:23",
                "patient_name": "Poojan Mehta",
                "bill_no": "23",
                "patient_id": "jbe37VCyuofdSgqVfzUAEA==",
                "medicine_id": "gv0GokYn9w4zFL51eouS2g==",
                "total_quantity_sold": 10,
                "gstpercentage": 5,
                "mrp": 112,
                "discount": 10,
                "current_stock": 90, // present stock
                "total_selling_price": 100.8,
                "total_landing_price": 10.08,
                "total_sales_gst": 4.8,
                "order_by_id": "+93Y8e1zYBSOwcnRNboSJw==",
                "order_by_entity": "chemist",
                "tag": [
                    "headache"
                ],
                "medicine_name": "Ltk 50 Tablet",
                "manufacturer_name": "Unison Pharmaceuticals Pvt Ltd",
                "size": 10,
                "pack_size": "10 Tablets",
                "total_purchase_gst": 0.48,
                "total_net_gst": 4.32,
                "taxable_purchase_amount": 9.6,
                "taxable_sales_amount": 96,
                "profit": 86.4,
                "margin": 90
            },
            {
                "order_id": "yl4XZ5EZ9HHUEil31DBWzw==",
                "created_date": "2022-12-01 18:09:48",
                "patient_name": "Ronak Dunzo",
                "bill_no": "24",
                "patient_id": "zRC97Kh3xOMVdHZKkyZRVA==",
                "medicine_id": "BXGcaezmfzcQEdh7fZVmUg==",
                "total_quantity_sold": 15,
                "gstpercentage": 12,
                "mrp": 24,
                "discount": 0,
                "current_stock": 607,
                "total_selling_price": 24,
                "total_landing_price": 16.8,
                "total_sales_gst": 2.57,
                "order_by_id": "+93Y8e1zYBSOwcnRNboSJw==",
                "order_by_entity": "chemist",
                "tag": [
                    "headache"
                ],
                "medicine_name": "LTK-H Tablet 5",
                "manufacturer_name": "Unison Pharmaceuticals Pvt Ltd",
                "size": 15,
                "pack_size": "15 Tablet",
                "total_purchase_gst": 1.8,
                "total_net_gst": 0.77,
                "taxable_purchase_amount": 15,
                "taxable_sales_amount": 21.43,
                "profit": 6.43,
                "margin": 30
            },
            {
                "order_id": "3+uJ2X8XmtbtDwKB1Pa+BQ==",
                "created_date": "2022-11-08 17:13:59",
                "patient_name": "Poojan Mehta",
                "bill_no": "22",
                "patient_id": "jbe37VCyuofdSgqVfzUAEA==",
                "medicine_id": "gv0GokYn9w4zFL51eouS2g==",
                "total_quantity_sold": 10,
                "gstpercentage": 5,
                "mrp": 112,
                "discount": 10,
                "current_stock": 90,
                "total_selling_price": 100.8,
                "total_landing_price": 112,
                "total_sales_gst": 4.8,
                "order_by_id": "+93Y8e1zYBSOwcnRNboSJw==",
                "order_by_entity": "chemist",
                "tag": [
                    "headache"
                ],
                "medicine_name": "Ltk 50 Tablet",
                "manufacturer_name": "Unison Pharmaceuticals Pvt Ltd",
                "size": 10,
                "pack_size": "10 Tablets",
                "total_purchase_gst": 5.33,
                "total_net_gst": -0.53,
                "taxable_purchase_amount": 106.67,
                "taxable_sales_amount": 96,
                "profit": -10.67,
                "margin": -11.11
            }
        ]
    }
}
{
    "status_code": "0",
    "status_message": "end_date is required",
    "datetime": "2023-01-09 15:07:27",
    "data": null
}
{{apiUrl}}master/reports/margin_report