search parameter lets you filter results by user code or name, and you can sort by any of the supported fields.
Endpoint
Query Parameters
The page number to retrieve. Pagination starts at
1.Number of customer records to return per page. Maximum allowed value is
100.Optional search term. When provided, results are filtered to customers whose
user_code or name contain the search string (wildcard partial match, case-insensitive).Filter results to customers assigned to a specific branch location (exact match).
Filter results to a specific courier organization. Admin and manager roles only. Courier role users are automatically scoped to their own courier.
Field to sort results by. Accepted values:
user_code, first_name, last_name, branch, courier_name, created_at, updated_at.Sort direction. Accepted values:
ASC, DESC.Example Request
Response
Response Fields
"success" when the request was processed without error.Array of customer objects matching the search criteria.
Total number of customers matching the search term across all pages.
Get Branch List
Append?action=branches to retrieve the distinct list of branch names available for the authenticated courier. This is useful for populating filter dropdowns in your UI.
Pagination
To iterate through all customers, incrementpage until you have retrieved total records.
The
search filter matches across user_code and customer names simultaneously. A single term like "Jane" will surface matches in any of those fields.