VericredClient - the Ruby gem for the Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor accepts.
Visit our Developer Portal to create an account.
Once you have created an account, you can create one Application for Production and another for our Sandbox (select the appropriate Plan when you create the Application).
Our API follows standard REST conventions, so you can use any HTTP client to integrate with us. You will likely find it easier to use one of our autogenerated SDKs, which we make available for several common programming languages.
To authenticate, pass the API Key you created in the Developer Portal as
a Vericred-Api-Key
header.
curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"
Vericred's API default to the latest version. However, if you need a specific
version, you can request it with an Accept-Version
header.
The current version is v3
. Previous versions are v1
and v2
.
curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"
Endpoints that accept page
and per_page
parameters are paginated. They expose
four additional fields that contain data about your position in the response,
namely Total
, Per-Page
, Link
, and Page
as described in RFC-5988.
For example, to display 5 results per page and view the second page of a
GET
to /networks
, your final request would be GET /networks?....page=2&per_page=5
.
When we return multiple levels of an object graph (e.g. Provider
s and their State
s
we sideload the associated data. In this example, we would provide an Array of
State
s and a state_id
for each provider. This is done primarily to reduce the
payload size since many of the Provider
s will share a State
{
providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
states: [{ id: 1, code: 'NY' }]
}
If you need the second level of the object graph, you can just match the corresponding id.
All endpoints allow you to specify which fields you would like to return. This allows you to limit the response to contain only the data you need.
For example, let's take a request that returns the following JSON by default
{
provider: {
id: 1,
name: 'John',
phone: '1234567890',
field_we_dont_care_about: 'value_we_dont_care_about'
},
states: [{
id: 1,
name: 'New York',
code: 'NY',
field_we_dont_care_about: 'value_we_dont_care_about'
}]
}
To limit our results to only return the fields we care about, we specify the
select
query string parameter for the corresponding fields in the JSON
document.
In this case, we want to select name
and phone
from the provider
key,
so we would add the parameters select=provider.name,provider.phone
.
We also want the name
and code
from the states
key, so we would
add the parameters select=states.name,states.code
. The id field of
each document is always returned whether or not it is requested.
Our final request would be GET /providers/12345?select=provider.name,provider.phone,states.name,states.code
The response would be
{
provider: {
id: 1,
name: 'John',
phone: '1234567890'
},
states: [{
id: 1,
name: 'New York',
code: 'NY'
}]
}
Benefit cost-share strings are formatted to capture:
- Network tiers
- Compound or conditional cost-share
- Limits on the cost-share
- Benefit-specific maximum out-of-pocket costs
Example #1 As an example, we would represent this Summary of Benefits & Coverage as:
-
Hospital stay facility fees:
- Network Provider:
$400 copay/admit plus 20% coinsurance
- Out-of-Network Provider:
$1,500 copay/admit plus 50% coinsurance
- Vericred's format for this benefit:
In-Network: $400 before deductible then 20% after deductible / Out-of-Network: $1,500 before deductible then 50% after deductible
- Network Provider:
-
Rehabilitation services:
- Network Provider:
20% coinsurance
- Out-of-Network Provider:
50% coinsurance
- Limitations & Exceptions:
35 visit maximum per benefit period combined with Chiropractic care.
- Vericred's format for this benefit:
In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period
- Network Provider:
Example #2 In this other Summary of Benefits & Coverage, the specialty_drugs cost-share has a maximum out-of-pocket for in-network pharmacies.
- Specialty drugs:
- Network Provider:
40% coinsurance up to a $500 maximum for up to a 30 day supply
- Out-of-Network Provider
Not covered
- Vericred's format for this benefit:
In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%
- Network Provider:
BNF
Here's a description of the benefits summary string, represented as a context-free grammar:
root ::= coverage
coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_modifier)?
tiered_coverage ::= tier (space slash space tier)*
tier ::= tier_name colon space (tier_coverage | not_applicable)
tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation?
simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)?
coverage_modifier ::= limit_condition colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted | shared_across_tiers)
waived_if_admitted ::= ("copay" space)? "waived if admitted"
simple_limitation ::= pre_coverage_limitation space "copay applies"
tier_name ::= "In-Network-Tier-2" | "Out-of-Network" | "In-Network"
limit_condition ::= "limit" | "condition"
tier_limitation ::= comma space "up to" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)?
coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?)
pre_coverage_limitation ::= first space digits space time_unit plural?
post_coverage_limitation ::= (((then space currency) | "per condition") space)? "per" space (treatment_unit | (integer space time_unit) | time_unit) plural?
coverage_condition ::= ("before deductible" | "after deductible" | "penalty" | allowance | "in-state" | "out-of-state") (space allowance)?
allowance ::= upto_allowance | after_allowance
upto_allowance ::= "up to" space (currency space)? "allowance"
after_allowance ::= "after" space (currency space)? "allowance"
see_carrier_documentation ::= "see carrier documentation for more information"
shared_across_tiers ::= "shared across all tiers"
unknown ::= "unknown"
unlimited ::= /[uU]nlimited/
included ::= /[iI]ncluded in [mM]edical/
time_unit ::= /[hH]our/ | (((/[cC]alendar/ | /[cC]ontract/) space)? /[yY]ear/) | /[mM]onth/ | /[dD]ay/ | /[wW]eek/ | /[vV]isit/ | /[lL]ifetime/ | ((((/[bB]enefit/ plural?) | /[eE]ligibility/) space)? /[pP]eriod/)
treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/
comma ::= ","
colon ::= ":"
semicolon ::= ";"
pipe ::= "|"
slash ::= "/"
plural ::= "(s)" | "s"
then ::= "then" | ("," space) | space
or ::= "or"
and ::= "and"
not_applicable ::= "Not Applicable" | "N/A" | "NA"
first ::= "first"
currency ::= "$" number
percentage ::= number "%"
number ::= float | integer
float ::= digits "." digits
integer ::= /[0-9]/+ (comma_int | under_int)*
comma_int ::= ("," /[0-9]/*3) !"_"
under_int ::= ("_" /[0-9]/*3) !","
digits ::= /[0-9]/+ ("_" /[0-9]/+)*
space ::= /[ \t]/+
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 0.0.11
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build vericred_client.gemspec
Then either install the gem locally:
gem install ./vericred_client-0.0.11.gem
(for development, run gem install --dev ./vericred_client-0.0.11.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'vericred_client', '~> 0.0.11'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'vericred_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'vericred_client'
# Setup authorization
VericredClient.configure do |config|
# Configure API key authorization: Vericred-Api-Key
config.api_key['Vericred-Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Vericred-Api-Key'] = 'Bearer'
end
api_instance = VericredClient::DrugCoveragesApi.new
ndc_package_code = "07777-3105-01" # String | NDC package code
audience = "individual" # String | Plan Audience (individual or small_group)
state_code = "CA" # String | Two-character state code
begin
#Search for DrugCoverages
result = api_instance.get_drug_coverages(ndc_package_code, audience, state_code)
p result
rescue VericredClient::ApiError => e
puts "Exception when calling DrugCoveragesApi->get_drug_coverages: #{e}"
end
All URIs are relative to https://api.vericred.com/
Class | Method | HTTP request | Description |
---|---|---|---|
VericredClient::DrugCoveragesApi | get_drug_coverages | GET /drug_packages/{ndc_package_code}/coverages | Search for DrugCoverages |
VericredClient::DrugPackagesApi | show_formulary_drug_package_coverage | GET /formularies/{formulary_id}/drug_packages/{ndc_package_code} | Formulary Drug Package Search |
VericredClient::DrugsApi | list_drugs | GET /drugs | Drug Search |
VericredClient::FormulariesApi | list_formularies | GET /formularies | Formulary Search |
VericredClient::MedicalPlansApi | find_plans | POST /plans/medical/search | Find Plans |
VericredClient::MedicalPlansApi | show_plan | GET /plans/medical/{id} | Show Plan |
VericredClient::NetworkSizesApi | list_state_network_sizes | GET /states/{state_id}/network_sizes | State Network Sizes |
VericredClient::NetworkSizesApi | search_network_sizes | POST /network_sizes/search | Network Sizes |
VericredClient::NetworksApi | create_network_comparisons | POST /networks/{id}/network_comparisons | Network Comparisons |
VericredClient::NetworksApi | list_networks | GET /networks | Networks |
VericredClient::NetworksApi | show_network | GET /networks/{id} | Network Details |
VericredClient::PlansApi | find_plans | POST /plans/search | Find Plans |
VericredClient::PlansApi | show_plan | GET /plans/{id} | Show Plan |
VericredClient::ProviderNotificationSubscriptionsApi | create_provider_notification_subscription | POST /providers/subscription | Subscribe |
VericredClient::ProviderNotificationSubscriptionsApi | delete_provider_notification_subscription | DELETE /providers/subscription/{nonce} | Unsubscribe |
VericredClient::ProviderNotificationSubscriptionsApi | notify_provider_notification_subscription | POST /CALLBACK_URL | Webhook |
VericredClient::ProvidersApi | get_provider | GET /providers/{npi} | Find a Provider |
VericredClient::ProvidersApi | get_providers | POST /providers/search | Find Providers |
VericredClient::ProvidersApi | get_providers_0 | POST /providers/search/geocode | Find Providers |
VericredClient::ZipCountiesApi | get_zip_counties | GET /zip_counties | Search for Zip Counties |
VericredClient::ZipCountiesApi | show_zip_county | GET /zip_counties/{id} | Show an individual ZipCounty |
- VericredClient::ACAPlan
- VericredClient::ACAPlan2018
- VericredClient::ACAPlan2018SearchResponse
- VericredClient::ACAPlan2018SearchResult
- VericredClient::ACAPlan2018ShowResponse
- VericredClient::ACAPlanPre2018
- VericredClient::ACAPlanPre2018SearchResponse
- VericredClient::ACAPlanPre2018SearchResult
- VericredClient::ACAPlanPre2018ShowResponse
- VericredClient::Base
- VericredClient::BasePlanSearchResponse
- VericredClient::Carrier
- VericredClient::CarrierGroupRequest
- VericredClient::CarrierRequest
- VericredClient::CarrierSubsidiary
- VericredClient::County
- VericredClient::CountyBulk
- VericredClient::DentalPlan
- VericredClient::DentalPlanBenefits
- VericredClient::DentalPlanShowResponse
- VericredClient::DentalPlanUpdate
- VericredClient::DentalPlanUpdateRequest
- VericredClient::Drug
- VericredClient::DrugCoverage
- VericredClient::DrugCoverageResponse
- VericredClient::DrugPackage
- VericredClient::DrugSearchResponse
- VericredClient::Formulary
- VericredClient::FormularyDrugPackageResponse
- VericredClient::FormularyResponse
- VericredClient::IssuerRequest
- VericredClient::Meta
- VericredClient::MetaPlanSearchResponse
- VericredClient::Network
- VericredClient::NetworkComparison
- VericredClient::NetworkComparisonRequest
- VericredClient::NetworkComparisonResponse
- VericredClient::NetworkDetails
- VericredClient::NetworkDetailsResponse
- VericredClient::NetworkSearchResponse
- VericredClient::NetworkSize
- VericredClient::NotificationSubscription
- VericredClient::NotificationSubscriptionResponse
- VericredClient::Plan
- VericredClient::PlanCounty
- VericredClient::PlanCountyBulk
- VericredClient::PlanDeleted
- VericredClient::PlanIdentifier
- VericredClient::PlanMedicare
- VericredClient::PlanMedicareBulk
- VericredClient::PlanPricingMedicare
- VericredClient::PlanSearchResponse
- VericredClient::PlanShowResponse
- VericredClient::Provider
- VericredClient::ProviderDetails
- VericredClient::ProviderGeocode
- VericredClient::ProviderNetworkEventNotification
- VericredClient::ProviderShowResponse
- VericredClient::ProvidersGeocodeResponse
- VericredClient::ProvidersSearchResponse
- VericredClient::RateRequest
- VericredClient::RatingArea
- VericredClient::RequestPlanFind
- VericredClient::RequestPlanFindApplicant
- VericredClient::RequestPlanFindDrugPackage
- VericredClient::RequestPlanFindProvider
- VericredClient::RequestProviderNotificationSubscription
- VericredClient::RequestProvidersSearch
- VericredClient::RxCuiIdentifier
- VericredClient::RxCuiIdentifierSearchResponse
- VericredClient::ServiceArea
- VericredClient::ServiceAreaZipCounty
- VericredClient::State
- VericredClient::StateNetworkSizeRequest
- VericredClient::StateNetworkSizeResponse
- VericredClient::VisionPlan
- VericredClient::VisionPlanBenefits
- VericredClient::VisionPlanShowResponse
- VericredClient::VisionPlanUpdate
- VericredClient::VisionPlanUpdateRequest
- VericredClient::ZipCode
- VericredClient::ZipCountiesResponse
- VericredClient::ZipCounty
- VericredClient::ZipCountyBulk
- VericredClient::ZipCountyResponse
- Type: API key
- API key parameter name: Vericred-Api-Key
- Location: HTTP header