Search pharmacies
Search pharmacies near a location, optionally by name.
SDK method: client.pharmacy.search() in TypeScript and Python. client is the base client, which needs no user ID.
/pharmacy/search/Search pharmacies near a location, optionally by name.
latitude and longitude are required. Provide searchTerm to match pharmacy names; without it, results are ranked by proximity. Provide state to limit the results to one US state. Use the returned ncpdpId when saving a user's preferred pharmacy. This operation requires an organization Bearer token.
Authorization
HTTPBearer In: header
Header Parameters
Unique key for safely retrying this mutation for 24 hours. Reuse the same key only with the same request payload.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for searching pharmacies, used to route any prescriptions resulting from an appointment.
latitude and longitude are always required. search_term is optional; when
omitted, results are sorted by proximity to the given location. state optionally
filters results to a single US state.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/pharmacy/search/" \ -H "Content-Type: application/json" \ -d '{ "latitude": -90, "longitude": -180 }'{ "code": "success", "message": "Request successful", "data": { "pharmacies": [ { "name": "string", "ncpdpId": "string", "address": { "line1": "string", "city": "string", "state": "string", "postalCode": "string" }, "phoneNumber": "string", "distanceMiles": 0 } ] }}