All merchant endpoints require a valid Bearer token in the
Authorization header.List merchants
GET /v2/merchant_list
Returns a paginated list of all DOSS-enabled merchants. The client sorts results by distance from the user’s GPS location and supports infinite scroll with fetchNextPage.
Query parameters
The page number to fetch. Defaults to
1.Response
Array of merchant objects for the current page.
The current page number.
The total number of pages available.
Total number of merchant records across all pages.
Usage in the app
The Merchant Locations screen usesuseGetMethod with the merchant_list endpoint key. After fetching, the client:
- Calculates the distance from the user’s GPS coordinates to each merchant using the
useDistancehook. - Sorts the merchant array from nearest to furthest using
lodash/sortBy. - Applies a client-side name filter using
lodash/filterwhen a search term is entered.
Merchant.jsx