# rxfoundry.clients.swifty_api.PharmacyApi All URIs are relative to */api* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_pharmacies**](PharmacyApi.md#get_pharmacies) | **GET** /swifty/1/pharmacies | Get all pharmacies [**get_pharmacy**](PharmacyApi.md#get_pharmacy) | **GET** /swifty/1/pharmacies/{pharmacy_id} | Get a pharmacy by UUID or NPI # **get_pharmacies** > List[Pharmacy] get_pharmacies(q=q, networks=networks, near=near, distance=distance, pricing_program=pricing_program, page=page, results_per_page=results_per_page, deep=deep) Get all pharmacies ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy from rxfoundry.clients.swifty_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to /api # See configuration.py for a list of all supported configuration parameters. configuration = rxfoundry.clients.swifty_api.Configuration( host = "/api" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization (opaque): opaque_token configuration = rxfoundry.clients.swifty_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with rxfoundry.clients.swifty_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rxfoundry.clients.swifty_api.PharmacyApi(api_client) q = 'q_example' # str | Filter medications by query. Searches on NPI, first name, last name, practice address street one, practice address city, practice address state, pharmacy networks and taxonomy codes. Takes precedence over other filters if set to anything other that '*' (optional) networks = ['networks_example'] # List[str] | Filter pharmacies by network(s) using the network names. q has to be set to '*' for this to work. (optional) near = 'near_example' # str | The lat,lon to search near. q has to be set to '*' for this to work and distance has to be set. (optional) distance = 56 # int | The distance to search, in miles from the lat,lon location. q has to be set to '*' for this to work. (optional) pricing_program = 'pricing_program_example' # str | The pricing program to return pricing program data for. Only one pricing program can be passed in at a time. (optional) page = 1 # int | Page number to return. Defaults to 1. (optional) (default to 1) results_per_page = 10 # int | Number of results to return per page. Defaults to 10. (optional) (default to 10) deep = False # bool | Returned contained objects for the pharmacy or just minimal information. Defaults to false. (optional) (default to False) try: # Get all pharmacies api_response = api_instance.get_pharmacies(q=q, networks=networks, near=near, distance=distance, pricing_program=pricing_program, page=page, results_per_page=results_per_page, deep=deep) print("The response of PharmacyApi->get_pharmacies:\n") pprint(api_response) except Exception as e: print("Exception when calling PharmacyApi->get_pharmacies: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q** | **str**| Filter medications by query. Searches on NPI, first name, last name, practice address street one, practice address city, practice address state, pharmacy networks and taxonomy codes. Takes precedence over other filters if set to anything other that '*' | [optional] **networks** | [**List[str]**](str.md)| Filter pharmacies by network(s) using the network names. q has to be set to '*' for this to work. | [optional] **near** | **str**| The lat,lon to search near. q has to be set to '*' for this to work and distance has to be set. | [optional] **distance** | **int**| The distance to search, in miles from the lat,lon location. q has to be set to '*' for this to work. | [optional] **pricing_program** | **str**| The pricing program to return pricing program data for. Only one pricing program can be passed in at a time. | [optional] **page** | **int**| Page number to return. Defaults to 1. | [optional] [default to 1] **results_per_page** | **int**| Number of results to return per page. Defaults to 10. | [optional] [default to 10] **deep** | **bool**| Returned contained objects for the pharmacy or just minimal information. Defaults to false. | [optional] [default to False] ### Return type [**List[Pharmacy]**](Pharmacy.md) ### Authorization [opaque_token](../README.md#opaque_token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A list of all pharmacies | * X-Total-Count - Total number of prescriptions available
* X-Page - Current page number
* X-Per-Page - Number of prescriptions per page
* X-Total-Pages - Total number of pages available
* X-Scores - A dictionary of search scores for each prescriber
| **404** | No pharmacies found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_pharmacy** > Pharmacy get_pharmacy(pharmacy_id) Get a pharmacy by UUID or NPI ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy from rxfoundry.clients.swifty_api.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to /api # See configuration.py for a list of all supported configuration parameters. configuration = rxfoundry.clients.swifty_api.Configuration( host = "/api" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization (opaque): opaque_token configuration = rxfoundry.clients.swifty_api.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with rxfoundry.clients.swifty_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rxfoundry.clients.swifty_api.PharmacyApi(api_client) pharmacy_id = 'pharmacy_id_example' # str | Either UUID or NPI of the pharmacy try: # Get a pharmacy by UUID or NPI api_response = api_instance.get_pharmacy(pharmacy_id) print("The response of PharmacyApi->get_pharmacy:\n") pprint(api_response) except Exception as e: print("Exception when calling PharmacyApi->get_pharmacy: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pharmacy_id** | **str**| Either UUID or NPI of the pharmacy | ### Return type [**Pharmacy**](Pharmacy.md) ### Authorization [opaque_token](../README.md#opaque_token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A single pharmacy | - | **404** | No pharmacy found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)