Skip to main content
POST
/
billing
/
quote
/
{quote_id}
/
items
/
add
Add Item To Quote
curl --request POST \
  --url https://api.decodahealth.com/billing/quote/{quote_id}/items/add \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "itemId": "<string>",
  "packageId": "<string>",
  "quantity": 1,
  "unitPrice": 123,
  "discountAmount": 0,
  "discountPercentage": 0,
  "description": "<string>"
}
'
{
  "id": "<string>",
  "patientId": "<string>",
  "status": "DRAFT",
  "discountAmount": 123,
  "discountPercentage": 123,
  "taxAmount": 123,
  "total": 123,
  "subtotal": 123,
  "creatorId": "<string>",
  "cartId": "<string>",
  "title": "<string>",
  "itemCount": 0,
  "packageCount": 0,
  "createdDate": "2023-11-07T05:31:56Z",
  "updatedDate": "2023-11-07T05:31:56Z",
  "validUntilDate": "2023-11-07T05:31:56Z",
  "sentDate": "2023-11-07T05:31:56Z",
  "viewedDate": "2023-11-07T05:31:56Z",
  "respondedDate": "2023-11-07T05:31:56Z",
  "internalNotes": "<string>",
  "creator": {
    "id": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>",
    "createdDate": "2023-11-07T05:31:56Z"
  },
  "patient": {
    "id": "<string>",
    "type": "PROVIDER",
    "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>",
    "dateOfBirth": "2023-12-25",
    "patientMedications": [
      "<string>"
    ],
    "onSchedulingBlacklist": true,
    "surchargeDisabled": 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>"
  },
  "description": "<string>",
  "terms": "<string>",
  "items": [],
  "convertedChargeId": "<string>"
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

quote_id
string
required

Body

application/json

Schema for creating quote items (handles both items and packages).

itemId
string | null

ID of the item (required if not package)

packageId
string | null

ID of the package (required if not item)

quantity
number
default:1

Quantity of the item/package

unitPrice
integer | null

Custom unit price in cents (if different from item/package price)

discountAmount
integer
default:0

Discount amount in cents

discountPercentage
number
default:0

Discount percentage (0-100)

description
string | null

Custom description for this item/package in the quote

Response

Successful Response

Detailed schema for quote with all items and packages.

id
string
required

Quote ID

patientId
string
required

Patient ID

status
enum<string>
required

Quote status

Available options:
DRAFT,
SENT,
VIEWED,
ACCEPTED,
DECLINED,
EXPIRED,
CONVERTED
discountAmount
integer
required

Total discount in cents

discountPercentage
number
required

Overall discount percentage

taxAmount
integer
required

Total tax in cents

total
integer
required

Final total in cents

subtotal
integer
required

Calculate subtotal from items after item-level discounts.

creatorId
string | null

Creator ID

cartId
string | null

Source cart ID

title
string | null

Title/subject of the quote

itemCount
integer
default:0

Number of items in quote

packageCount
integer
default:0

Number of packages in quote

createdDate
string<date-time> | null

Date the quote was created

updatedDate
string<date-time> | null

Date the quote was last updated

validUntilDate
string<date-time> | null

When the quote expires

sentDate
string<date-time> | null

When the quote was sent

viewedDate
string<date-time> | null

When the patient first viewed the quote

respondedDate
string<date-time> | null

When the patient responded to the quote

internalNotes
string | null

Internal notes

creator
ProviderTiny · object

Creator details

patient
PatientSummary · object

Patient details

description
string | null

Description of the quote

terms
string | null

Terms and conditions

items
QuoteItem · object[]

Items and packages in the quote

convertedChargeId
string | null

ID of charge if quote was converted