Download OpenAPI specification:
Every API request should be sent with a valid token. The token can be fetched by registering
a remote application in your account's Settings -> Users & Groups -> Remote applications.
The token of the remote application should be passed along with the header X-Auth-Token
and also make sure the remote application is authorized with necessary permissions.
Deletes a bill and all associated data.
This endpoint permanently removes the specified bill along with its items, add-ons, settlements, return associations, generated documents, and related stock claim (if any). Associated bill documents stored on the server are also removed.
Purchase and purchase-return bills can only be deleted by users authorized to manage purchase bills.
Snp/delete-bill is needed
| bill_id required | integer Identifier of the bill to delete. |
{- "message": "string"
}Retrieves complete information about a bill.
A bill can be retrieved either by its unique identifier or by providing the bill number and bill type. The response includes bill information, customer details, purchased items, settlements, coupons, loyalty information, bill parameters, linked documents, and references to related bills.
The endpoint also supports returning the bill as a PDF document or returning tax-related information.
bill_id or both bill_number and bill_type
must be provided.format=pdf.format=taxerinfo.| bill_id | integer Identifier of the bill. |
| bill_number | string Bill number used when |
| bill_type | string Bill type corresponding to the supplied bill number. |
| format | string Enum: "pdf" "taxerinfo" Response format. Omit this parameter to receive the complete bill information as JSON. |
| heading | string Custom heading for the generated PDF. |
| subheading | string Custom subheading for the generated PDF. |
| item_fields | string Comma-separated list of item fields to include in the response. |
| params_barcode_fmt | string Barcode format used while generating bill parameters. |
{- "addons": [
- {
- "amount": 40,
- "name": "Delivery Charge"
}
], - "against_bill": {
- "bill_number": "INV-0988",
- "bill_type": "sale",
- "created_on": "2026-08-01T11:00:00Z",
- "id": 88,
- "settled": 800,
- "total": 800
}, - "app_id": null,
- "bill_number": "INV-1001",
- "bill_type": "sale",
- "cancelled": false,
- "contact_addr_id": 5,
- "contact_id": 12,
- "contact_name": "John Doe",
- "contact_wallet": 250.5,
- "coupons": [
- {
- "code": "SAVE50",
- "discount": 50
}
], - "created": "2026-08-05T09:15:00Z",
- "created_by": "admin@example.com",
- "documents": {
- "invoice": "/documents/invoice.pdf"
}, - "due_date": "2026-08-15T00:00:00Z",
- "item_savings": {
- "total_discount": 50
}, - "items": [
- {
- "item_id": 10,
- "item_name": "Rice",
- "quantity": 2,
- "rate": 500,
- "total": 1000
}
], - "last_updated": "2026-08-05T09:30:42Z",
- "last_updated_by": "admin@example.com",
- "loyalty": [
- {
- "id": "reward-points",
- "last_updated": "2026-08-05T09:20:00Z",
- "value": 20
}
], - "loyalty_last_updated": "2026-08-05T09:20:00Z",
- "manual_disc": {
- "amount": 150,
- "rate": 10
}, - "params": {
- "gst_no": "33ABCDE1234F1Z5",
- "salesperson": "John"
}, - "referring_bills": [
- {
- "bill_number": "RET-1002",
- "bill_type": "sale-return",
- "created_on": "2026-08-06T10:30:00Z",
- "id": 102,
- "settled": 200,
- "total": 200
}
], - "settled": 1500,
- "settlements": [
- {
- "amount": 1000,
- "mode": "Cash"
}, - {
- "amount": 500,
- "mode": "UPI"
}
], - "shipping_addr_id": 8,
- "total": 1500,
- "total_logic": null
}Updates one or more properties of an existing bill.
This endpoint supports modifying bill information such as the bill number, bill date, due date, contact and shipping addresses, manual discounts, coupons, cancellation status, bill parameters, linked bills, and bill calculation logic.
Depending on the fields being updated, the bill may be automatically recalculated and the updated totals returned.
param. are treated as custom
bill parameters.total_logic is supplied,
logic_is_temp must also be supplied.Any of the following permissions are needed
Snp/create-billSnp/modify-bill| bill_id required | integer Identifier of the bill to update. |
| contact | integer Update the contact identifier. |
| bill_type | string Update the bill type. |
| bill_number | string Update the bill number. |
| created_on | string <date-time> Update the bill creation date. |
| due_date | string <date-time> Update the due date. |
| contact_addr_id | integer Update the billing address. |
| shipping_addr_id | integer Update the shipping address. |
| coupon | string Apply or remove a coupon.
Prefix the coupon code with |
| cancelled | boolean Cancel or restore the bill. |
| discount_rate | number Manual discount percentage. |
| discount_amount | number Manual discount amount. |
| total_logic | string Updated bill calculation logic. |
| logic_is_temp | boolean Indicates whether the supplied logic is temporary. |
| against_bill_number | string Link the bill using the bill number. |
| against_bill_id | integer Link the bill using the bill identifier. |
| convert | boolean Convert a proforma bill. |
| noclaim | boolean Remove the associated stock claim. |
| noaccnt | boolean Exclude the bill from accounting. |
{- "addons": {
- "Delivery Charge": 40,
- "Packing Charge": 20
}, - "recalc": true,
- "total": 1540
}Adds items and optional add-ons to an existing bill.
This endpoint updates an existing bill by adding one or more items and recalculating the bill totals, loyalty benefits, discounts, and applicable add-ons.
For sale-return bills, exchange items can also be supplied. In that case, the API automatically creates a new exchange sale bill, adds the supplied exchange items, optionally applies bill parameters and add-ons, and returns details of both the updated return bill and the newly created exchange bill.
items, addons, or exch_items
must be supplied.Any of the following permissions are needed
Snp/create-billSnp/modify-bill| bill_id required | integer Identifier of the bill. |
| addons | Array of objects Preset add-ons to apply. |
| exch_addons | Array of objects Add-ons for the exchange bill. |
| exch_items | Array of objects Exchange items to create a new exchange bill. Applicable only for sale-return bills. |
| exch_params | object Parameters for the exchange bill. |
| items | Array of objects Items to add to the bill. |
{- "addons": [
- { }
], - "exch_addons": [
- { }
], - "exch_items": [
- { }
], - "exch_params": { },
- "items": [
- { }
]
}{- "addons": {
- "Delivery Charge": 40
}, - "loyalty": {
- "earned": 12,
- "redeemed": 0
}, - "manual_disc_amnt": 0,
- "new_rows": [
- {
- "item": {
- "coupon_disc": 20,
- "discount": 10,
- "discount_price": 450,
- "id": 10,
- "offer_id": 8,
- "offer_savings": 35,
- "particulars": "Premium Rice",
- "price": 500,
- "quantity": 2,
- "reward_disc": 15,
- "sp_id": 3
}, - "row_id": 245
}
], - "total": {
- "payable": 1040,
- "total": 1040
}
}Recalculates the total amount of an existing bill.
This endpoint evaluates the bill using its configured bill-total logic, recalculates all applicable add-ons and totals, updates the bill's last modified information, and returns the updated values.
This operation does not add or remove bill items. It only recalculates the bill based on its current contents.
Any of the following permissions are needed
Snp/create-billSnp/modify-bill| bill_id required | integer Identifier of the bill to recalculate. |
{- "addons": {
- "Delivery Charge": 40,
- "Packing Charge": 20
}, - "total": 1560
}Deletes one or more item rows from an existing bill.
This endpoint removes either a specific bill item row or all item rows from the bill. After deletion, the bill is automatically recalculated, including totals, discounts, loyalty rewards, and applicable add-ons.
If the bill is linked to the stock module, the associated stock claim is updated or recreated as required.
*.* as the row identifier to delete all items from
the bill.Any of the following permissions are needed
Snp/create-billSnp/modify-bill| bill_id required | integer Identifier of the bill. |
| row_id required | string Identifier of the bill item row. Specify |
{- "addons": {
- "Delivery Charge": 45
}, - "item_savings": {
- "coupons": 20,
- "discount": 45,
- "rewards": 15
}, - "items": [
- {
- "discount": 10,
- "id": 18,
- "price": 450,
- "quantity": 2
}
], - "last_updated": "2026-08-06T10:45:30Z",
- "last_updated_by": "admin@example.com",
- "loyalty": {
- "earned": 10,
- "redeemed": 0
}, - "manual_disc_amnt": 0,
- "offer": {
- "id": 8,
- "name": "Festival Offer"
}, - "total": {
- "payable": 945,
- "subtotal": 900,
- "total": 945
}
}Updates one or more items in an existing bill.
This endpoint allows modifying the details of bill items, such as quantity, price, discount, discount price, sales person, and other supported row attributes. The endpoint can update either a single bill row or multiple rows in a single request.
After updating the item(s), the bill is automatically recalculated. Any applicable bill add-ons, offers, loyalty benefits, manual discounts, and totals are recalculated before the response is returned.
If updating an item causes additional rows to be created (for example due to offer or bundle processing), the newly created rows are returned in the response.
Sale-return and purchase-return bills require return authorization before items can be modified.
row_id is _, the rows request body is mandatory.All of the following permissions are needed
Snp/create-billSnp/modify-bill| bill_id required | integer Identifier of the bill. |
| row_id required | string Identifier of the bill row to update. Specify |
| rows | Array of objects List of bill rows to update when |
{- "rows": [
- { }
]
}{- "addons": [
- {
- "amount": 40,
- "name": "Delivery Charge"
}
], - "loyalty": [
- {
- "id": "reward-points",
- "value": 25
}
], - "manual_disc_amnt": 50,
- "new_rows": [
- {
- "item": {
- "coupon_disc": 20,
- "discount": 10,
- "discount_price": 450,
- "id": 101,
- "offer_id": 8,
- "offer_savings": 30,
- "particulars": "Premium Rice",
- "price": 500,
- "quantity": 2,
- "reward_disc": 10,
- "sp_id": 5
}, - "row_id": 58
}
], - "recalc": true,
- "total": 1585
}Sends a bill to the associated contact using the configured communication service.
The bill is prepared and submitted for delivery using the contact's available communication channels, such as email, SMS, or WhatsApp, depending on the system configuration.
The communication request includes the bill details, a PDF version of the invoice as an attachment, and any applicable loyalty point information.
Snp/access-bills is needed
| bill_id required | integer Identifier of the bill to send. |
{ }Retrieves a summarized view of a single bill.
This endpoint returns the bill's basic information along with optional sections such as items, settlements, add-ons, coupons, bill parameters, documents, and calculated savings depending on the query parameters supplied.
It is intended for applications that require a lightweight representation of a bill without retrieving the complete bill details.
Snp/access-bills is needed
| bill_id required | integer Identifier of the bill. |
| items | boolean Include bill items. |
| settlements | boolean Include settlement details. |
| addons | boolean Include bill add-ons and calculated item savings. |
| coupons | boolean Include applied coupons. |
| params | boolean Include bill parameters. |
| documents | boolean Include attached bill documents. |
| item_savings | boolean Include calculated item savings. |
{- "addons": [
- {
- "amount": 40,
- "title": "Delivery Charge"
}
], - "against_bill_date": "2026-08-01T11:00:00Z",
- "against_bill_number": "INV-0988",
- "against_invoice_id": 88,
- "bill_number": "INV-1001",
- "bill_type": "sale",
- "contact_addr_id": 5,
- "contact_id": 12,
- "coupons": [
- {
- "code": "SAVE50",
- "discount": 50
}
], - "created": "2026-08-05T09:15:00Z",
- "created_by": "admin@example.com",
- "documents": {
- "invoice": "/documents/invoice.pdf"
}, - "item_savings": {
- "coupons": 15,
- "discount": 25,
- "rewards": 10
}, - "items": [
- {
- "item_id": 10,
- "price": 500,
- "quantity": 2
}, - {
- "item_id": 15,
- "price": 500,
- "quantity": 1
}
], - "last_updated": "2026-08-05T09:30:42Z",
- "last_updated_by": "admin@example.com",
- "manual_disc": {
- "amount": 150,
- "rate": 10
}, - "params": {
- "gst_no": "33ABCDE1234F1Z5"
}, - "settled": 1500,
- "settlements": [
- {
- "amount": 1000,
- "mode": "Cash"
}, - {
- "amount": 500,
- "mode": "UPI"
}
], - "shipping_addr_id": 8,
- "total": 1500
}Retrieves bills matching the supplied filters.
This endpoint returns bill details for sales, purchase, return, and other supported bill types based on the authenticated user's permissions. Customer-authenticated requests automatically return only bills belonging to the authenticated customer.
The response can be customized by selecting specific fields, filtering records, sorting results, limiting the number of returned records, or requesting summary information.
fields parameter.summary
parameter.param.* or
param.<parameter_name>.dues and settled filters cannot be used together.Snp/access-bills is needed
| fields | string Comma-separated list of fields to include in the response.
Supports |
| contact | string Filter by contact identifier. |
| bill_type | string Comma-separated list of bill types to retrieve. |
| settled | boolean Return only fully settled bills. |
| dues | boolean Return only bills with pending dues. |
| cancelled | boolean Filter by cancellation status. |
| due_date | string Filter by due date. |
| date | string Filter by bill creation date. |
| item_ids | string Comma-separated list of item identifiers. |
| sp_ids | string Comma-separated list of sales person identifiers. |
| sort | string Sorting expression in the format
|
| max | integer Maximum number of records to return. |
| summary | boolean Return bill summary grouped by bill type. |
| download | boolean Generate a downloadable export instead of returning the bill list. Available only for authorized internal users. |
[- {
- "against_bill_date": "2026-08-01T11:00:00Z",
- "against_bill_num": "INV-0988",
- "against_inv_id": 88,
- "bill_number": "INV-1001",
- "bill_type": "sale",
- "cancelled": false,
- "contact": "John Doe",
- "contact_addr_id": 5,
- "contact_id": 12,
- "date": "2026-08-05T09:15:00Z",
- "due_date": "2026-08-15T00:00:00Z",
- "id": 101,
- "num_items": 3,
- "param.gst_no": "33ABCDE1234F1Z5",
- "settled": 1500,
- "shipping_addr_id": 8,
- "tot_qty": 8,
- "total": 1500
}, - {
- "bill_number": "INV-1002",
- "bill_type": "sale",
- "cancelled": false,
- "contact": "Jane Smith",
- "contact_addr_id": 7,
- "contact_id": 18,
- "date": "2026-08-06T11:30:00Z",
- "due_date": "2026-08-16T00:00:00Z",
- "id": 102,
- "num_items": 5,
- "settled": 1000,
- "shipping_addr_id": 9,
- "tot_qty": 14,
- "total": 2450
}
]Creates a new bill.
This endpoint creates sales, purchase, return, quotation, and proforma bills. Bills can be created for an existing contact, a newly created contact, or against an existing bill for return and exchange workflows.
During creation, items, bill parameters, add-ons, coupons, exchange items, and related metadata can also be added. After successful creation, bill totals are calculated, audit logs are generated, pending bill parameters are checked asynchronously, and the bill can optionally be sent to the customer.
contact, contact_name, against_bill_id, or
against_bill_number must be supplied.quotation and proforma cannot be used together.against_bill_number is supported only for return bills.exch_items.Any of the following permissions are needed
Snp/create-billSnp/modify-bill| quotation | string Create a quotation. |
| proforma | boolean Create a proforma invoice. |
| noclaim | boolean Do not create a stock claim. |
| noaccnt | boolean Skip accounting entry generation. |
| send | boolean Send the bill after creation. |
| claim-exch | boolean Create claim for exchange invoice. |
| accnt-exch | boolean Generate accounting entry for exchange invoice. |
| addons | Array of objects |
| against_bill_id | integer Existing bill identifier for return/exchange bills. |
| against_bill_number | string Existing bill number for return bills. |
| bill_number | string Custom bill number. |
| bill_type | string Enum: "sale" "purchase" "sale-return" "purchase-return" |
| cancel_old_invoices | boolean Cancel previous unpaid invoices for the contact. |
| contact | integer Existing contact identifier. |
| contact_name | string Creates a new contact when |
| coupon | string Coupon code. |
| exch_addons | Array of objects |
| exch_items | Array of objects |
| exch_params | object |
| items | Array of objects |
| params | object |
{- "addons": [
- {
- "amount": 40,
- "title": "Delivery Charge"
}
], - "bill_type": "sale",
- "contact": 12,
- "coupon": "NEWYEAR25",
- "items": [
- {
- "item_id": 101,
- "price": 500,
- "quantity": 2
}, - {
- "item_id": 205,
- "price": 300,
- "quantity": 1
}
], - "params": {
- "remarks": "Home delivery",
- "salesperson": "John"
}
}{- "id": 2451,
- "new_rows": [
- {
- "item_id": 101,
- "row_id": 1
}, - {
- "item_id": 205,
- "row_id": 2
}
]
}Exports invoices for the specified date range.
The from parameter is mandatory and specifies the start date/time
of the export range.
The optional to parameter specifies the end date/time. If to is
not provided, the current UTC date/time is used.
Additional request parameters are passed to the invoice export serializer and can be used to control the exported invoice data.
Snp/access-bills is needed
| from required | string Start date/time for the invoice export. |
| to | string End date/time for the invoice export. If not provided, the current UTC date/time is used. |
{- "message": "string"
}Retrieves the list of available output formats that can be used to generate or print bills.
Output formats may be contributed by installed applications through extension hooks as well as by the built-in SNP module.
Each output format identifies the output type, the endpoint used to generate it, the application providing it, and whether it is currently configured as the default.
is_default field is present only for the configured
default format of a given output type.[- {
- "app_code": "snp",
- "id": 1,
- "is_default": true,
- "provider_code": "aalam",
- "title": "Simple PDF",
- "type": "pdf",
- "url": "/aalam/snp/pdf"
}, - {
- "app_code": "snp",
- "id": 2,
- "provider_code": "aalam",
- "title": "Simple Print",
- "type": "print",
- "url": ""
}
]Retrieves the list of available bill print formats.
Print formats are contributed by installed applications through registered hooks. Each entry contains metadata describing a print format along with the URL used to generate or preview it.
The exact fields returned depend on the application providing the print format.
[- {
- "app_name": "POS Receipt",
- "description": "Thermal receipt print format",
- "icon": "receipt.png",
- "id": 1,
- "url": "/aalam/pos/receipt"
}
]Retrieves summarized bill information matching the supplied filter criteria.
Unlike the bill listing endpoint, this API returns a compact representation of each bill including item summaries, add-ons, manual discounts, linked bills, and optionally settlement information. It is primarily intended for reporting, synchronization, analytics, and offline processing.
At least one filter parameter must be supplied to prevent accidental retrieval of the complete bill database.
settlements field is returned only when the
settlements query parameter is specified.max is omitted, a maximum of 30 records are
returned.id, date, and total support sorting.Snp/access-bills is needed
| contact | integer Filter by contact identifier. |
| bill_number | string Filter by bill number. |
| bill_type | string Filter by bill type. |
| total | number Filter by bill total. |
| settled | number Filter by settled amount. |
| cancelled | boolean Filter by cancellation status. |
| date | string Filter by bill creation date. |
| updated_on | string Filter by last update timestamp. |
| gen_updated_on | string Filter by generated update timestamp. |
| sort | string Sorting expression in the format
Supported fields are:
|
| max | integer Maximum number of bills to return. |
| settlements | boolean Include settlement details for each bill. |
[- {
- "addons": {
- "Delivery Charge": 40,
- "Packing Charge": 20
}, - "against_bill_date": "2026-08-01T11:00:00Z",
- "against_bill_number": "INV-0988",
- "against_bill_total": 800,
- "against_invoice_id": 88,
- "bill_number": "INV-1001",
- "bill_type": "sale",
- "contact": 12,
- "contact_addr_id": 5,
- "created_on": "2026-08-05T09:15:00Z",
- "id": 101,
- "item_savings": {
- "coupons": 15,
- "discount": 25,
- "rewards": 10
}, - "items": [
- {
- "cpn_dis": 15,
- "dis": 5,
- "disp": 475,
- "id": 10,
- "price": 500,
- "qty": 2,
- "rwd_dis": 10,
- "type_id": 2
}
], - "manual_disc": {
- "amount": 150,
- "rate": 10
}, - "settled": 1500,
- "settlements": [
- {
- "amnt": 1000,
- "date": "2026-08-05T09:20:00Z",
- "mode": "Cash"
}
], - "shipping_addr_id": 8,
- "total": 1500
}
]Retrieves the bill total calculation logic configured for one or more bill types.
By default, the endpoint returns the logic configured for the
sale bill type.
When bill_type=* is supplied, the endpoint returns the logic
for all supported bill types.
The returned logic is converted into its human-readable form, where addon references are represented using addon titles instead of internal identifiers.
salesale-returnpurchasepurchase-returnbill_type is omitted, sale is used.bill_type=* to retrieve the logic for all supported
bill types.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/access-bills| bill_type | string Default: "sale" Enum: "sale" "sale-return" "purchase" "purchase-return" "*" Bill type whose calculation logic should be returned. Specify |
[- {
- "bill_total_logic": "sum(price(items()))",
- "bill_type": "sale",
- "updated": "2026-08-06T10:30:15Z"
}, - {
- "bill_total_logic": "sum(price(items()))",
- "bill_type": "purchase",
- "updated": "2026-08-06T10:30:15Z"
}
]Updates the bill total calculation logic for a bill type.
The supplied logic is validated before being saved. If the logic contains syntax errors or references invalid addons, the request is rejected.
If the current logic is already associated with one or more existing bills, a new logic version is created. Otherwise, the existing logic definition is updated in place.
Any addon references used by the logic are automatically tracked.
bill_type is omitted, sale is used.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/manage-addon| bill_total_logic required | string Bill total calculation logic. |
| bill_type | string Default: "sale" Enum: "sale" "sale-return" "purchase" "purchase-return" Bill type whose calculation logic should be updated. |
{- "message": "string"
}Retrieves bill transaction summaries for one or more items.
This endpoint returns every bill in which the specified item appears, together with the quantity sold or purchased, price, discount, discounted price, bill number, and bill date.
Multiple item identifiers can be supplied as a comma-separated list.
id, date, and total.| item_id required | string Item identifier or comma-separated list of item identifiers. |
| contact | integer Filter by contact identifier. |
| bill_type | string Enum: "sale" "sale-return" "purchase" "purchase-return" Bill type to retrieve. |
| settled | boolean Filter by settlement status.
|
| bill_date | string Filter by bill creation date. |
| updated_date | string Filter by last updated timestamp. |
| sort | string Sorting expression in the format
Supported fields are:
|
| max | integer Maximum number of records to return. |
[- {
- "bill_id": 101,
- "bill_number": "INV-1001",
- "date": "2026-08-05T09:15:00Z",
- "discount": 10,
- "discount_price": 450,
- "price": 500,
- "quantity": 2
}, - {
- "bill_id": 108,
- "bill_number": "INV-1012",
- "date": "2026-08-10T11:45:00Z",
- "discount": 0,
- "discount_price": 495,
- "price": 495,
- "quantity": 5
}
]Retrieves the tax provider configurations registered in the billing module.
Each configuration contains the tax provider URL, whether the provider expects tax-inclusive prices, and any additional contact fields required by the provider.
GSTIN contact field when it is not already
configured.Snp/access-bills is needed
[- {
- "addn_contact_details": {
- "GSTIN": "GST Number",
- "PAN": "PAN Number"
}, - "tax_inclusive": true,
}
]Updates the tax configuration for the authenticated internal application.
The configuration is stored for the calling application and is used by the billing module when integrating with external tax providers.
url parameter is mandatory.tax_inclusive parameter defaults to false when omitted.| url required | string URL of the tax provider service. |
| tax_inclusive | boolean Default: false Indicates whether bill prices should be treated as tax-inclusive. |
{- "message": "string"
}Deletes an existing bill addon.
If the addon is not referenced by any bill logic or other addons, it is permanently removed along with all of its logic versions.
If the addon is still referenced, it is not deleted. Instead, the system automatically renames the addon to a unique title so that existing references remain valid while preventing future use of the original title.
Snp/manage-addon is needed
| addon_id required | integer Identifier of the addon to delete. |
{- "message": "string"
}Updates an existing bill addon.
This endpoint allows updating one or both of the following:
When the title is updated, the system verifies that no other addon already uses the same title.
When the logic is updated, the supplied logic is validated, checked for cyclic references, compiled into a new logic version, and stored as the latest version of the addon.
At least one of title or logic_code must be supplied.
Snp/manage-addon is needed
| addon_id required | integer Identifier of the addon to update. |
| title | string New title for the addon. |
| logic_code | string New addon calculation logic. The supplied logic is validated before being stored. A new logic version is created if validation succeeds. |
{- "message": "string"
}Retrieves bill addons and their latest logic definitions.
By default, the endpoint returns all configured addons along with the latest version of their calculation logic.
When the search query parameter is supplied, the endpoint
performs a title-based search and returns only matching addons.
The returned logic is converted into its human-readable form, where addon references are represented using addon titles instead of internal identifiers.
search requires the title_like parameter.Any of the following permissions are needed
Snp/manage-addonSnp/access-billsSnp/create-bill| search | boolean Enables title-based addon search. When specified, the |
| title_like | string Searches for addons whose titles match the supplied value. Required when |
| max | integer Maximum number of search results to return. |
[- {
- "id": 1,
- "logic_code": "subtotal * 0.18",
- "title": "GST"
}, - {
- "id": 2,
- "logic_code": "50",
- "title": "Delivery Charge"
}
]Creates a new bill addon with the specified calculation logic.
The supplied logic is validated before the addon is created. If the logic is valid, an initial logic version is created and associated with the addon.
Snp/manage-addon is needed
| title required | string Name of the addon. |
| logic_code required | string Logic expression used to calculate the addon amount. |
{- "id": 12
}Deletes a payment settlement associated with a bill.
Only users with payment management permission can delete a settlement entry.
If the settlement is linked to a return exchange or wallet payment, related settlement adjustments are handled automatically.
bill_id and settlement_id must be numeric.404 if the settlement does not exist for the given bill.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/manage-payments| bill_id required | integer ID of the bill containing the settlement. |
| settlement_id required | integer ID of the settlement to delete. |
{- "message": "string"
}Updates an existing settlement entry associated with a bill.
The API allows updating payment amount, payment mode, settlement date, instrument details, deposited date, notes, and user information.
bill_id and settlement_id must be numeric.amount, date, or mode requires payment management permission
after the allowed update period.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/manage-payments| bill_id | integer Identifier of the bill. |
| settlement_id | integer Identifier of the settlement entry. |
| amount | number <float> Updated settlement amount. |
| mode | string Updated payment mode. |
| date | string <date-time> Updated settlement date. |
| instr_date | string <date-time> Updated instrument date. |
| instr_num | string Updated instrument number. |
| instr_bank | string Updated instrument bank name. |
| deposited_date | string <date-time> Updated deposited date. |
| notes | string Updated settlement notes. |
| user | string User identifier associated with the update. |
{- "message": "string"
}Deletes all payment settlement entries associated with a bill.
This API is mainly used by the e-commerce application to remove all settlements for a bill at once.
System payment modes are handled separately before removing all settlement records.
bill_id must be numeric.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/manage-payments| bill_id required | integer ID of the bill whose settlements should be deleted. |
{- "message": "string"
}Adds a new payment settlement entry for a bill.
The settlement records the payment amount, payment mode, transaction details, and optional notes. The bill settled amount is updated after successful creation.
amount and mode are mandatory.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/manage-payments| bill_id | integer Identifier of the bill. |
| amount | number <float> Settlement amount. |
| mode | string Payment mode. |
| date | string <date-time> Settlement date. |
| instr_date | string <date-time> Instrument date. |
| instr_num | string Instrument number. |
| instr_bank | string Instrument bank name. |
| deposited_date | string <date-time> Date when payment instrument was deposited. |
| notes | string Additional settlement notes. |
| noconvert | boolean Prevent conversion of proforma bills during settlement. |
{- "id": 501,
- "instr_id": 20
}Deletes an existing custom payment mode.
The payment mode is deleted only if it is not a system-defined payment mode and is not currently being used.
Snp/manage-payments is needed
| mode | string Name of the payment mode to delete. |
{- "message": "string"
}Creates a new payment mode or renames an existing payment mode.
Specify _ as the mode path parameter to create a new payment
mode. Otherwise, the specified payment mode is renamed to the
value supplied in new_val.
new_val parameter is mandatory.mode=_ to create a new payment mode.Snp/manage-payments is needed
| mode | string Payment mode to update. Specify |
| new_val | string Name of the new or updated payment mode. |
{- "message": "string"
}Retrieves all configured user-defined payment modes available for billing and settlement operations.
Only custom payment modes are returned. System-defined payment modes are excluded from the response.
Snp/access-bills is needed
[- "Cash",
- "UPI",
- "Credit Card",
- "Bank Transfer",
- "Cheque"
]Retrieves payment settlement records for bills.
Supports retrieving detailed settlement information, downloading settlement data as CSV, and generating settlement summaries grouped by payment mode and bill type.
summary parameter returns aggregated settlement counts and amounts.download parameter returns settlement data in CSV format.Snp/access-bills is needed
| download | boolean Downloads settlement data in CSV format. |
| summary | boolean Returns settlement summary grouped by payment mode and bill type. |
| bill_type | string Enum: "sale" "sale-return" "purchase" "purchase-return" Filters settlements by bill type. |
| reconciled | boolean Filters settlements based on reconciliation status. |
| max | integer Maximum number of settlement records to return. |
| sort | string Sorting fields for settlement records. Example:
|
| filter | string Settlement filter expression. |
{ }Deletes a document attached to a bill.
The document file is removed from storage and its metadata is removed from the bill document records.
bill_id and doc_name identify the document to delete.Any of the following permissions are needed
Snp/create-billSnp/delete-bill| bill_id required | integer ID of the bill containing the document. |
| doc_name required | string Name of the document to delete. |
{- "message": "string"
}Downloads a document attached to a bill.
The requested document file is returned from bill document storage.
bill_id and doc_name are required to identify the document.Any of the following permissions are needed
Snp/access-billsSnp/create-billSnp/delete-bill| bill_id required | integer ID of the bill containing the document. |
| doc_name required | string Name of the document to download. |
{- "message": "string"
}Uploads and attaches documents to an existing bill.
Documents are uploaded using multipart form data and stored against the specified bill. Existing document metadata is preserved when updating attachments.
multipart/form-data.bill_id must refer to an existing bill.Any of the following permissions are needed
Snp/create-billSnp/delete-bill| bill_id required | integer ID of the bill to attach documents to. |
| property name* additional property | string <binary> |
{- "message": "string"
}Retrieves audit logs of changes made to bills and related operations.
The response includes information about the user or application that performed the action, the changed field, action type, remarks, and previous and updated values.
sort=date.desc to retrieve latest logs first.Snp/access-bills is needed
| bill_id | integer Filter logs by bill ID. |
| app_id | string Filter logs by application ID. |
| user_id | string Filter logs by user ID. |
| action | string Filter logs by action type. |
| key | string Filter logs by changed field key. |
| limit | integer Default: 50 Maximum number of edit logs to return. |
| sort | string Enum: "date.desc" "date.asc" Sort order for logs based on date. |
[- {
- "action": "string",
- "app": "string",
- "date": "2019-08-24T14:15:22Z",
- "key": "string",
- "other_details": "string",
- "post_settled": 0,
- "post_total": 0,
- "pre_settled": 0,
- "pre_total": 0,
- "remarks": "string",
- "user": "string"
}
]Retrieves historical transaction details for specified items.
The response contains item quantities, prices, discounts, and discounted prices from bills before the specified date.
item_ids parameter is mandatory.sale.item_ids returns a bad request error.Snp/access-bills is needed
| item_ids required | Array of integers List of item IDs whose transaction logs should be retrieved. |
| bill_type | string Default: "sale" Enum: "sale" "sale-return" "purchase" "purchase-return" Bill type used to filter item transactions. |
| from | string <date-time> Retrieves transactions before this date. |
| max | integer Default: 10 Maximum number of records returned per item. |
{- "property1": [
- {
- "discount": 0,
- "discount_price": 0,
- "price": 0,
- "quantity": 0
}
], - "property2": [
- {
- "discount": 0,
- "discount_price": 0,
- "price": 0,
- "quantity": 0
}
]
}Retrieves wallet transaction history for a contact.
The API returns the current wallet balance along with wallet transaction details.
The contact_id path parameter can be:
self to retrieve the authenticated customer's wallet logs.self can only be used by authenticated customers.opening_balance.| contact_id required | string Contact identifier. Use |
| opening_balance | string <date-time> Date from which the opening wallet balance should be calculated. |
| max | integer Maximum number of wallet transactions to return. |
| sort | string Sorting order for wallet transactions. |
{- "current_balance": 0,
- "logs": [
- {
- "amount": 0,
- "bill_id": 0,
- "bill_number": "string",
- "bill_type": "string",
- "date": "2019-08-24T14:15:22Z",
- "id": 0,
- "notes": "string"
}
], - "opening_balance": 0
}Retrieves billing statistics and analytical data for the dashboard.
The response contains overview details, item statistics, payment information, charges, salesperson performance, offers, loyalty points, and sales distribution by weekday and hour.
Snp/view-stats is needed
| date_ge | string <date-time> Start date of the statistics range. |
| date_le | string <date-time> End date of the statistics range. |
| customer_nature | string Enum: "new" "return" Filter statistics by customer type.
|
| item_ids | string Comma-separated list of item IDs to filter statistics. |
| item_types | string Comma-separated list of item type IDs. |
| sp_ids | string Comma-separated list of salesperson IDs. |
| offer_ids | string Comma-separated list of offer IDs. |
| stream_ids | string Comma-separated list of loyalty/reward stream IDs. |
| weekday | string Filter by weekdays. Supports weekday names ( |
| hour | string Filter by hour of the day. Valid values are between 0 and 23. |
{- "charges": { },
- "hourly": { },
- "item_types": { },
- "loyalty_pnts": { },
- "offers": { },
- "overview": { },
- "payments": { },
- "sales_person": { },
- "streams": { },
- "weekday": { }
}Retrieves item-level sales statistics including quantity, net sales amount, discounts, purchase amount, and return details.
The API supports filtering statistics by date ranges, bill type, items, and other supported statistics filters.
Multiple date ranges can be requested using range.<index> query
parameters. When multiple ranges are provided, the response contains
results grouped by each range key.
sale.Snp/view-stats is needed
| range.<index> | string Date range filter. Format:
Example:
Multiple ranges can be provided using different indexes. |
| date_ge | string <date-time> Start date filter. |
| date_le | string <date-time> End date filter. |
| bill_type | string Bill type used for statistics. Defaults to |
| item_id | string Comma-separated item IDs to filter. |
| sort | string Enum: "qty" "net_pr" Sort results.
|
| max | integer Maximum number of items to return. |
| download | boolean Download statistics report. |
[- {
- "disc": 0,
- "id": 0,
- "net_pr": 0,
- "pur_amnt": 0,
- "qty": 0,
- "ret_disc": 0,
- "ret_pr": 0,
- "ret_qty": 0
}
]Retrieves the configured invoice headings and subheadings along with their default values.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill{- "headings": {
- "default": "Tax Invoice",
- "values": [
- "Tax Invoice",
- "Retail Invoice",
- "Estimate"
]
}, - "subheadings": {
- "default": "Original Copy",
- "values": [
- "Original Copy",
- "Duplicate Copy"
]
}
}Updates the available invoice headings and subheadings along with their default values.
Headings and subheadings can be added by specifying their names, or
removed by prefixing the value with -.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| default_heading | string Default invoice heading. |
| default_subheading | string Default invoice subheading. |
| headings | string Comma-separated invoice headings. Prefix a heading with |
| subheadings | string Comma-separated invoice subheadings. Prefix a subheading with |
{- "default_heading": "string",
- "default_subheading": "string",
- "headings": "string",
- "subheadings": "string"
}{- "message": "string"
}Retrieves the currently configured bill number prefix used when generating new bill numbers.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill{- "value": "INV"
}Updates the default prefix used when generating new bill numbers.
The updated prefix is stored in the application settings and is applied to newly created bills. Existing bill numbers are not modified.
prefix parameter is mandatory.Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| prefix required | string New bill prefix to use for subsequently generated bill numbers. |
{- "message": "string"
}Enables or disables the one-touch invoicing feature.
When enabled for the first time, a default Walkin Customer contact is automatically created if one does not already exist. The created contact ID is returned in the response.
enable or disable.Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| enable | boolean Enables one-touch invoicing. |
| disable | boolean Disables one-touch invoicing. |
{- "contact_id": 101
}Retrieves the current bill prefix along with the next serial numbers that will be assigned to sale and sale-return bills.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill{- "bill_prefix": "INV",
- "sale": 1025,
- "sale-return": 78
}Updates the next serial numbers used for bill generation.
You can update the next serial number for sale bills, sale-return bills, or both.
The values supplied become the next bill numbers that will be generated by the system.
sale or sale-return must be provided.Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| sale | integer Next serial number for sale bills. |
| sale-return | integer Next serial number for sale-return bills. |
{- "sale": 0,
- "sale-return": 0
}{- "message": "string"
}Retrieves the bill due date configuration along with all configured due date reminders.
The response includes the default due period, notification templates, notification time, and reminder schedules.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill{- "due_days": 30,
- "email": {
- "body": "Your payment is due shortly.",
- "subject": "Payment Due Reminder"
}, - "mobile": "Your payment is due.",
- "reminders": [
- {
- "days": 7,
- "email": {
- "body": "Your payment is due in 7 days.",
- "subject": "Reminder"
}, - "index": 1,
- "mobile": "Payment due in 7 days."
}, - {
- "days": 1,
- "index": 2,
- "mobile": "Payment due tomorrow."
}
], - "time": "10:00"
}Updates bill due date configuration and reminder schedule.
You can update:
Reminder indexes must remain continuous starting from 0.
When reminder days are modified, the corresponding communication events are automatically recreated and the reminder scheduler is refreshed.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| due_days | integer Number of days after which a bill becomes due. |
Array of objects Reminder configuration list. Existing reminders are updated using their index.
New reminders must include both | |
| time | string Daily time at which due-date reminders are processed. Example: |
{- "due_days": 0,
- "reminders": [
- {
- "days": 0,
- "index": 0
}
], - "time": "string"
}{- "message": "string"
}Deletes a bill due date reminder by its index.
After deletion:
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| reminder_index required | integer Index of the reminder to delete. |
[- {
- "days": 0,
- "email": {
- "body": "string",
- "subject": "string"
}, - "index": 0,
- "mobile": "string"
}
]Retrieves the configured invoice roundoff settings.
If no roundoff configuration exists, an empty object is returned.
Any of the following permissions are needed
Snp/modify-billSnp/delete-bill{- "cutoffs": [
- {
- "cutoff": 0,
- "roundoff": 0
}
], - "scale": 0
}Updates invoice roundoff configuration.
A roundoff scale must always be provided. Optionally, one or more cutoff values can be configured for the selected scale.
Supported scale values are:
0.1110100100010000Any of the following permissions are needed
Snp/modify-billSnp/delete-bill| scale required | number Enum: 0.1 1 10 100 1000 10000 Roundoff scale. |
| property name* additional property | number Optional cutoff mapping. Property names must follow the format:
Example:
Each property's value specifies the rounded value to apply. |
{- "message": "string"
}Deletes an existing coupon identified by its coupon code.
The coupon cannot be deleted if it is already in use.
code path parameter.Coupons/manage is needed
| code required | string Coupon code to delete. |
{- "message": "string"
}Retrieves the details of a coupon using its coupon code.
The response includes the coupon validity period, exclusivity, applicable users, discount configuration, usage limit, price restrictions, applicable items or item types, and optional discount ranges.
Coupons/manage is needed
| code required | string Coupon code. |
{- "description": "string",
- "is_exclusive": true,
- "item_types": [
- 0
], - "items": [
- 0
], - "max_sprice": 0,
- "min_sprice": 0,
- "price": 0,
- "ranges": [
- {
- "max": 0,
- "min": 0,
- "value": 0
}
], - "rate": 0,
- "rate_ceiling": 0,
- "rule": 0,
- "usage_limit": 0,
- "users": [
- 0
], - "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z"
}Updates an existing coupon.
The API supports two operations:
check and contact parameters.When updating users or items, positive IDs are added and negative IDs
are removed.
When check is provided, no coupon update is performed. The API checks
whether the coupon can be applied to the specified contact.
code path parameter.rule=1 requires rate.rule=2 requires price.Coupons/manage is needed
| code required | string Coupon code to update or validate. |
| check | boolean Checks whether the coupon is valid for a contact instead of updating the coupon. When supplied, |
| contact | integer Contact ID used when checking coupon validity. Required when |
| users | string Comma-separated contact IDs. Positive IDs are added to the coupon. Negative IDs are removed from the coupon. Example:
|
| items | string Comma-separated item IDs. Positive IDs are added to the coupon. Negative IDs are removed. Example:
|
| item_types | string Comma-separated item type IDs. Positive IDs are added to the coupon. Negative IDs are removed. |
| valid_from | string <date-time> Date and time from which the coupon becomes valid. |
| valid_to | string or null <date-time> Date and time until which the coupon remains valid. Set to an empty value to remove the expiry date. |
| is_exclusive | boolean Whether the coupon is exclusive. |
| rule | integer Enum: 1 2 Coupon discount rule.
The rule cannot be changed if the coupon has already been used. |
| rate | number Discount rate. Required when |
| price | number Fixed discount price. Required when |
| min_sprice | number Minimum sale price required for the coupon. |
| max_sprice | number Maximum sale price to which the coupon applies. |
| rate_ceiling | number Maximum discount rate/amount allowed. |
| ranges | string Coupon discount ranges. The value uses the coupon range representation expected by the API. |
| description | string Description of the coupon. |
| usage_limit | integer Maximum number of times the coupon can be used. |
nullRetrieves statistics for the specified coupon for a given date range.
By default, statistics are returned grouped by date. When the date
parameter is provided, statistics are returned bill-wise for that date.
Requires Coupons/manage permission.
Either from or date must be provided.
When date is provided, the response is returned bill-wise.
When date is not provided, the response is returned date-wise.
The to parameter can be used together with from to specify
an end date.
If to is not provided, the from date is used as the end date.
Only positive coupon savings are included in the statistics.
Tagged under Coupons.
Coupons/manage is needed
| code required | string Coupon code for which statistics are requested. Example:
|
| from | string <date> Start date of the statistics period. Either Example:
|
| to | string <date> End date of the statistics period. Used together with If omitted, the Example:
|
| date | string <date> Specific date for which bill-wise coupon statistics are requested. When this parameter is provided, the response contains one entry per bill instead of being grouped by date. Example:
|
[- {
- "bill_id": 123,
- "bill_number": "INV-00123",
- "sales": 1250.5,
- "savings": 100,
- "total": 1150.5
}
]Retrieves a list of coupons.
Authorized users with Coupons/manage permission can search all coupons. Authenticated customers can search coupons associated with themselves.
Coupons can be filtered by ID, code, user, exclusivity, validity dates, and other supported filter expressions.
Results can also be sorted and limited.
id, code, and valid_from.| id | integer Filter by coupon ID. |
| code | string Filter by coupon code. |
| user | string Filter by customer/contact ID. Multiple IDs can be supplied as a comma-separated value. |
| is_exclusive | boolean Filter coupons by whether they are exclusive. |
| valid_from | string <date-time> Return coupons whose validity starts on or after this date. |
| valid_to | string <date-time> Return coupons that are valid until this date or have no expiry date. |
| sort | string Sort results using comma-separated fields. Supported fields are Each field must use Example:
|
| limit | integer Maximum number of coupons to return. |
| max | integer Alternative parameter for limiting the maximum number of results.
Used when |
[- {
- "code": "string",
- "id": 0,
- "is_exclusive": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_to": "2019-08-24T14:15:22Z"
}
]Creates a new coupon with the specified discount rule and optional validity, usage, user, item, and price restrictions.
The code and rule fields are mandatory.
Rule 1 requires a rate, while rule 2 requires a price.
The coupon code may contain only letters, numbers, underscores, and hyphens, and cannot start with a hyphen.
Coupons/manage is needed
| code required | string Unique coupon code. |
| description | string Description of the coupon. |
| is_exclusive | boolean Whether the coupon is exclusive. |
| item_types | string Comma-separated item type IDs to which the coupon applies. |
| items | string Comma-separated item IDs to which the coupon applies. |
| max_sprice | number Maximum sale price allowed for the coupon. |
| min_sprice | number Minimum sale price required to use the coupon. |
| price | number Fixed discount price. Required when |
Array of objects Optional range-based coupon configuration. | |
| rate | number Discount rate. Required when |
| rate_ceiling | number Maximum discount rate allowed. |
| rule required | integer Coupon discount rule.
Rule |
| usage_limit | integer Maximum number of times the coupon can be used. |
| users | string Comma-separated user IDs allowed to use the coupon. |
| valid_from | string <date-time> Coupon validity start date and time. |
| valid_to | string <date-time> Coupon validity end date and time. |
{- "id": 0
}Generates a PDF invoice for the specified bill.
The bill can optionally be generated with a custom heading and subheading. If no heading or subheading is provided, the configured default invoice heading and subheading are used.
The generated PDF includes the bill details, items, item properties, customer information, settlements, discounts, coupons, loyalty details, and other invoice information.
Query Parameters:
bill_id is mandatory.heading is optional.subheading is optional.The endpoint may use a configured external PDF generator when one is configured. Otherwise, the PDF is generated internally.
Any of the following permissions are needed
Snp/access-billsSnp/create-bill| bill_id required | integer ID of the bill for which the PDF should be generated. Example:
|
| heading | string Custom invoice heading. If omitted, the configured default bill heading is used. |
| subheading | string Custom invoice subheading. If omitted, the configured default bill subheading is used. |
{- "message": "string"
}Generates a PDF invoice for use by authorized communication services.
The request is allowed only for authenticated internal applications that are authorized to access the PDF generation service.
The generated response is a PDF file that can be downloaded and opened using a PDF viewer.
404 Not Found.| bill_id required | integer ID of the bill for which the PDF should be generated. Example:
|
| heading | string Custom invoice heading. If omitted, the configured default bill heading is used. |
| subheading | string Custom invoice subheading. If omitted, the configured default bill subheading is used. |
{- "message": "string"
}Retrieves the logo configured for PDF invoices.
If a PDF invoice logo is configured, the response returns the logo image file.
If no logo is configured, the response indicates that the logo should be redirected to the default application logo.
{- "message": "string"
}Retrieves PDF invoice resources and settings.
When resource is *, the response returns all configured PDF
invoice resources, including the default print format, default PDF
format, signature name, invoice terms, bank details, and URLs for
the configured logo and signature.
When resource is logo or signature, the corresponding image
file is returned.
* to retrieve all PDF invoice settings.logo to retrieve the invoice logo image.signature to retrieve the invoice signature image.Snp/access-bills is needed
| resource required | string Enum: "*" "logo" "signature" PDF resource to retrieve.
|
{- "bank_details": {
- "property1": "string",
- "property2": "string"
}, - "default_pdf_format": {
- "property1": "string",
- "property2": "string"
}, - "default_print_format": {
- "property1": "string",
- "property2": "string"
}, - "logo": "string",
- "signature": "string",
- "signature_name": "string",
- "terms": "string"
}Updates the PDF invoice settings, including the invoice logo, signature, signature name, PDF format, print format, terms, and bank details.
The request must use multipart/form-data.
Snp/create-bill is needed
| bank_details | string Bank details for the invoice. Must contain a valid JSON object. |
| default_pdf_format | string Default PDF invoice format. |
| default_print_format | string Default print format for invoices. |
| logo | string <binary> Invoice logo image. |
| signature | string <binary> Invoice signature image. |
| signature_name | string Name displayed with the invoice signature. |
| terms | string Terms and conditions displayed on the invoice. |
{- "message": "string"
}Assigns or removes a salesperson from specific items of a bill.
The row_ids parameter determines which bill items are affected.
Positive row IDs assign the specified salesperson to the corresponding bill items. Negative row IDs remove the salesperson assignment from those bill items.
Multiple row IDs can be provided as a comma-separated list.
row_ids parameter is mandatory.Snp/modify-bill permission cannot modify an invoice
item that already has a salesperson assigned.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| bill_id required | integer Example: 123 ID of the bill whose items will be updated. |
| sid required | integer Example: 15 ID of the salesperson to assign to the bill items. |
| row_ids required | string Comma-separated bill item row IDs. Positive IDs assign the salesperson. Negative IDs remove the salesperson assignment. Example:
In this example, salesperson |
{- "message": "string"
}Deletes an existing salesperson.
If the salesperson has not been associated with any bill items, the salesperson is permanently deleted.
If the salesperson is already associated with bill items, the salesperson is not permanently deleted. Instead, the salesperson is marked as deleted so that existing bill records remain intact.
Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| sid required | integer Example: 15 ID of the salesperson to delete. |
{- "message": "string"
}Updates the name of an existing salesperson.
name parameter is mandatory.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| sid required | integer Example: 15 ID of the salesperson to update. |
| name required | string <= 32 characters New name for the salesperson. |
{- "message": "string"
}Retrieves a list of all active salespersons.
Salespersons that have been marked as deleted are excluded from the response.
[- {
- "id": 1,
- "name": "John Doe"
}
]Creates a new salesperson with the specified name.
name field is mandatory.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| name required | string <= 32 characters Name of the salesperson to create. |
{- "id": 15
}Updates Tally ledger names for sales or purchase transactions.
Ledger names can be updated for item types, items, addons, and payment modes.
The txn parameter determines whether the ledger names are updated
for sale or purchase transactions.
The subclass parameter determines whether the intra-state or
inter-state ledger name is updated. It defaults to intra.
Ledger names are specified using parameter names with the following formats:
type.<type_id> for item types.item.<item_id> for items.addon.<addon_id> for addons.paymode.<paymode_id> for payment modes.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| txn required | string Enum: "sale" "purchase" Transaction type.
|
| subclass | string Default: "intra" Enum: "intra" "inter" Ledger name subclass to update.
Defaults to |
| type.<type_id> | string Ledger name for an item type. Replace Example:
|
| item.<item_id> | string Ledger name for an item. Replace Example:
|
| addon.<addon_id> | string Ledger name for an addon. Replace Example:
|
| paymode.<paymode_id> | string Ledger name for a payment mode. Replace Example:
|
{- "message": "string"
}Retrieves ledger names configured for item types, items, addons, and payment modes.
The ledger names are returned based on the transaction type
(sale or purchase) and the IDs provided in the request.
At least one of the following parameters is required:
type_ids, item_ids, addons, or paymodes.
The txn parameter is mandatory and must be either sale
or purchase.
CASH is used as the default ledger name
for the cash payment mode; other payment modes default to
BANK.Any of the following permissions are needed
Snp/create-billSnp/modify-billSnp/delete-bill| txn required | string Enum: "sale" "purchase" Transaction type used to determine the ledger configuration. Allowed values:
|
| type_ids | string Comma-separated item type IDs for which ledger names should be retrieved. Example:
|
| item_ids | string Comma-separated item IDs for which ledger names should be retrieved. Example:
|
| addons | string Comma-separated addon IDs for which ledger names should be retrieved. Example:
|
| paymodes | string Comma-separated payment mode identifiers for which ledger names should be retrieved. Example:
|
{- "addons": {
- "1": "Shipping Charges",
- "2": "Installation Charges"
}
}Performs a dry run of loyalty point and reward calculations for an existing bill without applying the calculated results to the bill.
The request must provide at least one of point or reward.
The supplied loyalty calculation logic is validated and then applied
to the specified bill for simulation.
The response contains the calculated loyalty point results under
point and reward results under reward.
The stream_id identifies the loyalty stream to use for the dry run.
If stream_id is omitted, the default value is 0.
Loyalty/manage is needed
| bill_id required | integer Example: 1250 ID of the bill for which the loyalty calculation is simulated. |
| stream_id | integer Default: 0 Example: stream_id=25 ID of the loyalty stream used for the dry run. |
| point | string Example: point=... Loyalty point calculation logic to be tested. At least one of |
| reward | string Example: reward=... Loyalty reward calculation logic to be tested. At least one of |
{- "point": [
- {
- "points": 150,
- "stream_id": 25
}
], - "reward": [
- {
- "reward": 100,
- "stream_id": 25
}
]
}Returns the loyalty ledger entries for a customer.
The ledger can contain:
reward entries for loyalty points earned.redeem entries for loyalty points redeemed.discount entries for loyalty discounts applied to bills.By default, up to 30 ledger entries are returned.
The endpoint supports filtering, sorting, and pagination using query parameters.
If the request is made by an authenticated customer, the ledger is automatically retrieved for that customer.
For non-customer authenticated users, contact_id can be supplied
to retrieve the ledger for a specific customer.
| contact_id | integer Example: contact_id=125 Customer/contact ID whose loyalty ledger should be retrieved. This parameter is used when the authenticated user is not a customer. For an authenticated customer, the endpoint automatically uses the authenticated customer's ID. |
| type | string Enum: "reward" "redeem" "discount" "reward,redeem" "reward,discount" "redeem,discount" "reward,redeem,discount" Example: type=reward,redeem Filters the ledger by transaction type. Supported values:
Multiple types can be supplied as a comma-separated list. If omitted, all supported transaction types are returned. |
| max | integer Default: 30 Example: max=30 Maximum number of ledger entries to return. |
| sort | string Default: "date.asc" Enum: "date.asc" "date.desc" Example: sort=date.desc Sorts the ledger entries by date.
|
| id | integer Example: id=1250 Filters the ledger by ledger entry ID. |
| date | string Example: date=2026-08-09 Filters the ledger by ledger entry date. |
| ldgr_id | integer Example: ldgr_id=1250 Filters by loyalty ledger entry ID. |
| ldgr_date | string Example: ldgr_date=2026-08-09 Filters by loyalty ledger entry date. |
| bill_id | integer Example: bill_id=5001 Filters ledger entries by bill ID. Use |
| bill_date | string Example: bill_date=2026-08-09 Filters entries by bill creation date. |
| bill_xid | integer Example: bill_xid=5001002 Filters entries using the combined bill/stream identifier. |
| bill_num | string Example: bill_num=INV-10025 Filters by bill number. |
| stream_id | integer Example: stream_id=25 Filters entries by loyalty stream ID. |
{- "data": [
- {
- "bill_id": 5001,
- "bill_num": "INV-10025",
- "bill_type": "sale",
- "code": "LOYALTY15",
- "cont_id": 125,
- "date": "2026-08-09T10:30:00Z",
- "id": 1250,
- "name": "John Doe",
- "notes": "Loyalty points awarded",
- "rfrl_id": 80,
- "smnt_id": 0,
- "stream_id": 25,
- "type": "reward",
- "value": "100/20"
}, - {
- "bill_id": 5002,
- "bill_num": "INV-10026",
- "bill_type": "sale",
- "code": "LOYALTY15",
- "cont_id": 125,
- "date": "2026-08-09T11:15:00Z",
- "id": 50010025,
- "name": "John Doe",
- "notes": "",
- "rfrl_id": 80,
- "smnt_id": 0,
- "stream_id": 25,
- "type": "discount",
- "value": 150
}
], - "next_page": null
}Adds a loyalty points entry to the ledger for a customer.
The customer is identified using contact_id and the loyalty stream
is identified using stream_id.
The points value represents the number of loyalty points to add.
The ledger entry defaults to the reward direction if direction
is not provided.
The rfrl_points and notes fields are optional.
If date is not provided, the current date and time are used.
The request requires the following fields:
contact_idstream_idpointsThe implementation converts contact_id, stream_id, and points
to floating-point values before creating the ledger entry.
Customers/manage is needed
| contact_id required | number <float> Example: contact_id=125 ID of the customer/contact for whom the loyalty points should be added. |
| stream_id required | number <float> Example: stream_id=25 ID of the loyalty stream to which the points should be added. |
| points required | number <float> Example: points=100 Number of loyalty points to add to the customer's ledger. |
| rfrl_points | number <float> Example: rfrl_points=10 Optional referral points associated with the ledger entry. |
| notes | string Example: notes=Manual loyalty points adjustment Optional notes to be stored with the ledger entry. |
| direction | string Enum: "reward" "redeem" Example: direction=reward Direction of the loyalty ledger entry. If omitted, the value defaults to |
| date | string Example: date=2026-08-09 18:30:00 Date and time of the ledger entry. The value is interpreted using the user's configured timezone. If omitted, the current date and time are used. |
{- "id": 456
}Deletes a loyalty points ledger entry identified by ledger_id.
A ledger entry can only be deleted if it has not been associated with a bill or settlement.
If the ledger entry is associated with a bill or settlement, the operation is rejected because generated ledger points cannot be modified.
Customers/manage is needed
| ledger_id required | integer Example: 456 ID of the loyalty ledger entry to delete. |
{- "message": "string"
}Returns the loyalty status of a customer, including loyalty points earned and redeemed for each loyalty stream.
The response contains a points_map with the customer's loyalty
point balances and a streams list containing the loyalty stream
details.
For streams where the customer has received rewards in the past,
the response also includes the corresponding past_rewards.
| contact_id required | integer Example: 125 ID of the customer contact. |
{- "points_map": {
- "25": {
- "redeem_points": 500,
- "redeem_rfrl_points": 50,
- "reward_points": 1500,
- "reward_rfrl_points": 200
}
}, - "streams": [
- {
- "code": "WELCOME",
- "description": "Welcome customer rewards",
- "past_rewards": {
- "reward": 100
}, - "stream_id": 25
}
]
}Deletes an existing loyalty stream using its stream ID.
If the loyalty stream has not been used and contains only a recent version, the stream and its associated version data are permanently removed.
If the loyalty stream has already been used in reward points or bills,
or has multiple versions, the stream is not physically removed.
Instead, it is marked as deleted by setting its valid_to timestamp.
The loyalty stream must exist before it can be deleted.
Loyalty/manage is needed
| stream_id required | integer Example: 25 ID of the loyalty stream to delete. |
{ }Retrieves the complete details of a loyalty stream using its stream ID.
The response includes the loyalty stream configuration and metadata, including its point and reward logic, code, description, creation date, last updated date, pause date, and deletion date when applicable.
The stream must exist and must be a loyalty stream.
Loyalty/manage is needed
| stream_id required | integer Example: 25 ID of the loyalty stream. |
{- "code": "LOYALTY10",
- "created_on": "2026-08-09T10:30:00Z",
- "deleted_on": null,
- "description": "Standard customer loyalty program",
- "id": 25,
- "last_updated_on": "2026-08-09T12:15:30Z",
- "paused_on": null,
- "point": {
- "item_stage": { },
- "settlement_stage": { }
}, - "reward": { }
}Updates an existing loyalty stream.
The endpoint can be used to update the loyalty stream code, description, point calculation logic, reward calculation logic, or to pause/resume the loyalty stream.
Only the fields provided in the request are updated. When point or reward logic is updated, the new logic is validated before a new loyalty stream version is created.
The pause parameter pauses the loyalty stream, while the resume
parameter resumes a previously paused stream.
If only code or description is updated, the endpoint does not
return a response body.
Loyalty/manage is needed
| stream_id required | integer Example: 25 ID of the loyalty stream to update. |
| code | string New code for the loyalty stream. The code must be unique. |
| description | string New description for the loyalty stream. |
| pause | boolean Pauses the loyalty stream. When provided, the current reward logic is disabled while preserving the previous reward configuration. |
| point | string New point calculation logic for the loyalty stream. The supplied logic is validated before the update is applied. |
| resume | boolean Resumes a previously paused loyalty stream. |
| reward | string New reward calculation logic for the loyalty stream. The supplied logic is validated before the update is applied. |
pause=true
{ }Returns statistics for a loyalty stream for the requested date range.
The fields parameter controls which type of statistics is returned.
Supported values:
sale - Returns sales and loyalty savings statistics.points - Returns loyalty points statistics.The default value of fields is sale,points.
Note: Based on the current implementation, when fields contains
sale, the sale statistics are returned and the points statistics
are not processed because the implementation uses elif for points.
The loyalty stream is identified using stream_id.
Loyalty/manage is needed
| stream_id required | integer Example: 25 ID of the loyalty stream. |
| from required | string Example: from=2026-08-01 Start date of the statistics period. The date is interpreted using the user's configured timezone. |
| to | string Example: to=2026-08-09 End date of the statistics period. If omitted, the current date is used. |
| fields | string Enum: "sale" "points" "sale,points" Example: fields=sale Specifies which statistics should be returned.
The default value is With the current implementation, if |
{- "points": [
- {
- "date": "2026-08-08",
- "points": 1250
}, - {
- "date": "2026-08-09",
- "points": 900
}
]
}Retrieves loyalty streams based on the specified filters.
The endpoint returns loyalty stream details including the stream ID, code, description, validity period, exclusive status, and paused date.
Loyalty streams can be filtered by status, validity date, deletion status, and other supported filter fields.
Supported status values:
active: Returns streams that are not paused and have not expired.paused: Returns streams that are currently paused.expired: Returns streams whose validity period has ended.Results can be sorted by valid_from, code, or id in ascending
or descending order.
Loyalty/manage is needed
| status | string Enum: "active" "paused" "expired" Filters loyalty streams by their current status. |
| valid_from | string Returns loyalty streams whose |
| deleted | boolean When provided, filters loyalty streams that have a |
| sort | string Sorts the results using one or more fields. Supported fields:
Each field must be followed by Multiple sort fields can be separated by commas. Example:
|
| max | integer Maximum number of loyalty streams to return. |
| id | string Filters loyalty streams by their ID. |
| code | string Filters loyalty streams by their code. |
| is_exclusive | boolean Filters loyalty streams based on whether they are exclusive. |
[- {
- "code": "LOYALTY10",
- "description": "Customer loyalty reward",
- "id": 10,
- "is_exclusive": false,
- "paused_on": null,
- "valid_from": "2026-08-01T00:00:00",
- "valid_to": "2026-12-31T23:59:59"
}, - {
- "code": "LOYALTY20",
- "description": "Premium customer reward",
- "id": 11,
- "is_exclusive": true,
- "paused_on": null,
- "valid_from": "2026-08-05T00:00:00",
- "valid_to": null
}
]Creates a new loyalty stream with the specified code and loyalty calculation logic.
The code parameter is mandatory and must contain only letters,
numbers, underscores, and hyphens. The code cannot start with a
hyphen.
At least one of point or reward must be provided.
The point and reward logic are validated before the loyalty stream is created. A unique loyalty stream code is also required.
If the loyalty stream is created successfully, the endpoint returns the ID of the newly created loyalty stream.
Loyalty/manage is needed
| code required | string Unique code for the loyalty stream. Allowed characters are letters, numbers, underscores, and hyphens. The code cannot start with a hyphen. |
| description | string Description of the loyalty stream. |
| is_exclusive | boolean Indicates whether the loyalty stream is exclusive. |
| point | string Point calculation logic used to calculate loyalty points. The value is validated by the loyalty logic processor. |
| reward | string Reward calculation logic used to determine the reward. The value is validated by the loyalty reward logic processor. |
{- "id": 25
}Returns the details of a customer contact, including the customer's name, tags, wallet balance, referral information, default billing and shipping addresses, and loyalty points.
The contact_id path parameter supports three modes:
self - Returns details for the currently authenticated customer.
When using self, only public customer tags are returned.* - Returns a list of customers. This mode requires administrative
access or Customers/manage permission.When * is used, the optional download parameter can be supplied to
request the customer data as a downloadable result.
required | integer or string Example: 125 Customer identifier. Use a numeric ID to retrieve a specific customer, |
| download | string Example: download=true When Other query parameters can be supplied along with |
{- "contact_addr_id": 102,
- "loyalty": [
- {
- "code": "GOLD",
- "description": "Gold customer rewards",
- "id": 25,
- "redeem_points": 500,
- "redeem_rfrl_points": 50,
- "reward_points": 1500,
- "reward_rfrl_points": 200
}
], - "name": "John Doe",
- "referrals": [ ],
- "referred_by": {
- "id": 450,
- "name": "Jane Smith"
}, - "shipping_addr_id": 103,
- "tags": [
- "VIP",
- "WHOLESALE"
], - "wallet_balance": 2500
}Updates one customer contact setting using the specified parameter.
The endpoint supports the following operations:
tags - Adds, removes, or changes the visibility of customer tags.rfrd_by - Sets the customer who referred this customer.contact_addr_id - Sets the default billing address for the customer.shipping_addr_id - Sets the default shipping address for the customer.wallet_topup - Adds money to the customer's wallet or updates an
existing wallet transaction.Only one supported operation is processed per request. If multiple supported parameters are supplied, the first matching operation in the implementation is processed.
For tags:
+ is added as a private tag.@ is added as a public tag.- is removed.For wallet_topup, notes is mandatory when creating a new wallet
top-up. If both wallet_bill_id and wallet_settlement_id are
supplied, the existing wallet transaction is updated instead.
Customers/manage is needed
| contact_id required | integer Example: 125 ID of the customer contact to update. |
| tags | string Example: tags=VIP,@WHOLESALE,-OLD_CUSTOMER Comma-separated list of tags to add, make public, or remove. Tag prefixes:
This parameter cannot be empty. |
| rfrd_by | integer Example: rfrd_by=450 Customer contact ID of the customer who referred this customer. |
| contact_addr_id | integer Example: contact_addr_id=102 ID of the address to use as the customer's default billing address. |
| shipping_addr_id | integer Example: shipping_addr_id=103 ID of the address to use as the customer's default shipping address. |
| wallet_topup | number <float> Example: wallet_topup=1000 Amount to add to the customer's wallet. If |
| wallet_bill_id | integer Example: wallet_bill_id=2500 Existing bill ID associated with the wallet transaction. Used together with |
| wallet_settlement_id | integer Example: wallet_settlement_id=750 Existing settlement ID associated with the wallet transaction. Used together with |
| notes | string Example: notes=Wallet top-up received from customer Notes for the wallet top-up. This parameter is mandatory when creating a new wallet top-up
without |
{- "bill_id": 2500,
- "settled": 1000,
- "total": 1000
}Renames an existing customer tag.
Both the existing tag name and the new tag name are converted to uppercase before the update is performed.
The rename parameter is mandatory. The update changes all customer
tag records matching the specified tag_name.
Customers/manage is needed
| tag_name required | string Example: VIP Name of the customer tag to rename. The tag name is converted to uppercase before the update. |
| rename required | string Example: rename=PREMIUM New name for the customer tag. The new tag name is converted to uppercase before the update. |
{ }