Baton Health GraphQL API Reference

Welcome to Baton Health's GraphQL API! This documentation contains a complete set of GraphQL types, queries, mutations, and their parameters needed to obtain credentialing data. Please note, these are our current PUBLIC endpoints.

API Endpoints
https://api.batonhealth.com/graphql
Headers
# Your API token from the dashboard. Must be included in all API calls.
Authorization: <YOUR_TOKEN_HERE>

API Authentication

To obtain your API Token, please contact a member of our support team. They will assist you with the process and provide the necessary credentials.

Once you have received your API Token, you can access Baton's API by including the token in the "Authorization" header of your requests. The header should be formatted as follows:

Authorization: YOUR_API_TOKEN

Ensure that you replace YOUR_API_TOKEN with the actual token provided to you. This token must be included in all requests to authenticate and authorize access to the API endpoints.

If you encounter any issues or have further questions about authentication, please contact our support team for assistance.

Notes

Anywhere the documentation notes a "Fragment", please refer to that type definition for all fields that can be included in that request.

Queries

createRosterItems

Description

Performs an atomic bulk insert of multiple roster items. If the input exceeds the maximum allowed records of 25, a ForbiddenException is thrown. Returns a success status upon completion.

Response

Returns a CreateRosterItemsResponse!

Arguments
Name Description
input - [CreateRosterItemInput!]! To add roster items, a rosterId and practitionerId is required. The practitionerId is searchable via the getPractitioner query

Example

Query
query CreateRosterItems($input: [CreateRosterItemInput!]!) {
  createRosterItems(input: $input) {
    success
  }
}
Variables
{
  "input": {
    "rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b",
    "practitionerId": "01fc83d8-5878-454a-8914-7414b4aef73d"
  }
}
Response
{"data": {"createRosterItems": {"success": false}}}

getPractitioner

Description

Fetch a single Practitioner and all subsequential data related to them, including License

Response

Returns a Practitioner!

Arguments
Name Description
input - GetPractitionerInput! To find a practitioner, GetPractitioner requires an input of filter with NPI. See GetPractitionerInput

Example

Query
query GetPractitioner($input: GetPractitionerInput!) {
  getPractitioner(input: $input) {
    id
    npi
    businessName
    fullName
    firstName
    middleName
    lastName
    mailingAddressPhoneNumber
    practiceLocationAddressLine1
    practiceLocationAddressLine2
    practiceLocationAddressCity
    practiceLocationAddressState
    practiceLocationAddressZipcode
    mailingAddressLine1
    mailingAddressLine2
    mailingAddressCity
    mailingAddressState
    mailingAddressZipcode
    professionCode
    degree
    canPrescribe
    email
    primaryWorkingSetting
    acceptingNewPatients
    acceptsMedicaid
    translationServicesAvailable
    insurancePlansAccepted
    hospitalAffiliations
    race
    ethnicity
    age
    birthyear
    continuingEducationDueDate
    specialties
    suffix
    gender
    hadBoardAction
    concatenatedLicenseStates
    activeLicenseStates
    licenseStatesCount
    licenses {
      ...LicenseFragment
    }
    otherPossibleLicenses {
      ...LicenseFragment
    }
    practitionerType
    practitionerSpecialty
  }
}
Variables
{"input": {"filter": {"npi": "1962402099"}}}
Response
{
  "data": {
    "getPractitioner": {
      "id": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
      "npi": "1962402099",
      "businessName": "null",
      "fullName": "Paul Alexander Skaff",
      "firstName": "Paul",
      "middleName": "Alexander",
      "lastName": "Skaff",
      "mailingAddressPhoneNumber": "3045453548",
      "practiceLocationAddressLine1": "1000 36TH ST",
      "practiceLocationAddressLine2": "null",
      "practiceLocationAddressCity": "VERO BEACH",
      "practiceLocationAddressState": "FL",
      "practiceLocationAddressZipcode": "329604862",
      "mailingAddressLine1": "1000 36TH ST",
      "mailingAddressLine2": "null",
      "mailingAddressCity": "VERO BEACH",
      "mailingAddressState": "FL",
      "mailingAddressZipcode": "329604862",
      "professionCode": "null",
      "degree": "null",
      "canPrescribe": "false",
      "email": "null",
      "primaryWorkingSetting": "null",
      "acceptingNewPatients": "unknown",
      "acceptsMedicaid": "unknown",
      "translationServicesAvailable": "unknown",
      "insurancePlansAccepted": "null",
      "hospitalAffiliations": "null",
      "race": "null",
      "ethnicity": "null",
      "age": "null",
      "birthyear": "null",
      "continuingEducationDueDate": "null",
      "specialties": "Anesthesiology",
      "suffix": "null",
      "gender": "M",
      "hadBoardAction": "unknown",
      "concatenatedLicenseStates": "FL, SC, WV",
      "activeLicenseStates": "null",
      "licenseStatesCount": "3",
      "licenses": [
        {
          "id": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
          "licenseNumber": "16028",
          "licenseState": "WV"
        },
        {
          "id": "69df08d0-f7af-5487-bd99-ec268567351c",
          "licenseNumber": "141517",
          "licenseState": "FL"
        }
      ],
      "otherPossibleLicenses": [License],
      "practitionerType": "null",
      "practitionerSpecialty": "null"
    }
  }
}

getRosterItems

Description

Get roster-items (practitioners) associated with a rosterId

Response

Returns a PaginatedRosterItems!

Arguments
Name Description
input - GetRosterItemsInput! To get a list of practitioners and thier properties inside of a roster, getRosterITems requires an input of pagination as well as a filter. The filter requires rosterId, but can also accept npi and licenseStates to filter results.

Example

Query
query GetRosterItems($input: GetRosterItemsInput!) {
  getRosterItems(input: $input) {
    items {
      ...RosterItemResponseFragment
    }
    hasNextPage
  }
}
Variables
{
  "input": {
    "pagination": {"skip": "0", "take": "20"},
    "filter": {"rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b"}
  }
}
Response
{
  "data": {
    "getRosterItems": {
      "items": [
        {
          "id": "468226f9-01c9-4ea2-9d30-c71b6cb02b1e",
          "practitioner": {
            "npi": "1417000233",
            "fullName": "Judd Steuber II",
            "hadBoardAction": null,
            "licenses": [
              {
                "id": "a64e05f3-dae4-46ff-8c1b-3d9c2076d5df",
                "issueDate": "1988-08-17",
                "licenseId": null,
                "licenseNumber": "8827827071",
                "expirationDate": "2025-02-17",
                "licenseState": "CA",
                "licenseType": "Customer Tactics Engineer"
              }
            ]
          }
        },
        {
          "id": "57a33bd6-f8d1-4821-8a5d-080adf414197",
          "practitioner": {
            "npi": "8368177641",
            "fullName": "Ryleigh Wunsch",
            "hadBoardAction": null,
            "licenses": [
              {
                "id": "044c964f-b88a-456a-b7e2-00ab91adfdae",
                "issueDate": "1984-08-17",
                "licenseId": null,
                "licenseNumber": "2080314743",
                "expirationDate": "2026-08-17",
                "licenseState": "AR",
                "licenseType": "Forward Creative Facilitator"
              }
            ]
          }
        }
      ],
      "hasNextPage": false
    }
  }
}

getRosters

Description

Get a list of Rosters

Response

Returns a PaginatedRosters!

Arguments
Name Description
input - GetRostersInput! To get a list of rosters, GetRosters requires an input of pagination. This is to allow returning any number of rosters a team may have.

Example

Query
query GetRosters($input: GetRostersInput!) {
  getRosters(input: $input) {
    items {
      ...RosterResponseFragment
    }
    hasNextPage
  }
}
Variables
{"input": {"pagination": {"skip": "0", "take": "20"}}}
Response
{
  "data": {
    "getRosters": {
      "items": [
        {
          "id": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b",
          "name": "Personal Roster"
        }
      ],
      "hasNextPage": false
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false.

CreateRosterItemInput

Fields
Input Field Description
rosterId - String! The unique identifier of the associated roster.
practitionerId - String! The unique identifier of the associated practitioner.
Example
{
  "rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b",
  "practitionerId": "01fc83d8-5878-454a-8914-7414b4aef73d"
}

CreateRosterItemsResponse

Fields
Field Name Description
success - Boolean! Indicates whether the deletion of the roster was successful.
Example
{"success": false}

DateTime

Description

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

Example
"2019-10-07T01:08:03.420Z"

GetPractitionerFilterInput

Fields
Input Field Description
npi - String! Pass a practitioner's NPI
Example
{"npi": "1962402099"}

GetPractitionerInput

Fields
Input Field Description
filter - GetPractitionerFilterInput! GetPractitioner requires a filter that uses NPI.
Example
{"filter": {"npi": "1962402099"}}

GetRosterItemsFilterInput

Fields
Input Field Description
rosterId - String! The unique identifier of the roster to filter the roster items by. This field is required.
npi - String The National Provider Identifier (NPI) of the practitioner. Must be exactly 10 characters long.
licenseStates - [String!] A list of license states to filter the roster items by. Only items matching these states will be included in the results.
Example
{
  "rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b",
  "npi": "1417000233",
  "licenseStates": ["CA", "AZ", "AR"]
}

GetRosterItemsInput

Fields
Input Field Description
filter - GetRosterItemsFilterInput
pagination - PaginationInput!
Example
{
  "filter": {"rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b"},
  "pagination": {"skip": "0", "take": "20"}
}

GetRostersInput

Fields
Input Field Description
pagination - PaginationInput!
Example
{"pagination": {"skip": "0", "take": "20"}}

HadBoardActionMapped

Values
Enum Value Description

TRUE

FALSE

UNKNOWN

PENDING

Example
"TRUE"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

License

Description

Licenses

Fields
Field Name Description
id - String!
primarySourceId - String Baton Generated ID of a primary source.
licenseNumber - String
npi - String Practitioner individual NPI number.
professionCode - String Profession code states use to identify the type of license being issued by a state licensing board.
degree - String Degree earned at an educational institution.
licenseType - String
canPrescribe - String Practitioner is licensed to prescribe. Designated issued by certain state (FL).
renewalDate - String License renewal date. Some states use this as a date that licenses must be renewed by and may be different than the actual expiration date.
statusEffectiveDate - String License effective date. This is not to be confused with the issue date and should only be mapped as such when an issue date has already been mapped.
hadBoardActionRaw - String Indicates whether a board action is present as a raw value.
hadBoardActionMapped - HadBoardActionMapped Indicates whether a board action is present as a mapped value.
scriptId - String Baton generated ID of the script that created the record.
deeplink - String URL pattern with merge tags to dynamically generate a deeplink to the primary source.
screenshotUrl - String System generated URL of the screenshot hosted in S3 of the provider license at time of scrape.
businessName - String Name of business or practice that is either the licensed entity or the business or practice the licensed practitioner works for.
county - String County of primary practice address.
mailingAddressLine2 - String
mailingAddressCity - String
mailingAddressAreaCode - String
mailingAddressPhoneNumber - String
mailingAddressPhoneExtension - String
practiceLocationAddressLine1 - String
practiceLocationAddressLine2 - String
practiceLocationAddressCity - String
practiceLocationAddressState - String
practiceLocationAddressZipcode - String
email - String
primaryWorkingSetting - String
acceptingNewPatients - String
acceptsMedicaid - String
translationServicesAvailable - String
insurancePlansAccepted - String
hospitalAffiliations - String
race - String
ethnicity - String
age - String
birthYear - String
continuingEducationDueDate - String
specialtiesRaw - String
refreshTimestamp - String Timestamp from when data was last scraped and ingested to the platform.
licenseId - String Unique ID number issued by some states. This is not the same as the License Number.
sourceId - String Baton Generated ID of a primary source.
licenseState - String
fullName - String
suffix - String
firstName - String
middleName - String
lastName - String
gender - String
issueDate - String Date license was originally issued.
expirationDate - String Date license is currently scheduled to expire.
verificationDate - String Freshness date provided by primary source.
statusRaw - String Status of a license at time of verification.
practitionerTypeRaw - String
practitionerTypeMapped - String
mailingAddressLine1 - String
mailingAddressState - String
mailingAddressZipcode - String
statusMapped - String Status of a license at time of verification.
specialtiesMapped - String
firstNameParsed - String
middleNameParsed - String
lastNameParsed - String
suffixNameParsed - String
fullNameParsed - String
primarySource - PrimarySourceExtension
Example
{
  "id": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
  "primarySourceId": "wv_lic_004",
  "licenseNumber": "16028",
  "npi": "1962402099",
  "professionCode": "null",
  "degree": "null",
  "licenseType": "MD",
  "canPrescribe": "true",
  "renewalDate": "2024-12-31",
  "statusEffectiveDate": "2023-01-01",
  "hadBoardActionRaw": "unknown",
  "hadBoardActionMapped": "PENDING",
  "scriptId": "null",
  "deeplink": "null",
  "screenshotUrl": "null",
  "businessName": "null",
  "county": "null",
  "mailingAddressLine2": "null",
  "mailingAddressCity": "VERO BEACH",
  "mailingAddressAreaCode": "null",
  "mailingAddressPhoneNumber": "3045453548",
  "mailingAddressPhoneExtension": "null",
  "practiceLocationAddressLine1": "1000 36TH ST",
  "practiceLocationAddressLine2": "null",
  "practiceLocationAddressCity": "VERO BEACH",
  "practiceLocationAddressState": "FL",
  "practiceLocationAddressZipcode": "329604862",
  "email": "null",
  "primaryWorkingSetting": "null",
  "acceptingNewPatients": "unknown",
  "acceptsMedicaid": "unknown",
  "translationServicesAvailable": "unknown",
  "insurancePlansAccepted": "null",
  "hospitalAffiliations": "null",
  "race": "null",
  "ethnicity": "null",
  "age": "null",
  "birthYear": "null",
  "continuingEducationDueDate": "null",
  "specialtiesRaw": "Anesthesiology",
  "refreshTimestamp": "2024-08-10T00:00:00Z",
  "licenseId": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
  "sourceId": "wv_lic_004",
  "licenseState": "WV",
  "fullName": "Paul Alexander Skaff",
  "suffix": "Jr.",
  "firstName": "Paul",
  "middleName": "Alexander",
  "lastName": "Skaff",
  "gender": "M",
  "issueDate": "2020-01-01",
  "expirationDate": "2024-12-31",
  "verificationDate": "2023-08-15",
  "statusRaw": "Active",
  "practitionerTypeRaw": "null",
  "practitionerTypeMapped": "null",
  "mailingAddressLine1": "1000 36TH ST",
  "mailingAddressState": "FL",
  "mailingAddressZipcode": "329604862",
  "statusMapped": "Active",
  "specialtiesMapped": "Anesthesiology",
  "firstNameParsed": "Paul",
  "middleNameParsed": "Alexander",
  "lastNameParsed": "Skaff",
  "suffixNameParsed": "Jr.",
  "fullNameParsed": "Paul Alexander Skaff",
  "primarySource": {
    "organization": "West Virginia Board of Medicine",
    "state": "West Virginia",
    "logoUrl": "https://baton-prd-static-files.s3.amazonaws.com/Seal_of_West_Virginia.svg",
    "url": "https://wvbom.wv.gov/public/search/index.asp",
    "id": "wv_lic_004"
  }
}

PaginatedRosterItems

Fields
Field Name Description
items - [RosterItemResponse!]!
hasNextPage - Boolean!
Example
{
  "items": [
    {
      "id": "468226f9-01c9-4ea2-9d30-c71b6cb02b1e",
      "practitioner": {
        "npi": "1417000233",
        "fullName": "Judd Steuber II",
        "hadBoardAction": null,
        "licenses": [
          {
            "id": "a64e05f3-dae4-46ff-8c1b-3d9c2076d5df",
            "issueDate": "1988-08-17",
            "licenseId": null,
            "licenseNumber": "8827827071",
            "expirationDate": "2025-02-17",
            "licenseState": "CA",
            "licenseType": "Customer Tactics Engineer"
          }
        ]
      }
    },
    {
      "id": "57a33bd6-f8d1-4821-8a5d-080adf414197",
      "practitioner": {
        "npi": "8368177641",
        "fullName": "Ryleigh Wunsch",
        "hadBoardAction": null,
        "licenses": [
          {
            "id": "044c964f-b88a-456a-b7e2-00ab91adfdae",
            "issueDate": "1984-08-17",
            "licenseId": null,
            "licenseNumber": "2080314743",
            "expirationDate": "2026-08-17",
            "licenseState": "AR",
            "licenseType": "Forward Creative Facilitator"
          }
        ]
      }
    }
  ],
  "hasNextPage": true
}

PaginatedRosters

Fields
Field Name Description
items - [RosterResponse!]
hasNextPage - Boolean!
Example
{
  "items": [
    {"id": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b", "name": "Personal Roster"}
  ],
  "hasNextPage": true
}

PaginationInput

Description

Pagination Input

Fields
Input Field Description
skip - Int! The number of records to skip, used for pagination. Must be 0 or greater. Default = 0
take - Int! The number of records to take, used for pagination. Must be between 1 and 100. Default = 20
Example
{"skip": 0, "take": 20}

Practitioner

Description

Practitioner

Fields
Field Name Description
id - String!
npi - String Practitioner individual NPI number.
businessName - String Name of business or practice that is either the licensed entity or the business or practice the licensed practitioner works for.
fullName - String
firstName - String
middleName - String
lastName - String
mailingAddressPhoneNumber - String
practiceLocationAddressLine1 - String
practiceLocationAddressLine2 - String
practiceLocationAddressCity - String
practiceLocationAddressState - String
practiceLocationAddressZipcode - String
mailingAddressLine1 - String
mailingAddressLine2 - String
mailingAddressCity - String
mailingAddressState - String
mailingAddressZipcode - String
professionCode - String Profession code states use to identify the type of license being issued by a state licensing board.
degree - String Degree earned at an educational institution.
canPrescribe - String Practitioner is licensed to prescribe. Designated issued by certain state (FL).
email - String
primaryWorkingSetting - String
acceptingNewPatients - String
acceptsMedicaid - String
translationServicesAvailable - String
insurancePlansAccepted - String
hospitalAffiliations - String
race - String
ethnicity - String
age - String
birthyear - String
continuingEducationDueDate - String
specialties - String List of practitioner certified specialties.
suffix - String
gender - String
hadBoardAction - String Indicates whether a board action is present.
concatenatedLicenseStates - String
activeLicenseStates - String
licenseStatesCount - String
licenses - [License!]
otherPossibleLicenses - [License]
practitionerType - String
practitionerSpecialty - String
Example
{
  "id": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
  "npi": "1962402099",
  "businessName": "null",
  "fullName": "Paul Alexander Skaff",
  "firstName": "Paul",
  "middleName": "Alexander",
  "lastName": "Skaff",
  "mailingAddressPhoneNumber": "3045453548",
  "practiceLocationAddressLine1": "1000 36TH ST",
  "practiceLocationAddressLine2": "null",
  "practiceLocationAddressCity": "VERO BEACH",
  "practiceLocationAddressState": "FL",
  "practiceLocationAddressZipcode": "329604862",
  "mailingAddressLine1": "1000 36TH ST",
  "mailingAddressLine2": "null",
  "mailingAddressCity": "VERO BEACH",
  "mailingAddressState": "FL",
  "mailingAddressZipcode": "329604862",
  "professionCode": "null",
  "degree": "null",
  "canPrescribe": "false",
  "email": "null",
  "primaryWorkingSetting": "null",
  "acceptingNewPatients": "unknown",
  "acceptsMedicaid": "unknown",
  "translationServicesAvailable": "unknown",
  "insurancePlansAccepted": "null",
  "hospitalAffiliations": "null",
  "race": "null",
  "ethnicity": "null",
  "age": "null",
  "birthyear": "null",
  "continuingEducationDueDate": "null",
  "specialties": "Anesthesiology",
  "suffix": "null",
  "gender": "M",
  "hadBoardAction": "unknown",
  "concatenatedLicenseStates": "FL, SC, WV",
  "activeLicenseStates": "null",
  "licenseStatesCount": "3",
  "licenses": [
    {
      "id": "40a6419b-6a42-5de3-8299-ccb4c85aaff3",
      "licenseNumber": "16028",
      "licenseState": "WV"
    },
    {
      "id": "69df08d0-f7af-5487-bd99-ec268567351c",
      "licenseNumber": "141517",
      "licenseState": "FL"
    }
  ],
  "otherPossibleLicenses": [License],
  "practitionerType": "null",
  "practitionerSpecialty": "null"
}

PrimarySourceExtension

Description

primarySourceExtension

Fields
Field Name Description
organization - String
state - String
logoUrl - String
url - String
id - String!
Example
{
  "organization": "West Virginia Board of Medicine",
  "state": "West Virginia",
  "logoUrl": "https://baton-prd-static-files.s3.amazonaws.com/Seal_of_West_Virginia.svg",
  "url": "https://wvbom.wv.gov/public/search/index.asp",
  "id": "wv_lic_004"
}

RosterItemResponse

Fields
Field Name Description
id - String! The unique identifier of the roster item.
practitionerId - String! The unique identifier of the associated practitioner.
practitioner - Practitioner! The practitioner associated with this roster item.
rosterId - String! The unique identifier of the associated roster.
createdAt - DateTime! The date and time when the roster item was created.
updatedAt - DateTime! The date and time when the roster item was last updated.
Example
{
  "id": "468226f9-01c9-4ea2-9d30-c71b6cb02b1e",
  "practitionerId": "1417000233",
  "practitioner": {
    "npi": "1417000233",
    "fullName": "Judd Steuber II",
    "hadBoardAction": null,
    "licenses": [
      {
        "id": "a64e05f3-dae4-46ff-8c1b-3d9c2076d5df",
        "issueDate": "1988-08-17",
        "licenseId": null,
        "licenseNumber": "8827827071",
        "expirationDate": "2025-02-17",
        "licenseState": "CA",
        "licenseType": "Customer Tactics Engineer"
      }
    ]
  },
  "rosterId": "6d8098a6-228f-4803-b2c3-28ae2fc15a0b",
  "createdAt": "2024-01-01T12:00:00Z",
  "updatedAt": "2024-01-02T12:00:00Z"
}

RosterResponse

Description

Roster

Fields
Field Name Description
id - String! A unique identifier for the record, generated automatically in UUID format.
name - String This field can store up to 150 characters. It's designed for short to medium-length text, such as names or titles. While it allows for flexibility, keeping the value under 150 characters is recommended for consistency and optimal performance.
createdAt - DateTime! This field records the creation timestamp in UTC. The format includes the date, time, and time zone offset.
updatedAt - DateTime! This field tracks the last update timestamp in UTC. The format includes the date, time, and time zone offset.
Example
{
  "id": "d7e6b9f8-b05e-4b9a-9e91-4f0dffbf5c2f",
  "name": "Personal Roster",
  "createdAt": "2024-01-01T12:00:00Z",
  "updatedAt": "2024-01-02T12:00:00Z"
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"