Aalam Goods Delivery

Goods Delivery (0.8.0)

Download OpenAPI specification:

Authentication

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.

Trips

API related to the trips

Combine Trips

Combines multiple trips into a single trip.

The trip IDs to be combined are provided as comma-separated values in the trip_ids path parameter. A delivery person must be assigned to create the combined trip.

Features

  • Combine multiple trips into a single trip.
  • Assign a delivery person to the combined trip.
  • Return the ID of the newly created combined trip.

Notes

  • At least two trips must be provided for a merge.
  • All specified trip IDs must be valid.
  • All specified trips must not have already ended.
  • A trip that has already been merged cannot be merged again.
  • A delivery person is required to create the combined trip.
  • trip_ids contains comma-separated IDs of the trips to be combined.
  • delivery_by specifies the delivery person to be assigned to the combined trip.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/delivery
  • Trip/update-details
path Parameters
trip_ids
required
string

Comma-separated IDs of the trips to be combined. At least two trip IDs must be provided.

query Parameters
delivery_by
required
string

Delivery person to be assigned to the combined trip.

Responses

Response samples

Content type
application/json
{
  • "id": "_t:9395-1786953693"
}

Delete a trip

This endpoint removes a trip

Features

  • Delete an entire trip on a specific date.

Permissions

Any of the following permissions are needed

  • Trip/delete
  • Trip/manage
  • Trip/update-details
query Parameters
trip_id
required
integer

Identifier of the trip.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Trip Details

Retrieves the complete details of an existing trip.

The response contains trip dates, team members, inventory, delivery logs, route information, delivery order, tracking information, mileage, and item details.

Features

  • Retrieve trip start and end dates.
  • Retrieve delivery and order-taking team members.
  • Retrieve beginning and ending inventory.
  • Retrieve delivery logs for customers.
  • Retrieve payments collected during the trip.
  • Retrieve route and delivery order information.
  • Retrieve trip tracking information.
  • Retrieve item details for products used in the trip.
  • Retrieve sales customer statistics.
  • Retrieve trip mileage information.

Notes

  • trip_id identifies the trip to retrieve.
  • begin_inventory contains the inventory available at the beginning of the trip.
  • end_inventory contains the inventory recorded at the end of the trip.
  • delivery_logs contains customer-wise delivery information.
  • item_id_map contains details of items used in the trip.
  • delivery_order maps delivery log IDs to their delivery order.
  • route_id and route_name identify the route associated with the trip.
  • track contains the delivery and sales tracking order.
  • track_ended indicates whether sales and delivery tracking has ended.

Permissions

Any of the following permissions are needed

  • Trip/access
  • Trip/delivery
  • Trip/manage
  • Trip/sales
path Parameters
trip_id
required
integer

ID of the trip to retrieve.

Responses

Response samples

Content type
application/json
{
  • "begin_inventory": [
    ],
  • "close_mileage_del": 0,
  • "close_mileage_sales": 0,
  • "delivered_by": {
    },
  • "delivery_logs": [
    ],
  • "delivery_order": {
    },
  • "end_date": "string",
  • "end_inventory": [
    ],
  • "item_id_map": {
    },
  • "open_mileage_del": 0,
  • "open_mileage_sales": 0,
  • "order_taken_by": {
    },
  • "props": { },
  • "route_id": 0,
  • "route_name": "string",
  • "sales_acusts": 0,
  • "sales_end_date": "string",
  • "sales_ncusts": 0,
  • "start_date": "string",
  • "tokens": [
    ],
  • "track": {
    },
  • "track_ended": {
    }
}

Update trip

Updates one or more properties of an existing trip.

This endpoint supports modifying trip information such as the start date, end date, delivery person, order taken by open mileage sales, open mileage delivery, close mileage sales, close mileage delivery.

Features

  • Update one or more trip details.
  • Update the trip creation date.
  • Update trip start date.
  • Update mileage details.

Notes

  • Modifying details additionally require return authorization.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/sales
  • Trip/update-details
query Parameters
open_mileage_del
number

Update starting mileage of delivery.

open_mileage_sales
number

Update starting mileage of sales.

close_mileage_del
number

Update closing mileage of delivery.

close_mileage_sales
number

Update closing mileage of sales.

start_date
string <date-time>

Update trip started date.

end_date
string <date-time>

Update trip ended date.

delivered_by
integer

Update assigned delivery person for a trip.

order_taken_by
integer

Update assigned sales person for a trip.

Responses

Response samples

Content type
{
  • "message": "string"
}

Conclude Trip

Completely concludes a trip.

This endpoint marks the entire trip as completed and records the remaining inventory items at the end of the trip.

Features

  • Completely conclude a trip.
  • Record leftover inventory at the end of the trip.
  • Record the remaining quantity for each leftover item.

Notes

  • trip_id identifies the trip to be completely concluded.
  • leftovers contains the items remaining when the trip is concluded.
  • Each leftover item contains its item ID and remaining quantity.
  • This endpoint completely ends the trip. Sales orders should be concluded separately using the conclude_orders endpoint.

Permissions

Any of the following permissions are needed

  • Trip/delivery
  • Trip/manage
  • Trip/update-details
path Parameters
trip_id
required
integer

ID of the trip to completely conclude.

Request Body schema: application/json
required
Array of objects

Items remaining when the trip is concluded.

Responses

Request samples

Content type
application/json
{
  • "leftovers": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Conclude Sales Orders

Concludes the sales orders for a trip and marks the sales process as completed.

The sales closing mileage and delivery person are recorded when concluding the trip orders.

Features

  • Mark sales orders as concluded for a trip.
  • Record the delivery person associated with the trip.
  • Record the closing mileage for sales.

Notes

  • trip_id identifies the trip for which sales orders are concluded.
  • delivery_by identifies the delivery person associated with the trip.
  • close_mileage_sales specifies the closing mileage recorded when concluding the sales orders.

Permissions

Any of the following permissions are needed

  • Trip/sales
  • Trip/manage
  • Trip/update-details
path Parameters
trip_id
required
integer

ID of the trip for which sales orders are concluded.

query Parameters
delivery_by
required
integer

ID of the delivery person associated with the trip.

close_mileage_sales
required
number

Closing mileage recorded for sales.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Delivery Details

Updates delivery details for customers in a trip.

Delivery details can be updated with delivered items, payments, delivery time, and inventory calculation information.

The same endpoint can be used to update item delivery details, record customer payments, or update the delivery time.

When applicable, invoice details and newly created payment details are returned in the response.

Features

  • Update delivery details for a customer.
  • Add delivered items to a delivery.
  • Update item price, discount, and quantity.
  • Record customer payments against invoices.
  • Update delivery time.
  • Calculate inventory based on the delivery details.
  • Generate invoice information when applicable.
  • Return newly created payment information when applicable.

Notes

  • trip_id identifies the trip for which delivery details are updated.
  • deliveries contains the delivery details to be updated.
  • id identifies the customer associated with the delivery.
  • payment can be used to record payments against invoices.
  • items can be used to record items delivered to the customer.
  • delivery_time specifies the date and time of the delivery.
  • Set calc_inventory to true to calculate inventory based on the updated delivery details.
  • A response may contain new_payments when a new payment is created.
  • Invoice details are returned when the delivery update results in invoice generation or modification.

Permissions

Any of the following permissions are needed

  • Trip/delivery
  • Trip/manage
  • Trip/sales
path Parameters
trip_id
required
integer

ID of the trip for which delivery details are updated.

Request Body schema: application/json
required
calc_inventory
boolean

Calculate inventory based on the updated delivery details.

Array of objects

List of delivery details to update.

Responses

Request samples

Content type
application/json
{
  • "calc_inventory": true,
  • "deliveries": [
    ]
}

Response samples

Content type
application/json
{
  • "cnote_addons": null,
  • "creditnote_id": null,
  • "inv_addons": {
    },
  • "invoice_id": 2409,
  • "new_payments": [
    ]
}

Download Trip Details

Downloads trip details as an Excel file.

The downloaded file contains the details of the requested trip. Item summary can optionally be included using the items_summary query parameter.

Features

  • Download trip details as an Excel file.
  • Optionally include item summary information.
  • Generate the trip details file for download.

Notes

  • The response is an Excel (.xls) file.
  • items_summary is optional.
  • Set items_summary to 1 to include item summary information in the downloaded file.

Permissions

Any of the following permissions are needed

  • Trip/access
  • Trip/delivery
  • Trip/manage
  • Trip/sales
query Parameters
items_summary
boolean

Include item summary information in the downloaded file.

Responses

Response samples

Content type
{
  • "message": "string"
}

Download Trip Invoices

Downloads the invoices generated for customers in a specific trip.

Only customers for whom an invoice has been generated are included in the downloaded file. Customers in the trip without a generated invoice are not included.

If invoices have been generated for multiple customers in the trip, all of those generated invoices are included in the download.

Features

  • Download invoices generated for customers in a trip.
  • Include only customers with generated invoices.
  • Download multiple customer invoices as a single PDF file.

Notes

  • The trip must contain at least one customer with a generated invoice.
  • Customers without a generated invoice are excluded from the downloaded file.
  • The downloaded file contains the generated invoices for the matching customers.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/sales
  • Trip/update-details
  • Trip/delivery
query Parameters
trip_id
required
integer

ID of the trip for which generated invoices are downloaded.

Responses

Response samples

Content type
{
  • "message": "string"
}

Generate Invoice

Generates an invoice for a customer associated with a trip.

The invoice is generated for the specified customer based on the customer's transactions and items in the specified trip.

Features

  • Generate an invoice for a customer in a trip.
  • Generate the associated invoice add-on details.
  • Return the generated invoice ID.
  • Return the generated credit note ID when applicable.
  • Return invoice and credit note add-on information.

Notes

  • Invoice generation is supported only when the invoice generation method is configured as trip based.
  • The specified customer must be associated with the trip.
  • The invoice parameter controls invoice generation.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/customer-invoice
path Parameters
trip_id
required
integer

ID of the trip for which the invoice is generated.

customer_id
required
integer

ID of the customer for whom the invoice is generated.

query Parameters
invoice
required
boolean

Generate the invoice.

Responses

Response samples

Content type
application/json
{
  • "cnote_addons": null,
  • "creditnote_id": null,
  • "inv_addons": {
    },
  • "invoice_id": 2407
}

Replan trip

Updates one or more properties of an existing trip.

This endpoint supports modifying trip information such as customers, inventory, item quantities, prices, discounts, returned items, and payments collected during the trip.

Features

  • Update one or more trip delivery properties.
  • Set today or the trip start date for delivery.
  • Add a new item for a customer.
  • Update delivery item quantity, price, and discount.
  • Add or update invoice payment information.
  • Update returned item details.
  • Add or remove a customer from the trip.
  • Create a new customer and automatically add the customer to the customer list.

Notes

  • Modifying item price or discount additionally requires return authorization.
  • Payment information can be added or updated through the payment field.
  • A customer can be added to or removed from the trip.
  • Replanning a merged trip is not permitted.
  • The user must have permission to manage trips.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/access
  • Trip/delivery
  • Trip/sales
path Parameters
trip_id
required
integer

ID of the trip to replan.

Request Body schema: application/json
required
Array of objects

Customers and their trip delivery updates.

Array of objects

Inventory updates for the trip.

Responses

Request samples

Content type
application/json
{
  • "customers": [
    ],
  • "inventory": [
    ]
}

Response samples

Content type
application/json
{
  • "new_payments": [
    ]
}

Get Trip Track

Retrieves the tracking information for a trip based on the specified tracking nature.

The response contains the trip tracking data as a GeoJSON FeatureCollection, including route segments and tracking points.

Features

  • Retrieve sales person tracking information.
  • Retrieve delivery person tracking information.
  • Retrieve tracking information from a specified timestamp.
  • Return tracking data in GeoJSON format.
  • Include distance, time, start time, end time, and average speed for applicable tracking segments.

Notes

  • trip_id identifies the trip for which tracking information is requested.
  • nature specifies the tracking type: sales for sales person tracking and del for delivery person tracking.
  • Sales person tracking is available until sales is concluded.
  • Once sales is concluded, sales person tracking is no longer available.
  • Delivery person tracking is enabled only after sales is concluded.
  • since is optional and can be used to retrieve tracking data starting from a specified Unix timestamp.
  • The response is returned as a GeoJSON FeatureCollection.
  • Tracking features can contain LineString, Point, or Polygon geometries.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/update-details
path Parameters
trip_id
required
integer

ID of the trip for which tracking information is requested.

nature
required
string
Enum: "sales" "del"

Type of tracking information to retrieve.

  • sales: Retrieve sales person tracking information.
  • del: Retrieve delivery person tracking information.
query Parameters
since
number <double>

Unix timestamp from which tracking information should be retrieved.

Responses

Response samples

Content type
application/json
{
  • "geojson": {
    }
}

Stop Trip Tracking

Stops tracking for the specified trip tracking nature.

The tracking can be stopped separately for the sales person or delivery person using the nature path parameter.

Features

  • Stop sales person tracking.
  • Stop delivery person tracking.
  • Stop tracking for a specific trip and tracking nature.

Notes

  • trip_id identifies the trip for which tracking is stopped.
  • nature specifies whose tracking should be stopped: sales for sales person tracking and del for delivery person tracking.
  • Set stop to 1 to stop tracking for the specified nature.
  • Stopping sales tracking stops tracking for the sales person.
  • Stopping del tracking stops tracking for the delivery person.

Permissions

Any of the following permissions are needed

  • Trip/sales
  • Trip/delivery
path Parameters
trip_id
required
integer

ID of the trip for which tracking should be stopped.

nature
required
string
Enum: "sales" "del"

Type of tracking to stop.

  • sales: Stop sales person tracking.
  • del: Stop delivery person tracking.
query Parameters
stop
required
boolean

Stops tracking for the specified nature when set to 1.

Responses

Response samples

Content type
application/json
{
  • "stopped": true
}

Get trips

Retrieves trips matching the supplied filters.

The response contains trip dates, assigned sales and delivery persons, inventory mileage, route information, and customer counts.

Features

  • Retrieve trips using multiple filter criteria.
  • Filter trips by status.
  • Filter trips by assigned sales or delivery person.
  • Filter trips by route.
  • Filter trips by invoice ID or invoice number.
  • Sort trips by ID or date.
  • Limit the number of returned trips.

Notes

  • max limits the number of trips returned.
  • sort supports id and date fields with asc or desc ordering.
  • assigned_to filters trips by the assigned sales or delivery person.
  • route_id filters trips by the associated route.
  • inv_id filters trips by invoice ID.
  • inv_num filters trips by invoice number.
  • Route, mileage, and assigned-person fields can be null when the corresponding information is not available.

Permissions

Any of the following permissions are needed

  • Trip/access
  • Trip/manage
  • Trip/sales
  • Trip/delivery
query Parameters
status
string
Enum: "open" "close"

Filter trips by their status.

max
integer

Maximum number of records to return.

sort
string^(id|date)\.(asc|desc)$

Sorting expression in the format <field>.asc or <field>.desc.

Allowed fields:

  • id
  • date
assigned_to
integer

Filter trips by the sales person or delivery person assigned to the trip.

route_id
integer

Filter trips by the route associated with the trip.

inv_id
integer

Filter trips by invoice ID.

inv_num
integer

Filter trips by invoice number.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create trip

Creates a new trip.

A trip can be created for an existing route or without a route. Customers, inventory, assigned sales and delivery persons, starting mileage, trip start date, and delivery order can be provided during creation.

Features

  • Create a new trip.
  • Assign customers and their required items to the trip.
  • Set trip inventory.
  • Assign sales and delivery persons.
  • Set starting sales and delivery mileage.
  • Assign an existing route to the trip.
  • Set the trip start date.
  • Set customer delivery order.
  • Merge orders from other trips.

Notes

  • customers contains the customers and items included in the trip.
  • inventory contains the total quantity of items required for the trip.
  • delivery_by specifies the delivery person assigned to the trip.
  • order_taken_by specifies the sales person assigned to the trip.
  • route_id specifies the route associated with the trip.
  • trip_delivery_order maps customer IDs to their delivery order.
  • merged_orders can be used to include orders from other trips.
  • Starting mileage can be provided separately for sales and delivery.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/sales
Request Body schema: application/json
required
Array of objects

Customers and their required product details.

delivery_by
integer

Delivery person ID.

Array of objects

Total quantity of each item required for the trip.

Array of objects

Orders from other trips to be merged into this trip.

open_mileage_del
number

Starting mileage for delivery.

open_mileage_sales
number

Starting mileage for sales.

order_taken_by
integer

Sales person ID.

route_id
integer

Route ID associated with the trip.

start_date
string <date-time>

Trip start date and time.

object

Maps customer IDs to their delivery order.

Responses

Request samples

Content type
application/json
{
  • "customers": [
    ],
  • "delivery_by": 9395,
  • "inventory": [
    ],
  • "open_mileage_del": 123.98,
  • "open_mileage_sales": 123.98,
  • "order_taken_by": 9395,
  • "route_id": 14,
  • "start_date": "19-08-2026T17:28:35",
  • "trip_delivery_order": { }
}

Response samples

Content type
application/json
{
  • "id": 2451
}

Routes

API related to the routes

Onboard Customer

Onboards the authenticated customer to a route with the specified items.

The customer is identified from the authenticated request. A customer can be onboarded only if the customer has not already been onboarded.

Features

  • Onboard the authenticated customer to a route.
  • Assign items to the customer during onboarding.
  • Prevent an already onboarded customer from being onboarded again.

Notes

  • route_id is required and identifies the route to which the customer is onboarded.
  • items is required and specifies the items for the onboarding.
  • The customer is identified from the authenticated request.
  • An unauthenticated request returns 401 Unauthorized.
  • A customer who is already onboarded cannot be onboarded again and returns 409 Conflict.
query Parameters
route_id
required
integer

ID of the route to onboard the customer to.

items
required
string

Items to be assigned to the customer during onboarding.

Responses

Response samples

Content type
{
  • "message": "string"
}

Delete Route

Deletes an existing route.

A route can be deleted only when it has no customers assigned to it.

Features

  • Delete an existing route.
  • Prevent deletion of routes that contain customers.

Notes

  • route_id identifies the route to be deleted.
  • A route cannot be deleted if it has one or more customers assigned to it.
  • The response does not contain any data when the route is successfully deleted.

Permissions

Routes/manage is needed

path Parameters
route_id
required
integer

ID of the route to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Route Details

Retrieves detailed information for a specific route.

The response includes the route name, customers assigned to the route, customer items, delivery order, account information, customer delivery details, exceptions, route locations, tags, cancellation settings, and store order information.

Future customer exceptions can optionally be loaded using the load_future_exc query parameter.

Features

  • Retrieve details of a specific route.
  • Retrieve customers assigned to the route.
  • Retrieve items and supply information for each customer.
  • Retrieve customer delivery order.
  • Retrieve customer account balance and transaction type.
  • Retrieve customer payment and delivery information.
  • Retrieve customer location information.
  • Retrieve route start and end locations.
  • Optionally load future customer exceptions.
  • Retrieve store order and store order timing information.

Notes

  • route_id identifies the route to retrieve.
  • load_future_exc controls whether future customer exceptions are loaded.
  • Customer items contain the item ID, quantity, frequency, weekdays, and last supplied date.
  • delivery_order specifies the customer's delivery order within the route.
  • geopos contains the customer's geographical coordinates.
  • start_location and end_location contain the route's geographical coordinates.

Permissions

Any of the following permissions are needed

  • Routes/manage
  • Routes/access
path Parameters
route_id
required
integer

ID of the route to retrieve.

query Parameters
load_future_exc
boolean

Load future customer exceptions when set to true.

Responses

Response samples

Content type
application/json
{
  • "cancellation_time": "0;14:0",
  • "customers": [
    ],
  • "end_location": {
    },
  • "name": "Chennai Central",
  • "start_location": {
    },
  • "store_order_timing": {
    },
  • "store_orders": null,
  • "tag": "Morning - Chennai Central"
}

Update Route

Updates the details of an existing route.

The route can be updated by changing its name, tag, cancellation time, assigned customers, start location, end location, or store order timing.

At least one valid field must be provided in the request.

Features

  • Update the route name.
  • Update the route tag.
  • Update the route cancellation time.
  • Update customers assigned to the route.
  • Remove customers from the route.
  • Update customer delivery order and item details.
  • Update the route start location.
  • Update the route end location.
  • Update store order timing.

Notes

  • route_id identifies the route to be updated.
  • At least one valid update field must be provided.
  • customers can be used to update customers assigned to the route and their item details.
  • Set customers[].delete to true to remove the specified customer from the route.
  • start_location must contain both lng and lat when provided.
  • end_location must contain both lng and lat when provided.
  • The route can be updated only if the authenticated user has access to the specified route.

Permissions

Any of the following permissions are needed

  • Routes/manage
  • Trip/manage
path Parameters
route_id
required
integer

ID of the route to update.

Request Body schema: application/json
required
cancellation_time
string

Route cancellation time configuration.

Array of objects

Customers to update in the route. Customers can be updated or removed from the route.

object

Ending location of the route.

name
string

Name of the route.

object

Starting location of the route.

object

Store order timing configuration.

tag
string

Tag associated with the route.

Responses

Request samples

Content type
application/json
Example
{
  • "customers": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Get Route Customers

Retrieves the customers associated with a specific route.

The response includes customer details, account balance, last invoiced date, other routes associated with the customer, and the customer's geographical location.

Features

  • Retrieve customers assigned to a route.
  • Retrieve customer account balance.
  • Retrieve the customer's last invoiced date.
  • Retrieve other routes associated with the customer.
  • Retrieve customer geographical location.

Notes

  • route_id identifies the route for which customers are requested.
  • last_invoiced_date can be null when the customer has not been invoiced.
  • other_routes contains other routes associated with the customer.
  • geopos contains the customer's geographical coordinates.

Permissions

Any of the following permissions are needed

  • Routes/manage
  • Trip/manage
  • General/customer-invoice
path Parameters
route_id
required
integer

ID of the route for which customers are requested.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Delete Route Exception

Deletes an existing item exception for a customer assigned to a route.

The exception is identified using the route, customer, item, and exception date.

Features

  • Delete an existing route exception.
  • Delete a specific item exception for a customer.
  • Identify the exception using route, customer, item, and date.

Notes

  • route_id identifies the route containing the exception.
  • customer_id identifies the customer associated with the exception.
  • item_id identifies the item associated with the exception.
  • date identifies the start date of the exception.
  • A successful request returns an empty response body.
path Parameters
route_id
required
integer

ID of the route containing the exception.

customer_id
required
integer

ID of the customer associated with the exception.

item_id
required
integer

ID of the item associated with the exception.

date
required
string <date-time>

Start date and time of the exception.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Route Exception

Updates an existing exception for a customer item assigned to a route.

The exception is identified using the route, customer, item, and exception date. The exception details can then be updated using the supported query parameters.

Features

  • Update an existing customer item exception.
  • Update the exception quantity.
  • Update the exception notes.
  • Update the exception end date.
  • Identify an exception using route, customer, item, and date.

Notes

  • route_id identifies the route containing the exception.
  • customer_id identifies the customer associated with the exception.
  • item_id identifies the item associated with the exception.
  • date identifies the start date of the exception.
  • At least one query parameter must be provided.
  • quantity can be used to update the exception quantity.
  • notes can be used to update the exception notes.
  • till can be used to update the exception end date.
  • The exception start_date cannot be greater than the end_date.
  • A successful request returns an empty response body.
path Parameters
route_id
required
integer

ID of the route containing the exception.

customer_id
required
integer

ID of the customer associated with the exception.

item_id
required
integer

ID of the item associated with the exception.

date
required
string <date-time>

Start date and time of the exception.

query Parameters
quantity
number

Updated quantity for the exception.

notes
string

Updated notes for the exception.

till
string <date-time>

Updated end date and time of the exception.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Route Exceptions

Retrieves the exceptions associated with the customers of a specific route.

The response groups exceptions by customer. Each exception contains the affected item, exception period, quantity, notes, the user who logged the exception, and route details.

Features

  • Retrieve customer exceptions for a route.
  • Retrieve exception details for each customer.
  • Retrieve the exception start and end dates.
  • Retrieve the exception quantity.
  • Retrieve notes associated with an exception.
  • Retrieve the user who logged the exception.
  • Retrieve route information associated with each exception.

Notes

  • route_id identifies the route for which exceptions are requested.
  • A customer can have multiple exceptions.
  • items contains the exceptions associated with the customer.
  • from and till define the period for which the exception is applicable.
  • quantity specifies the quantity affected by the exception.
  • logged_by identifies who logged the exception.
  • notes can be null when no notes are provided.

Permissions

Routes/manage is needed

path Parameters
route_id
required
integer

ID of the route for which exceptions are requested.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Create Route Exceptions

Creates new exceptions for customers assigned to a route.

Exceptions can be created for specific items by specifying the affected quantity and the period for which the exception applies.

Features

  • Create exceptions for customers in a route.
  • Create exceptions for specific customer items.
  • Specify the quantity affected by an exception.
  • Specify the start date of an exception.
  • Optionally specify the end date of an exception.

Notes

  • route_id identifies the route for which exceptions are created.
  • exceptions[].id identifies the customer.
  • exceptions[].items[].id identifies the item for which the exception is created.
  • quantity specifies the quantity affected by the exception.
  • from specifies when the exception starts.
  • till can be provided to specify when the exception ends.
  • A successful request returns an empty response body.
path Parameters
route_id
required
integer

ID of the route for which exceptions are created.

Request Body schema: application/json
required
Array of objects

Customers and their item exceptions.

Responses

Request samples

Content type
application/json
Example
{
  • "exceptions": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Download Route Outstanding Report

Generates and downloads an outstanding report for one or more routes.

The report can be generated for a specific route, multiple routes, or all routes accessible to the authenticated user.

Features

  • Generate an outstanding report for a route.
  • Generate a report for multiple routes.
  • Generate a report for all accessible routes.
  • Optionally ignore customers without invoices.

Notes

  • route_id can contain a single route ID, multiple comma-separated route IDs, or * to generate the report for all accessible routes.
  • The requested routes must be accessible to the authenticated user.
  • ignore_noinvs is optional and can be used to ignore customers without invoices in the report.
  • The report is downloaded as an Excel (.xls) file.

Permissions

Any of the following permissions are needed

  • Routes/manage
  • Trip/manage
  • General/customer-invoice
path Parameters
route_id
required
string

Route ID or comma-separated route IDs for which the outstanding report should be generated. Use * to generate the report for all accessible routes.

query Parameters
ignore_noinvs
boolean

Ignore customers without invoices when generating the outstanding report.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Routes

Retrieves the list of available routes.

Each route contains its unique ID and name.

Features

  • Retrieve all available routes.
  • Return the unique ID of each route.
  • Return the name of each route.

Notes

  • The response contains a list of routes.
  • Each route contains a unique id and a name.

Permissions

Any of the following permissions are needed

  • Routes/access
  • Routes/manage
  • Trips/manage

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Create Route

Creates a new route using the provided route name.

Features

  • Create a new route.
  • Assign a unique ID to the newly created route.

Notes

  • name is required to create a route.
  • The route name must be provided in the request body.
  • The response contains the ID of the newly created route.

Permissions

Routes/manage is needed

Request Body schema: application/json
required
name
required
string

Name of the new route.

Responses

Request samples

Content type
application/json
{
  • "name": "Chennai Central"
}

Response samples

Content type
application/json
{
  • "id": 106
}

Customers

API related to the customers

Delete Customer

Deletes an existing customer.

Features

  • Delete a customer by customer ID.

Notes

  • customer_id identifies the customer to be deleted.
  • A successful deletion returns an empty response body.

Permissions

General/customer-delete is needed

path Parameters
customer_id
required
integer

ID of the customer to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Customer Ledger

Retrieves the transaction and account details of a customer for the specified date range.

Features

  • Retrieve customer trip information.
  • Retrieve customer payment information.
  • Retrieve invoice charges.
  • Retrieve opening balance information.
  • Retrieve transaction type.
  • Support pagination using the returned next_from value.

Notes

  • customer_id identifies the customer.
  • Both from and to parameters are mandatory.
  • opening_balance=1 includes the customer's opening balance in the response.
  • Access to the customer details requires either administrator privileges or the required customer permissions.
  • has_more indicates whether additional records are available.
  • next_from contains the value to use for retrieving the next set of records when more records are available.
path Parameters
customer_id
required
integer

ID of the customer.

query Parameters
from
required
string

Start date and time for the customer transaction details.

to
required
string

End date and time for the customer transaction details.

opening_balance
integer
Value: 1

Set to 1 to include the customer's opening balance in the response.

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "invoice_charges": [
    ],
  • "next_from": "string",
  • "opening_balance": {
    },
  • "payments": [
    ],
  • "trips": [
    ],
  • "txn_type": "C"
}

Update Customer

Updates the details of an existing customer.

The customer can be updated by changing supported customer details such as the customer name, item-wise received quantities, or invoice generation type.

Features

  • Update the customer name.
  • Update received quantities for items.
  • Update multiple item quantities in a single request.
  • Update the invoice generation type.

Notes

  • customer_id identifies the customer to be updated.
  • At least one update parameter must be provided.
  • recv_count.<item_id> specifies the received quantity for the corresponding item.
  • Multiple recv_count.<item_id> parameters can be provided for different items.
  • invoice_gen_type can be used to set the invoice generation type to postpaid or prepaid-1.
  • A successful update returns an empty response body.

Permissions

Any of the following permissions are needed

  • General/customer-delete
  • General/customer-logs
  • General/customer-invoice
path Parameters
customer_id
required
integer

ID of the customer to update.

query Parameters
name
string

Updated name of the customer.

recv_count.<item_id>
number

Received quantity for the specified item. Replace <item_id> with the corresponding item ID.

invoice_gen_type
string
Enum: "postpaid" "prepaid-1"

Invoice generation type for the customer.

postpaid generates invoices using the postpaid method. prepaid-1 generates invoices using the prepaid method.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Customer Alterations

Retrieves the authenticated customer's route alterations for a specific month and year.

Features

  • Retrieve alterations for the authenticated customer.
  • Filter alterations by month and year.
  • Return alteration quantity and date range.
  • Return the team member who logged the alteration.
  • Return the associated route details.

Notes

  • customer_id must be self.
  • This endpoint is available only for self customers.
  • month specifies the month to retrieve.
  • year specifies the year to retrieve.
  • till can be null when the alteration has no end date.
  • quantity specifies the alteration quantity.
  • logged_by identifies the team member who logged the alteration.
  • route_id identifies the associated route.
  • tag contains the route tag.
  • cancellation_time contains the route cancellation time.
path Parameters
customer_id
required
string
Value: "self"

Must be self. The authenticated customer's ID is resolved internally.

query Parameters
month
required
integer [ 1 .. 12 ]

Month for which alterations are requested.

year
required
integer

Year for which alterations are requested.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Customer Details

Retrieves the details of a specific customer.

Specific fields can optionally be requested using the fields query parameter. When fields is not provided, the response contains the available customer details.

Features

  • Retrieve customer details by customer ID.
  • Retrieve specific customer fields.
  • Retrieve customer account details.
  • Retrieve customer payment and delivery dates.
  • Retrieve customer invoice details.
  • Retrieve customer pricing information.

Notes

  • customer_id identifies the customer whose details are requested.
  • fields is optional.
  • Multiple fields can be requested as comma-separated values.
  • When fields is provided, only the requested fields are returned.
  • The customer must exist to retrieve its details.
path Parameters
customer_id
required
integer

ID of the customer whose details are requested.

query Parameters
fields
string
Example: fields=id,last_pay_date,last_del_date,added_on

Comma-separated list of customer fields to return.

Example fields:

  • id
  • last_pay_date
  • last_del_date
  • added_on

Responses

Response samples

Content type
application/json
Example
{
  • "accnt_balance": 9300.25,
  • "added_on": "20-04-2026T10:20:35",
  • "credit_amount": 12500.5,
  • "debit_amount": 3200.25,
  • "empties": 2,
  • "id": 501,
  • "last_invoiced_date": "12-08-2026T10:30:00",
  • "name": "Prem",
  • "nick_name": "prem",
  • "opening_balance": 500,
  • "pricings": 4,
  • "total_empty": 2,
  • "total_full": 10,
  • "txn_type": "C"
}

Update Customer Geo Location

Updates the geographical location of an existing customer.

The customer location is updated using the provided latitude and longitude coordinates.

Features

  • Update the customer's geographical location.
  • Validate the required latitude and longitude parameters.
  • Restrict location updates based on the distance from the customer's previous location.

Notes

  • customer_id identifies the customer whose location is updated.
  • Both lat and lng query parameters are mandatory.
  • For non-manager users, the new location must be within 100 meters of the previous customer location.
  • Users with trip management permission are not subject to the 100-meter distance restriction.
  • A successful update returns an empty response body.
path Parameters
customer_id
required
integer

ID of the customer whose location is updated.

query Parameters
lat
required
number <double>

Latitude of the customer's new location.

lng
required
number <double>

Longitude of the customer's new location.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Customer Item Price History

Retrieves the price history for a specific item associated with a customer.

Features

  • Retrieve item price history for a customer.
  • Filter history by item ID.
  • Limit the number of history records returned.

Notes

  • customer_id identifies the customer.
  • history_item must be item_prices.
  • item_id is mandatory.
  • max can be used to limit the number of records returned.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Trip/sales
  • Routes/manage
path Parameters
customer_id
required
integer

ID of the customer.

history_item
required
string
Value: "item_prices"

Type of customer history to retrieve.

query Parameters
item_id
required
integer

ID of the item whose price history is requested.

max
integer

Maximum number of history records to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Generate Customer Invoice

Generates an invoice for a specific customer for the specified month and year.

Additional charges can be provided in the request body.

Features

  • Generate a customer invoice.
  • Generate an invoice for a specific month and year.
  • Add additional charges to the invoice.

Notes

  • customer_id identifies the customer for whom the invoice is generated.
  • month specifies the invoice month.
  • year specifies the invoice year.
  • name specifies the customer name.
  • charges contains additional charges to be applied to the invoice.

Permissions

General/customer-invoice is needed

path Parameters
customer_id
required
integer

ID of the customer for whom the invoice is generated.

query Parameters
name
required
string

Name of the customer.

month
required
integer

Month for which the invoice is generated.

year
required
integer

Year for which the invoice is generated.

Request Body schema: application/json
required
Array of objects

Additional charges to be applied to the invoice.

Responses

Request samples

Content type
application/json
{
  • "charges": [ ]
}

Response samples

Content type
application/json
{
  • "creditnote_id": null,
  • "invoice_id": 2412
}

Get Customer Opening Balance

Retrieves the opening balance details of a specific customer for the specified date.

The response contains the customer's credit and debit amounts, transaction type, and item-wise full and empty quantities.

Features

  • Retrieve customer opening credit amount.
  • Retrieve customer opening debit amount.
  • Retrieve customer transaction type.
  • Retrieve opening full and empty quantities.

Notes

  • customer_id identifies the customer whose opening balance is requested.
  • date is mandatory.
  • Access requires administrator privileges or the General/customer-logs or General/customer-invoice permission.
  • The empties array contains the full and empty item details with their respective counts.
path Parameters
customer_id
required
integer

ID of the customer whose opening balance is requested.

query Parameters
date
required
string <date>
Example: date=18-08-2026

Date for which the customer's opening balance is requested.

Responses

Response samples

Content type
application/json
{
  • "credit": 12500.5,
  • "debit": 3200.25,
  • "empties": [
    ],
  • "txn_type": "C"
}

Create Customer Payment

Creates a new payment for a customer.

The payment can be associated with one or more invoices by providing invoice payment amounts using bill_id.<bill_id> parameters.

Features

  • Create a customer payment.
  • Associate a payment with one or more invoices.
  • Support payments distributed across multiple invoices.
  • Record the payment mode, amount, date, and customer details.

Notes

  • customer_id identifies the customer making the payment.
  • amount is mandatory.
  • date is required for the payment.
  • Invoice payment parameters use the format bill_id.<bill_id>.
  • The sum of invoice payment amounts must not exceed the total payment amount.
  • Multiple bill_id.<bill_id> parameters can be provided.
  • A successful request returns the ID of the newly created payment.

Permissions

General/customer-invoice is needed

path Parameters
customer_id
required
integer

ID of the customer making the payment.

query Parameters
mode
string

Payment mode.

name
string

Name of the customer.

amount
required
number

Total payment amount.

date
required
string <date-time>

Date and time of the payment.

bill_id.<bill_id>
number

Amount of the payment allocated to the specified invoice. Replace <bill_id> with the invoice ID.

Responses

Response samples

Content type
application/json
{
  • "id": 668
}

Delete Customer Payment

Deletes an existing payment associated with a customer.

Features

  • Delete a customer payment by payment ID.

Notes

  • customer_id identifies the customer associated with the payment.
  • payment_id identifies the payment to be deleted.
  • A successful deletion returns an empty response body.

Permissions

General/customer-delete is needed

path Parameters
customer_id
required
integer

ID of the customer associated with the payment.

payment_id
required
integer

ID of the payment to be deleted.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Customer Payment

Updates an existing payment for a customer.

The payment amount, payment mode, and invoice-wise payment allocations can be updated.

Features

  • Update the payment amount.
  • Update the payment mode.
  • Update invoice-wise payment amounts.
  • Allocate a payment across multiple invoices.

Notes

  • customer_id identifies the customer associated with the payment.
  • payment_id identifies the payment to be updated.
  • amount specifies the updated total payment amount.
  • mode specifies the updated payment mode.
  • bill_id.<bill_id> specifies the payment amount allocated to the corresponding invoice.
  • Multiple bill_id.<bill_id> parameters can be provided.
  • A successful update returns an empty response body.

Permissions

General/customer-delete is needed

path Parameters
customer_id
required
integer

ID of the customer associated with the payment.

payment_id
required
integer

ID of the payment to update.

query Parameters
amount
number

Updated total payment amount.

mode
string

Updated payment mode.

bill_id.<bill_id>
number

Updated payment amount allocated to the specified invoice. Replace <bill_id> with the corresponding invoice ID.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Customer Payments

Retrieves the payment history of a specific customer.

The response can be sorted by payment date or payment ID and limited to a maximum number of records.

Features

  • Retrieve customer payment history.
  • Sort payments by date.
  • Sort payments by payment ID.
  • Apply multiple sorting fields.
  • Limit the number of payment records returned.

Notes

  • customer_id identifies the customer whose payments are requested.
  • sort supports multiple comma-separated sorting expressions.
  • Supported sort fields are date and id.
  • Each sort expression must use either asc or desc.
  • max limits the number of records returned.

Permissions

General/customer-invoice is needed

path Parameters
customer_id
required
integer

ID of the customer whose payments are requested.

query Parameters
sort
string
Example: sort=date.desc,id.desc

Sorting expression in the format <field>.<asc|desc>.

Multiple sorting expressions can be provided as comma-separated values.

Supported fields:

  • date
  • id
max
integer

Maximum number of payment records to return.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Update Customer Pricing

Updates the special pricing configuration for a customer.

Pricing can be configured for a specific item, item type, or as a general pricing rule for the customer.

Features

  • Update special pricing for a customer.
  • Set item-specific pricing.
  • Set item-type-specific pricing.
  • Set general customer pricing.
  • Configure percentage, rate, or fixed pricing values.

Notes

  • customer_id identifies the customer whose pricing is updated.
  • pricings contains the pricing rules to be applied.
  • id_type specifies what the pricing rule applies to.
  • id_type=item applies pricing to a specific item.
  • id_type=type applies pricing to a specific item type.
  • id_type=* applies pricing generally to the customer.
  • id is required when id_type is item or type.
  • val_type specifies the pricing value type.
  • value specifies the pricing value.

Permissions

Any of the following permissions are needed

  • General/customer-invoice
  • Trip/sales
  • Trip/manage
path Parameters
customer_id
required
integer

ID of the customer whose pricing is updated.

Request Body schema: application/json
required
Array of objects

Special pricing rules for the customer.

Responses

Request samples

Content type
application/json
{
  • "pricings": [
    ]
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get Customer Pricing

Retrieves the special pricing configuration for one or more customers.

Features

  • Retrieve pricing for a single customer.
  • Retrieve pricing for multiple customers.
  • Retrieve item-specific pricing.
  • Retrieve item-type-specific pricing.
  • Retrieve general customer pricing.

Notes

  • customer_id is mandatory.
  • Multiple customer IDs can be provided as comma-separated values.
  • The response contains the pricing configuration for each customer that has pricing information.

Permissions

Any of the following permissions are needed

  • General/customer-invoice
  • General/customer-logs
  • Trip/manage
  • Trip/access
  • Trip/delivery
  • Trip/sales
query Parameters
customer_id
required
string
Example: customer_id=61,62

Customer ID or comma-separated customer IDs whose pricing information should be retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get Customers

Retrieves customers matching the supplied filters.

The response can be customized using filters, sorting, and result limits. Customers can also be filtered by transaction type to retrieve either customers or vendors.

Features

  • Retrieve customers.
  • Filter customers by transaction type.
  • Filter vendors using transaction type.
  • Sort results by supported fields.
  • Sort results using multiple fields.
  • Limit the number of records returned.
  • Filter customers based on supported filter criteria.

Notes

  • txn_type=C returns only customers.
  • txn_type=V returns only vendors.
  • max limits the number of records returned and defaults to 30.
  • When id is provided, the result limit is not applied.
  • dues and advances cannot be used together.
  • sort supports multiple comma-separated sorting expressions.
  • Supported sort fields are name, id, advance_amnt, receivable_amnt, empties, and accnt_balance.
  • Each sort expression must use either asc or desc.

Permissions

Any of the following permissions are needed

  • General/customer-logs
  • General/customer-invoice
query Parameters
sort
string
Example: sort=id.desc

Sorting expression in the format <field>.<asc|desc>.

Multiple sorting expressions can be provided as comma-separated values.

Supported fields:

  • name
  • id
  • advance_amnt
  • receivable_amnt
  • empties
  • accnt_balance
max
integer
Default: 30

Maximum number of records to return.

txn_type
string
Enum: "C" "V"

Filter customers by transaction type.

C returns only customers. V returns only vendors.

dues
string

Filter customers based on dues.

advances
string

Filter customers based on advances.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Create Customer

Creates a new customer using the provided contact information and goods-specific details.

Features

  • Create a new customer.
  • Add customer contact information.
  • Add additional customer details.
  • Assign the customer to a route.
  • Set the customer's opening balance.
  • Create the contact as a vendor when txn_type is V.

Notes

  • base_data is mandatory.
  • base_data contains the customer's personal and contact details.
  • goods_data contains goods-specific customer details.
  • route_id identifies the route assigned to the customer.
  • opening_balance specifies the customer's opening balance.
  • txn_type is optional.
  • When txn_type is V, the contact is created as a vendor.
  • When txn_type is not provided, the contact is created as a customer by default.
  • txn_type supports C for customer and V for vendor.

Permissions

Any of the following permissions are needed

  • General/customer-logs
  • General/customer-invoice
  • Trip/manage
  • Trip/sales
Request Body schema: application/json
required
object

Customer contact and personal information.

object

Goods-specific customer information.

Responses

Request samples

Content type
application/json
{
  • "base_data": {
    },
  • "goods_data": {
    }
}

Response samples

Content type
application/json
{
  • "id": 836
}

Team

API related to the users

Get Team Members

Retrieves the team members available to the authenticated user.

The response includes team member details, user type, notification settings, access restrictions, and permitted routes.

Features

  • Retrieve team members.
  • Retrieve team member user types.
  • Retrieve team member access settings.
  • Retrieve permitted routes for team members.

Notes

  • user_type identifies the type of team member.
  • permitted_routes contains the routes accessible to the team member.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create Team Member

Creates a new team member with the specified details.

Features

  • Create a new team member.
  • Assign a team member type.
  • Enable or disable trip notifications.

Notes

  • name specifies the team member name.
  • email_id specifies the team member email address.
  • user_type must be one of del, sales, or snd.
  • notify_trips specifies whether trip notifications are enabled.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Routes/manage
Request Body schema: application/json
required
email_id
string <email>

Email address of the team member.

name
string

Name of the team member.

notify_trips
boolean

Whether trip notifications are enabled.

user_type
string
Enum: "del" "sales" "snd"

Type of the team member.

Responses

Request samples

Content type
application/json
{
  • "email_id": "aravind@example.com",
  • "name": "Aravind Kumar",
  • "notify_trips": true,
  • "user_type": "sales"
}

Response samples

Content type
application/json
{
  • "id": 9410
}

Delete Team Member

Deletes an existing team member.

Features

  • Delete a team member by ID.

Notes

  • tid identifies the team member to be deleted.
  • A successful deletion returns an empty response body.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/customer-delete
path Parameters
tid
required
integer

ID of the team member to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Team Member

Updates the details of an existing team member.

Only the fields provided in the request are updated.

Features

  • Update team member name.
  • Update team member email address.
  • Update team member mobile number.
  • Update team member mobile ISD code.
  • Update team member type.
  • Update trip notification settings.
  • Update team member access and restriction settings.
  • Update permitted routes.

Notes

  • tid identifies the team member to be updated.
  • At least one valid update parameter must be provided.
  • user_type must be one of snd, sales, or del.
  • permitted_routes can be used to update the routes permitted for the team member.
  • A successful update returns an empty response body.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • Routes/manage
path Parameters
tid
required
integer

ID of the team member to update.

query Parameters
name
string

Updated name of the team member.

email_id
string <email>

Updated email address of the team member.

mobile_isd_code
string

Updated mobile ISD code.

mobile_number
string

Updated mobile number.

user_type
string
Enum: "snd" "sales" "del"

Updated type of the team member.

notify_trips
boolean

Enable or disable trip notifications.

block_pricing
boolean

Enable or disable pricing restrictions.

block_orders
boolean

Enable or disable order restrictions.

block_edits_post_invc
boolean

Enable or disable edits after invoicing.

block_returns
boolean

Enable or disable return restrictions.

block_payments
boolean

Enable or disable payment restrictions.

block_payment_upd
boolean

Enable or disable payment update restrictions.

block_loc_upd
boolean

Enable or disable location update restrictions.

block_oos
boolean

Enable or disable out-of-stock restrictions.

block_edits_wo_loc
boolean

Enable or disable edits without location.

deny_cross_route_replan
boolean

Enable or disable cross-route replanning.

permitted_routes
string

Routes permitted for the team member.

Responses

Response samples

Content type
{
  • "message": "string"
}

Stats

API related to the stats

Get Quick Summary Report

Retrieves quick summary reports based on the requested QSR type.

Supported QSR types include customer-wise and product-wise summary reports.

Features

  • Retrieve customer-wise item transaction summaries.
  • Filter customer summaries by item IDs and date ranges.
  • Retrieve product-wise customer transaction summaries.
  • Filter product summaries by item types, quantities, routes, sales persons, and date ranges.

Notes

  • qsr_type identifies the type of quick summary report.
  • customers returns customer-wise transaction quantities and prices grouped by transaction direction.
  • products returns product-wise transaction information grouped by customer.
  • max limits the number of returned records.
  • Customer QSR supports siids and nsiids item filters.
  • Customer QSR supports sdate_ge, sdate_le, nsdate_ge, and nsdate_le date filters.
  • Customer QSR supports route-related filters using riids, rdate_ge, rdate_le, nriids, nrdate_ge, and nrdate_le.
  • Product QSR supports type_id, outq_g, inq_g, route_id, sales_person, date_ge, and date_le.
  • out contains outgoing transactions.
  • outd contains outgoing discounted transactions.
  • in contains incoming transactions.
  • ind contains incoming discounted transactions.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings
path Parameters
qsr_type
required
string

Type of quick summary report. Supported values are customers and products.

query Parameters
max
integer

Maximum number of records to return.

siids
string

Pipe-separated item IDs used to filter customer sales.

sdate_ge
string

Start date for the customer sales item filter.

sdate_le
string

End date for the customer sales item filter.

nsiids
string

Pipe-separated item IDs used for the additional customer item filter.

nsdate_ge
string

Start date for the additional customer item filter.

nsdate_le
string

End date for the additional customer item filter.

riids
string

Route filter. Use * to include all matching routes.

rdate_ge
string

Start date for the route filter.

rdate_le
string

End date for the route filter.

nriids
string

Comma-separated route IDs used for the additional route filter.

nrdate_ge
string

Start date for the additional route filter.

nrdate_le
string

End date for the additional route filter.

type_id
string

Comma-separated item type IDs used to filter products.

outq_g
number

Minimum outgoing quantity filter.

inq_g
number

Minimum incoming quantity filter.

route_id
string

Comma-separated route IDs used to filter product results.

sales_person
string

Comma-separated sales person IDs used to filter product results.

date_ge
string

Start date for product statistics.

date_le
string

End date for product statistics.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Balance Summary

Retrieves a summary of customer and vendor balance statistics.

The response provides separate statistics for advances and receivables, grouped by transaction type.

Features

  • Retrieve advance balance statistics.
  • Retrieve receivable balance statistics.
  • Group statistics by transaction type.

Notes

  • txn_type identifies whether the statistics belong to customers (C) or vendors (V).
  • min represents the minimum balance in the group.
  • max represents the maximum balance in the group.
  • total represents the total balance in the group.
  • num represents the number of records in the group.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings

Responses

Response samples

Content type
application/json
{
  • "advances": [
    ],
  • "receivables": [
    ]
}

Get Routes Summary

Retrieves route-related summary information including items, customers assigned to routes, customers not assigned to routes, and customers assigned to multiple routes.

The same endpoint also supports downloading route summary information.

Features

  • Retrieve route summary information.
  • Get customers not assigned to any route.
  • Get customers assigned to multiple routes.
  • Download customers not assigned to routes.
  • Download customers assigned to multiple routes.
  • Download customers assigned to routes.

Notes

  • download=1 enables automatic download of the requested route summary data.
  • When download=1 is provided, one of notinroutes, multipleroutes, or inroute must also be provided.
  • notinroutes downloads customers that are not assigned to any route.
  • multipleroutes downloads customers assigned to multiple routes.
  • inroute downloads customers assigned to routes.
  • inroute=* includes customers from all routes.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings
query Parameters
download
integer
Value: 1

Set to 1 to automatically download the requested route summary data.

notinroutes
string

Downloads customers that are not assigned to any route.

multipleroutes
string

Downloads customers that are assigned to multiple routes.

inroute
string

Downloads customers assigned to routes. Use * to include customers from all routes.

Responses

Response samples

Content type
application/json
{
  • "customers_in_multiple_routes": [
    ],
  • "customers_not_in_route": [
    ],
  • "items": [
    ],
  • "num_customers_in_route": 0
}

Get Statistics

Retrieves statistics based on the requested statistics type.

The stats_type path parameter determines the type of statistics to retrieve.

Supported statistics types include:

  • sales - Sales, item, payment, and item details statistics.
  • route - Route-wise sales and cancellation statistics.
  • team - Team member-wise sales and delivery statistics.

Notes

  • Date filters can be used to restrict the statistics to a specific date range.
  • sales uses date_ge and date_le for the date range.
  • route and team use from and to for the date range.
  • item_types can be used with sales to filter statistics by item type.
  • The response structure depends on the requested stats_type.
path Parameters
stats_type
required
string
Enum: "sales" "route" "team"

Type of statistics to retrieve.

query Parameters
date_ge
string

Start date and time for sales statistics.

date_le
string

End date and time for sales statistics.

item_types
string

Item type filter for sales statistics.

from
string

Start date and time for route or team statistics.

to
string

End date and time for route or team statistics.

Responses

Response samples

Content type
application/json
{
  • "delivery": [
    ],
  • "item_map": {
    },
  • "new_customers": [
    ],
  • "sales": [
    ],
  • "sales_date_wise": [ ]
}

Settings

API related to the settings

Delete Payment Mode

Deletes an existing payment mode.

Features

  • Delete a payment mode by its name.

Notes

  • mode identifies the payment mode to be deleted.
  • A payment mode cannot be deleted if it is already used elsewhere in the system.
  • A successful deletion returns an empty response body.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings
  • Denied for anonymous users (Users / Apps not registered in the settings)
path Parameters
mode
required
string

Payment mode to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Payment Mode

Updates an existing payment mode.

Features

  • Update the name of an existing payment mode.

Notes

  • mode in the path identifies the payment mode to update.
  • The mode query parameter specifies the new payment mode name.
  • The mode query parameter is mandatory.
  • A successful update returns an empty response body.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings
  • Denied for anonymous users (Users / Apps not registered in the settings)
path Parameters
mode
required
string

Existing payment mode to update.

query Parameters
mode
required
string

New name for the payment mode.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Payment Modes

Retrieves the payment modes supported by the application.

The response can optionally include the number of payments made using each payment mode.

Features

  • Retrieve all supported payment modes.
  • Retrieve payment usage count for each payment mode.

Notes

  • By default, the response contains only the available payment mode names.
  • When detailed=1 is provided, the response includes the payment mode and its usage count.
  • count represents the number of payments that use the corresponding payment mode.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)
query Parameters
detailed
integer
Value: 1

When set to 1, returns the usage count for each payment mode along with the payment mode name.

Responses

Response samples

Content type
application/json
Example
[
  • "CASH",
  • "CHEQUE",
  • "CIN",
  • "CURRENCY NOTES",
  • "GPAY",
  • "NETBANKING",
  • "ONLINE PAYMENT"
]

Create Payment Mode

Creates a new payment mode.

Features

  • Create a new payment mode.

Notes

  • mode specifies the name of the new payment mode.
  • A successful request returns an empty response body.

Permissions

Any of the following permissions are needed

  • Trip/manage
  • General/manage-settings
  • Denied for anonymous users (Users / Apps not registered in the settings)
Request Body schema: application/json
required
mode
string

Name of the payment mode.

Responses

Request samples

Content type
application/json
{
  • "mode": "DIGITAL WALLET"
}

Response samples

Content type
{
  • "message": "string"
}

Update Full Empty Product Mapping

Updates or removes the mapping between full products and their corresponding empty products.

A full product can be mapped to one or more empty products. Providing an empty value removes the mapping for the specified full product.

Features

  • Map a full product to one or more empty products.
  • Update existing full product to empty product mappings.
  • Delete the mapping for a full product.

Notes

  • map.<full_product_id> is the only supported parameter format.
  • <full_product_id> identifies the full product.
  • The value of map.<full_product_id> must be a comma-separated list of empty product IDs.
  • An empty value removes the mapping for the specified full product.
  • A full product cannot be mapped to an empty product that is already configured as a full product.
  • Each empty product must have a valid 1:1 mapping configuration.

Permissions

General/manage-settings is needed

query Parameters
map.<full_product_id>
string
Examples:
  • map.<full_product_id>= - Delete full product mapping
  • map.<full_product_id>=813,814 - Map a full product to empty products

Comma-separated empty product IDs to be mapped to the specified full product. Replace <full_product_id> with the full product ID.

If the value is empty, the mapping for the specified full product is deleted.

Responses

Response samples

Content type
{
  • "message": "string"
}

Maps

API related to the maps

Get or Reorder Route

Retrieves or updates the optimized customer order for a route or trip.

The endpoint can be used with either a route_id or a trip_id. The same endpoint supports both GET and POST requests.

Features

  • Retrieve the reordered customer sequence for a route.
  • Retrieve the reordered customer sequence for a trip.
  • Reorder route or trip customer information.
  • Report reorder progress and completion status.
  • Return errors when route optimization cannot be completed.

Notes

  • Either route_id or trip_id must be provided.
  • route_id identifies the route to reorder.
  • trip_id identifies the trip to reorder.
  • The response may contain new_order when a new customer order is available.
  • in_progress indicates whether route reordering is in progress.
  • completed indicates whether route reordering is completed.
  • err and desc may be returned when the reorder operation encounters an error.
  • The endpoint supports both GET and POST requests.

Permissions

Any of the following permissions are needed

  • Routes/manage
  • Trip/manage
  • Trip/delivery
query Parameters
route_id
integer

ID of the route to reorder.

trip_id
integer

ID of the trip to reorder.

Responses

Response samples

Content type
application/json
Example
{
  • "completed": "1",
  • "in_progress": "0"
}

Get Customer Route Map

Generates a route map based on the geographical locations of the specified customers.

Features

  • Generate a route using multiple customer locations.
  • Return the generated route as a GeoJSON FeatureCollection.

Notes

  • cids is mandatory.
  • cids accepts multiple customer IDs as comma-separated values.
  • The response contains a GeoJSON FeatureCollection with the generated route represented as a LineString.

Permissions

Any of the following permissions are needed

  • Trip/access
  • Routes/access
  • Routes/manage
  • Trip/manage
  • Trip/sales
  • Trip/delivery
query Parameters
cids
required
string
Example: cids=21,15,72,164

Comma-separated customer IDs used to generate the route.

Responses

Response samples

Content type
application/json
{
  • "features": [
    ],
  • "type": "FeatureCollection"
}