Create Superbill
curl --request POST \
--url https://api.decodahealth.com/billing/patient/{patient_id}/superbills \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"chargeIds": [
"<string>"
],
"name": "<string>",
"eventId": "<string>",
"eventIds": [],
"coverageIds": [],
"noteId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/billing/patient/{patient_id}/superbills"
payload = {
"chargeIds": ["<string>"],
"name": "<string>",
"eventId": "<string>",
"eventIds": [],
"coverageIds": [],
"noteId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chargeIds: ['<string>'],
name: '<string>',
eventId: '<string>',
eventIds: [],
coverageIds: [],
noteId: '<string>'
})
};
fetch('https://api.decodahealth.com/billing/patient/{patient_id}/superbills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/billing/patient/{patient_id}/superbills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chargeIds' => [
'<string>'
],
'name' => '<string>',
'eventId' => '<string>',
'eventIds' => [
],
'coverageIds' => [
],
'noteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/billing/patient/{patient_id}/superbills"
payload := strings.NewReader("{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decodahealth.com/billing/patient/{patient_id}/superbills")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/billing/patient/{patient_id}/superbills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"patientId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"totalDiscount": 123,
"totalDiscountPercentage": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"preferredName": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"leadSource": "<string>",
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"optedInToSmsMarketing": true,
"optedInToEmailMarketing": true,
"optedInToSocialMedia": true,
"aiScribeConsent": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>",
"dosespotPatientId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>",
"adjustments": [],
"payments": []
}
],
"context": {
"chargeId": "<string>",
"patient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>"
},
"guarantor": {
"name": "<string>",
"relationship": "<string>",
"patientId": "<string>"
},
"insuranceCoverages": [
{
"id": "<string>",
"isPrimary": true,
"inNetwork": true,
"insurerName": "<string>",
"memberId": "<string>",
"policyHolderName": "<string>",
"policyHolderDob": "2023-12-25",
"groupId": "<string>",
"pverifyCode": "<string>",
"phoneNumber": "<string>",
"coverageType": "<string>",
"planName": "<string>",
"planType": "<string>",
"effectiveDate": "2023-12-25",
"eligibilityNote": "<string>",
"claimsAddress": "<string>"
}
],
"event": {
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"serviceSegments": [
{
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"serviceId": "<string>",
"serviceName": "<string>",
"provider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"npi": "<string>",
"credentials": "<string>"
}
}
],
"location": {
"id": "<string>",
"name": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"phoneNumber": "<string>"
}
},
"savedPayload": {
"services": [
{
"chargeItemId": "<string>",
"included": true,
"billingCode": "<string>",
"billingCodeDescription": "<string>",
"modifiers": [],
"icd10Codes": [],
"ndcCode": "<string>",
"placeOfService": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"quantity": 1,
"quantityLabel": "QUANTITY",
"billedChargeCents": 0
}
],
"serviceDetails": {
"renderingProviderId": "<string>",
"renderingProviderName": "<string>",
"renderingProviderNpi": "<string>",
"billingProviderId": "<string>",
"billingProviderName": "<string>",
"billingProviderNpi": "<string>",
"tin": "<string>",
"otherProviderName": "<string>",
"placeOfService": "<string>",
"facilityName": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"hospitalAdmitDate": "2023-12-25",
"dateOfInjury": "2023-12-25",
"priorAuthNumber": "<string>"
},
"insurance": {
"coverageType": "<string>",
"payerName": "<string>",
"planName": "<string>",
"planType": "<string>",
"insuranceId": "<string>",
"groupId": "<string>",
"effectiveDate": "2023-12-25",
"eligibilityNote": "<string>",
"claimsAddress": "<string>",
"guarantorName": "<string>"
},
"notes": "<string>",
"includeCodeSummary": true
},
"noteCodes": {
"noteId": "<string>",
"cptCodes": [],
"icd10Codes": [],
"cptModifiers": {}
},
"serviceDefaults": [],
"defaultPlaceOfService": "<string>"
},
"eventId": "<string>",
"name": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Superbills
Create Superbill
Create a new Super Bill for a patient from selected charges/events, optionally linking a note.
POST
/
billing
/
patient
/
{patient_id}
/
superbills
Create Superbill
curl --request POST \
--url https://api.decodahealth.com/billing/patient/{patient_id}/superbills \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"chargeIds": [
"<string>"
],
"name": "<string>",
"eventId": "<string>",
"eventIds": [],
"coverageIds": [],
"noteId": "<string>"
}
'import requests
url = "https://api.decodahealth.com/billing/patient/{patient_id}/superbills"
payload = {
"chargeIds": ["<string>"],
"name": "<string>",
"eventId": "<string>",
"eventIds": [],
"coverageIds": [],
"noteId": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chargeIds: ['<string>'],
name: '<string>',
eventId: '<string>',
eventIds: [],
coverageIds: [],
noteId: '<string>'
})
};
fetch('https://api.decodahealth.com/billing/patient/{patient_id}/superbills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/billing/patient/{patient_id}/superbills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chargeIds' => [
'<string>'
],
'name' => '<string>',
'eventId' => '<string>',
'eventIds' => [
],
'coverageIds' => [
],
'noteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/billing/patient/{patient_id}/superbills"
payload := strings.NewReader("{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decodahealth.com/billing/patient/{patient_id}/superbills")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/billing/patient/{patient_id}/superbills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chargeIds\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"eventId\": \"<string>\",\n \"eventIds\": [],\n \"coverageIds\": [],\n \"noteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"patientId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"charges": [
{
"patientId": "<string>",
"totalOutstanding": 123,
"totalDiscount": 123,
"totalDiscountPercentage": 123,
"id": "<string>",
"patient": {
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>",
"externalId": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>",
"addressValid": true,
"meta": {},
"isArchived": true,
"primaryLocationId": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"preferredName": "<string>",
"dateOfBirth": "2023-12-25",
"patientMedications": [
"<string>"
],
"leadSource": "<string>",
"onSchedulingBlacklist": true,
"surchargeDisabled": true,
"optedInToSmsMarketing": true,
"optedInToEmailMarketing": true,
"optedInToSocialMedia": true,
"aiScribeConsent": true,
"tags": [
{
"id": "<string>",
"name": "<string>",
"isActive": true,
"createdDate": "2023-11-07T05:31:56Z",
"emoji": "<string>",
"color": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}
],
"creditBalance": 123,
"preferredProviderId": "<string>",
"dosespotPatientId": "<string>"
},
"total": 0,
"description": "<string>",
"status": "OUTSTANDING",
"externalId": "<string>",
"externalCreatedDate": "2023-11-07T05:31:56Z",
"ruleSetId": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"creatorId": "<string>",
"items": [],
"tips": [],
"locationId": "<string>",
"eventId": "<string>",
"memberId": "<string>",
"comment": "<string>",
"meta": {},
"merchantAccountId": "<string>",
"adjustments": [],
"payments": []
}
],
"context": {
"chargeId": "<string>",
"patient": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"dateOfBirth": "2023-12-25",
"email": "<string>",
"phoneNumber": "<string>",
"address": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>"
},
"guarantor": {
"name": "<string>",
"relationship": "<string>",
"patientId": "<string>"
},
"insuranceCoverages": [
{
"id": "<string>",
"isPrimary": true,
"inNetwork": true,
"insurerName": "<string>",
"memberId": "<string>",
"policyHolderName": "<string>",
"policyHolderDob": "2023-12-25",
"groupId": "<string>",
"pverifyCode": "<string>",
"phoneNumber": "<string>",
"coverageType": "<string>",
"planName": "<string>",
"planType": "<string>",
"effectiveDate": "2023-12-25",
"eligibilityNote": "<string>",
"claimsAddress": "<string>"
}
],
"event": {
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"serviceSegments": [
{
"id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"serviceId": "<string>",
"serviceName": "<string>",
"provider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"npi": "<string>",
"credentials": "<string>"
}
}
],
"location": {
"id": "<string>",
"name": "<string>",
"addressLineOne": "<string>",
"addressLineTwo": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"phoneNumber": "<string>"
}
},
"savedPayload": {
"services": [
{
"chargeItemId": "<string>",
"included": true,
"billingCode": "<string>",
"billingCodeDescription": "<string>",
"modifiers": [],
"icd10Codes": [],
"ndcCode": "<string>",
"placeOfService": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"quantity": 1,
"quantityLabel": "QUANTITY",
"billedChargeCents": 0
}
],
"serviceDetails": {
"renderingProviderId": "<string>",
"renderingProviderName": "<string>",
"renderingProviderNpi": "<string>",
"billingProviderId": "<string>",
"billingProviderName": "<string>",
"billingProviderNpi": "<string>",
"tin": "<string>",
"otherProviderName": "<string>",
"placeOfService": "<string>",
"facilityName": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"hospitalAdmitDate": "2023-12-25",
"dateOfInjury": "2023-12-25",
"priorAuthNumber": "<string>"
},
"insurance": {
"coverageType": "<string>",
"payerName": "<string>",
"planName": "<string>",
"planType": "<string>",
"insuranceId": "<string>",
"groupId": "<string>",
"effectiveDate": "2023-12-25",
"eligibilityNote": "<string>",
"claimsAddress": "<string>",
"guarantorName": "<string>"
},
"notes": "<string>",
"includeCodeSummary": true
},
"noteCodes": {
"noteId": "<string>",
"cptCodes": [],
"icd10Codes": [],
"cptModifiers": {}
},
"serviceDefaults": [],
"defaultPlaceOfService": "<string>"
},
"eventId": "<string>",
"name": "<string>",
"updatedDate": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Body
application/json
Response
Successful Response
Full Super Bill row + the aggregated editor context.
charges carries the full ChargeDetailWithItems for each linked charge so
the editor can render service-line cards across charges. context carries
the aggregated patient/event/insurance/note-codes the editor needs.
Show child attributes
Show child attributes
Autofill data for the superbill page: event details + insurance + guarantor.
If staff has previously saved a draft for this charge, saved_payload carries
their last-known values so the page can hydrate the editor (overrides autofill).
Show child attributes
Show child attributes
⌘I
