Ruby SDK
Official Verity SDK for Ruby with resource-oriented API clients
The Verity Ruby SDK provides resource-oriented access to Medicare and commercial coverage intelligence, medical code lookup, policies, coverage criteria, prior authorization checks, spending data, and webhooks.
Installation
gem install verity-sdkRequires Ruby 2.7+.
Quick Start
require 'verity'
client = Verity::Client.new(api_key: 'vrt_live_YOUR_API_KEY')
health = client.health
puts health.dig('data', 'status')Get your API key from the Developer Console.
Authentication
client = Verity::Client.new(
api_key: ENV.fetch('VERITY_API_KEY'),
base_url: 'https://verity.backworkai.com/api/v1'
)Common Use Cases
Look Up a Medical Code
result = client.codes.lookup('76942', include: ['rvu', 'policies'])
data = result['data']
puts "#{data['code']}: #{data['description']}"
puts "Policies: #{data['policies']&.length || 0}"Search Policies
result = client.policies.list(
q: 'ultrasound guidance',
mode: 'keyword',
policy_type: 'LCD',
jurisdiction: 'JM',
limit: 10
)
result['data'].each do |policy|
puts "#{policy['policy_id']}: #{policy['title']}"
endCheck Prior Authorization
result = client.prior_auth.check(
procedure_codes: ['27447'],
diagnosis_codes: ['M17.11'],
state: 'TX',
payer: 'Medicare'
)
data = result['data']
puts "PA required: #{data['pa_required']}"
puts "Reason: #{data['reason']}"Resources
- GitHub: backworkai/verity-ruby
- API Reference: All Endpoints
- Issues: Report a bug
Last updated on