The admin endpoints are designed for managing access tokens within our system. These endpoints can only be called using a valid API key. They provide a secure way to generate and manage tokens, ensuring that only authorized users can access sensitive data and functionalities.
Get Access Token
GEThttps://sandbox.cardscan.ai/v1/access-token
This endpoint generates the JSON Web Token (JWT) for a web or mobile user
Query Parameters
Name
Type
Description
user_id
String
Unique identifier for the user
This endpoint generates a short-lived session token that the web/mobile user will use to directly authenticate with CardScan's servers. See the Authentication page for more details.
This function takes an optional user_id which must be unique between your users.
Signed URLs for accessing the uploaded card images. URLs are valid for 24 hours.
{"front": {"url": "https://..."}}
deleted
Boolean indicating whether this card has been marked as deleted.
false
Note: If an element is missing from the details object, it means it is either not available on this type of card, or we did not have a high enough confidence to return it.
This endpoint allows you to flag a specific card with a particular type of flag. Flags are used to mark cards for special attention or action.
Path Parameters
Name
Type
Description
cardId*
String
UUID of the card
Request Body
Name
Type
Allowed values
Description
flag_type*
String
missing_elements
incorrect_elements
bad_payer_match
unreadable_text
eligibility_issue
other
The flag type used to mark the card
message
String
An optional message to add additional information
Magic Links
Generate magic link
GET/generate-magic-link
Generates a magic link for the currently authenticated user. The generated token expires in one hour. This endpoint is called by the React Widget when using the Web To Mobile Handoff feature.
Validate magic link
GET/validate-magic-link?token=<magic-token>
Validates that the provided magic link token is valid and if so, returns an Access Token with limited capabilities. You need to use this endpoint if you want to self-host the Web To Mobile Handoff feature.
Eligibility Verification
Our Eligibility Verification Endpoints offer a seamless way to check the insurance eligibility of patients. They provide real-time verification of coverage details, ensuring accurate and efficient processing of healthcare services.
Our Eligibility Verification Endpoints operate similarly to our Insurance Card Scanning Endpoints. Users can create a new eligibility request, which is processed asynchronously. The system updates the record as the state changes, providing real-time insights into insurance coverage and benefits.
Note: Currently a completed insurance card scan is required to start the eligibility verification process.
Create Eligibility Record
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
card_idstring Β· uuidRequired
The ID of the card.
Responses
201
Eligibility record created
application/json
400
Missing properties in the request body
application/json
401
Unauthorized
application/json
404
Card not found
application/json
500
Internal Error response
application/json
post
/eligibility
To create an eligibility request, users must provide subscriber and dependent demographics along with provider details, including a National Provider Identifier (NPI). This information is essential for accurately verifying insurance eligibility.
// The JS client wraps generate-upload-url in with the file upload functionality.
const client = new CardScanApi({
sessionToken:token,
live: false
});
client.uploadCardImage(file)
.then((cardId) => {
//update UI.
})
.catch((error) => {
//retry or update UI
});
// The swift client wraps generate-upload-url with the file upload functionality.
let apiClient = CardScanAPIClient(userToken: userToken, live: false)
apiClient.uploadCardImage(image: image) { result in
switch result {
case .failure(let error):
//check error, retry, update UI.
print("uploadCardImage error \(error)")
case .success(let cardId):
//update UI for success!
}
}
let apiClient = CardScanAPIClient(userToken: userToken, live: false)
apiClient.listCards(limit: 10) { result in
switch result {
case .failure(let error):
print("listCards error \(error)")
case .success(let cards):
//update UI
}
}
let apiClient = CardScanAPIClient(userToken: userToken, live: false)
apiClient.getCard(cardUUID: cardId) { result in
switch result {
case .failure(let error):
print("getCard error \(error)")
case .success(let card):
//update UI
}
}