openapi: 3.2.0 info: title: Reference Service Lines API version: 1.0.0 servers: - url: https://pre-api.joincandidhealth.com description: Production - url: https://pre-api-staging.joincandidhealth.com description: Staging - url: https://sandbox-pre-api.joincandidhealth.com description: CandidSandbox - url: https://staging-pre-api.joincandidhealth.com description: CandidStaging - url: http://localhost:4000 description: Local - url: https://api.joincandidhealth.com description: Production - url: https://api-staging.joincandidhealth.com description: Staging - url: https://sandbox-api.joincandidhealth.com description: CandidSandbox - url: https://staging-api.joincandidhealth.com description: CandidStaging - url: http://localhost:5050 description: Local tags: - name: Service Lines paths: /api/service-lines/v2: post: operationId: create summary: Create Service Line tags: - Service Lines parameters: - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLine' '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityConflictError content: $ref: '#/components/schemas/type_commons_EntityConflictErrorMessage' required: - errorName - content '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - HttpRequestValidationError content: $ref: '#/components/schemas/type_commons_RequestValidationError' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineCreateStandalone' /api/service-lines/v2/universal: post: operationId: create-universal summary: Create Professional or Institutional Service Line tags: - Service Lines parameters: - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLine' '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityConflictError content: $ref: '#/components/schemas/type_commons_EntityConflictErrorMessage' required: - errorName - content '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - HttpRequestValidationError content: $ref: '#/components/schemas/type_commons_RequestValidationError' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_UniversalServiceLineCreateStandalone' /api/service-lines/v2/{service_line_id}/universal: patch: operationId: update-universal summary: Update service line for encounter that may be institutional or professional tags: - Service Lines parameters: - name: service_line_id in: path required: true schema: $ref: '#/components/schemas/type_commons_ServiceLineId' - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLine' '403': description: Error response with status 403 content: application/json: schema: type: object properties: errorName: type: string enum: - UnauthorizedError content: $ref: '#/components/schemas/type_commons_UnauthorizedErrorMessage' required: - errorName - content '404': description: Error response with status 404 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityNotFoundError content: $ref: '#/components/schemas/type_commons_EntityNotFoundErrorMessage' required: - errorName - content '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - HttpRequestValidationError content: $ref: '#/components/schemas/type_commons_RequestValidationError' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_UniversalServiceLineUpdate' /api/service-lines/v2/{service_line_id}: patch: operationId: update summary: Update Service Line tags: - Service Lines parameters: - name: service_line_id in: path required: true schema: $ref: '#/components/schemas/type_commons_ServiceLineId' - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLine' '403': description: Error response with status 403 content: application/json: schema: type: object properties: errorName: type: string enum: - UnauthorizedError content: $ref: '#/components/schemas/type_commons_UnauthorizedErrorMessage' required: - errorName - content '404': description: Error response with status 404 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityNotFoundError content: $ref: '#/components/schemas/type_commons_EntityNotFoundErrorMessage' required: - errorName - content '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - HttpRequestValidationError content: $ref: '#/components/schemas/type_commons_RequestValidationError' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineUpdate' delete: operationId: delete summary: Delete Service Line tags: - Service Lines parameters: - name: service_line_id in: path required: true schema: $ref: '#/components/schemas/type_commons_ServiceLineId' - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Successful response '403': description: Error response with status 403 content: application/json: schema: type: object properties: errorName: type: string enum: - UnauthorizedError content: $ref: '#/components/schemas/type_commons_UnauthorizedErrorMessage' required: - errorName - content '404': description: Error response with status 404 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityNotFoundError content: $ref: '#/components/schemas/type_commons_EntityNotFoundErrorMessage' required: - errorName - content '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - EntityConflictError content: $ref: '#/components/schemas/type_commons_EntityConflictErrorMessage' required: - errorName - content components: schemas: type_service-lines_v2_TestResult: type: object properties: value: type: number format: double result_type: $ref: '#/components/schemas/type_service-lines_v2_TestResultType' required: - value - result_type title: TestResult type_invoices_v2_InvoiceInfo: type: object properties: id: $ref: '#/components/schemas/type_commons_InvoiceId' invoice: $ref: '#/components/schemas/type_invoices_v2_Invoice' invoice_type: $ref: '#/components/schemas/type_invoices_v2_InvoiceDestination' required: - id - invoice - invoice_type title: InvoiceInfo type_commons_Date: type: string description: ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01) title: Date type_commons_EntityConflictErrorMessage: type: object properties: entity_name: type: string required: - entity_name title: EntityConflictErrorMessage type_commons_InvoiceId: type: string format: uuid title: InvoiceId type_service-lines_v2_ServiceLineAdjustment: type: object properties: created_at: type: string format: date-time adjustment_group_code: type: string adjustment_reason_code: type: string adjustment_amount_cents: type: integer adjustment_note: type: string required: - created_at title: ServiceLineAdjustment type_commons_State: type: string enum: - AA - AE - AP - AL - AK - AS - AZ - AR - CA - CO - CT - DC - DE - FL - FM - GA - GU - HI - ID - IL - IN - IA - KS - KY - LA - ME - MD - MA - MH - MI - MN - MP - MS - MO - MT - NE - NV - NH - NJ - NM - NY - NC - ND - OH - OK - OR - PA - PR - PW - RI - SC - SD - TN - TX - UT - VI - VT - VA - WA - WV - WI - WY title: State type_encounter-providers_v2_EncounterProvider: type: object properties: first_name: type: string description: If the provider is an individual, this should be set instead of organization name last_name: type: string description: If the provider is an individual, this should be set instead of organization name organization_name: type: string description: If the provider is an organization, this should be set instead of first + last name provider_id: $ref: '#/components/schemas/type_encounter-providers_v2_ProviderId' address: $ref: '#/components/schemas/type_commons_StreetAddressLongZip' tax_id: type: string npi: type: string taxonomy_code: type: string qualifier: $ref: '#/components/schemas/type_commons_QualifierCode' provider_commercial_license_type: $ref: '#/components/schemas/type_commons_BillingProviderCommercialLicenseType' description: '837i Loop2010BB G2 Provider Commercial Number' secondary_identification: $ref: '#/components/schemas/type_encounter-providers_v2_ProviderSecondaryIdentification' description: 'Only one of provider_commercial_license_type or secondary_identification may be provided 837i Loop2010BB G2 Secondary Identification' required: - provider_id - address - npi title: EncounterProvider type_invoices_InvoiceItem: type: object properties: service_line_id: $ref: '#/components/schemas/type_commons_ServiceLineId' amount_cents: type: integer required: - service_line_id - amount_cents title: InvoiceItem type_commons_PatientExternalId: type: string title: PatientExternalId type_invoices_v2_InvoiceStatus: type: string enum: - DRAFT - OPEN - PAID - VOID - UNCOLLECTIBLE - HELD title: InvoiceStatus type_service-lines_v2_ServiceLineCreateStandalone: type: object properties: modifiers: type: array items: $ref: '#/components/schemas/type_commons_ProcedureModifier' charge_amount_cents: type: integer description: The total amount charged for this service line, factoring in quantity. The system will attempt to set it based on the chargemaster configuration and the service line’s quantity. For example, if a single unit has an entry of 100 cents and 2 units were rendered, the charge_amount_cents will be set to 200. If there is no chargemaster entry, the system will default to the amount set via this field. denial_reason: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineDenialReason' place_of_service_code: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your organization does not intend to submit claims with a different place of service at the service line level, this field should not be populated. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). quantity: $ref: '#/components/schemas/type_commons_Decimal' description: 'String representation of a Decimal that can be parsed by most libraries. For professional claims, a ServiceLine quantity cannot contain more than one digit of precision (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine quantity cannot contain more than three decimal digits of precision.' units: $ref: '#/components/schemas/type_commons_ServiceLineUnits' claim_id: $ref: '#/components/schemas/type_commons_ClaimId' description: type: string description: A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form. date_of_service: type: string format: date end_date_of_service: type: string format: date drug_identification: $ref: '#/components/schemas/type_service-lines_v2_DrugIdentification' ordering_provider: $ref: '#/components/schemas/type_encounter-providers_v2_OrderingProvider' description: 'Required when the service or supply was ordered by a provider who is different than the rendering provider for this service line. If not required by this implementation guide, do not send.' test_results: type: array items: $ref: '#/components/schemas/type_service-lines_v2_TestResult' description: 'Contains a list of test results. Test result types may map to MEA-02 on the 837-P (ex: Hemoglobin, Hematocrit). This is unused by 837-i and ignored for institutional service lines. No more than 5 MEA-02 test results may be submitted per service line.' has_epsdt_indicator: type: boolean description: 'Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' has_family_planning_indicator: type: boolean description: 'Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' note: type: string description: Maps to NTE02 loop 2400 on the EDI 837. procedure_code: type: string diagnosis_id_zero: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_one: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_two: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_three: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' prior_authorization_number: type: string description: Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i). external_id: type: string description: 'An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems. This field should not contain PHI. Must be unique on a given claim.' required: - quantity - units - claim_id - procedure_code title: ServiceLineCreateStandalone type_service-lines_v2_ServiceIdQualifier: type: string enum: - EN - EO - HI - N4 - 'ON' - UK - UP title: ServiceIdQualifier type_invoices_v2_InvoiceDestinationMetadata: type: object properties: invoice_destination: $ref: '#/components/schemas/type_invoices_v2_InvoiceDestination' description: Defines which third-party service this invoice was created in source_id: type: string description: The id of the invoice in the third-party service source_customer_id: type: string description: The id of the customer that the invoice is attributed to in the third-party service destination_status: type: string description: The status of the invoice in the third-party service required: - invoice_destination - source_id - source_customer_id title: InvoiceDestinationMetadata type_encounter-providers_v2_OrderingProvider: type: object properties: first_name: type: string description: If the provider is an individual, this should be set instead of organization name last_name: type: string description: If the provider is an individual, this should be set instead of organization name organization_name: type: string description: If the provider is an organization, this should be set instead of first + last name npi: type: string description: 'A National Provider Identifier is a unique 10-digit identification number issued to health care providers in the United States' taxonomy_code: type: string address: $ref: '#/components/schemas/type_commons_StreetAddressLongZip' required: - npi title: OrderingProvider type_invoices_InvoiceStatus: type: string enum: - draft - open - paid - void - uncollectible - held title: InvoiceStatus type_commons_StreetAddressLongZip: type: object properties: address1: type: string address2: type: string city: type: string state: $ref: '#/components/schemas/type_commons_State' zip_code: type: string description: 5-digit zip code zip_plus_four_code: type: string description: 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4 required: - address1 - city - state - zip_code - zip_plus_four_code title: StreetAddressLongZip type_invoices_v2_ServiceLineInvoiceItem: type: object properties: service_line_id: $ref: '#/components/schemas/type_commons_ServiceLineId' amount_cents: type: integer required: - service_line_id - amount_cents title: ServiceLineInvoiceItem type_service-lines_v2_DenialReasonContent: type: string enum: - Authorization Required - Referral Required - Medical Records Requested - Timely Filing - Duplicate Claim - Full Contractual Adjustment - Incorrect Place of Service - Incorrect Patient Gender - Incorrect Patient Info - Bundled - Exceeded Billable Time - Invalid Provider Information - Invalid Diagnosis Code - Incorrect Procedure Code - Invalid Modifier - Missing NDC Code - Invalid Insurance Data - No Active Coverage - Coordination of Benefits - Incorrect Payer - Credentialing - No Effective Contract - Missing W-9 - Missing Contract Linkage - Non-Covered Benefit - Experimental Procedure - Not Medically Necessary - Info Requested from Provider - Info Requested from Patient - Billing Error - Unknown - Max Benefit Reached title: DenialReasonContent type_commons_ServiceLineUnits: type: string enum: - MJ - UN title: ServiceLineUnits type_diagnoses_DiagnosisId: type: string format: uuid title: DiagnosisId type_service-lines_v2_UniversalServiceLineCreateStandalone: type: object properties: modifiers: type: array items: $ref: '#/components/schemas/type_commons_ProcedureModifier' charge_amount_cents: type: integer description: The total amount charged for this service line, factoring in quantity. The system will attempt to set it based on the chargemaster configuration and the service line’s quantity. For example, if a single unit has an entry of 100 cents and 2 units were rendered, the charge_amount_cents will be set to 200. If there is no chargemaster entry, the system will default to the amount set via this field. denial_reason: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineDenialReason' place_of_service_code: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your organization does not intend to submit claims with a different place of service at the service line level, this field should not be populated. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). quantity: $ref: '#/components/schemas/type_commons_Decimal' description: 'String representation of a Decimal that can be parsed by most libraries. For professional claims, a ServiceLine quantity cannot contain more than one digit of precision (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine quantity cannot contain more than three decimal digits of precision.' units: $ref: '#/components/schemas/type_commons_ServiceLineUnits' claim_id: $ref: '#/components/schemas/type_commons_ClaimId' description: type: string description: A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form. date_of_service: type: string format: date end_date_of_service: type: string format: date drug_identification: $ref: '#/components/schemas/type_service-lines_v2_DrugIdentification' ordering_provider: $ref: '#/components/schemas/type_encounter-providers_v2_OrderingProvider' description: 'Required when the service or supply was ordered by a provider who is different than the rendering provider for this service line. If not required by this implementation guide, do not send.' test_results: type: array items: $ref: '#/components/schemas/type_service-lines_v2_TestResult' description: 'Contains a list of test results. Test result types may map to MEA-02 on the 837-P (ex: Hemoglobin, Hematocrit). This is unused by 837-i and ignored for institutional service lines. No more than 5 MEA-02 test results may be submitted per service line.' has_epsdt_indicator: type: boolean description: 'Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' has_family_planning_indicator: type: boolean description: 'Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' note: type: string description: Maps to NTE02 loop 2400 on the EDI 837. diagnosis_id_zero: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_one: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_two: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_three: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' revenue_code: type: string description: A 4 digit code that specifies facility department or type of service arrangement for institutional service line items (837i). This code is not required for professional claim billing (837p). procedure_code: type: - string - 'null' description: 'Pass `null` to create the service line as uncoded, which is valid for institutional (837i) claims that bill by revenue code rather than a CPT/HCPCS code.' prior_authorization_number: type: string description: Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i). external_id: type: string description: 'An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems. This field should not contain PHI. Must be unique on a given claim.' required: - quantity - units - claim_id title: UniversalServiceLineCreateStandalone type_service-lines_v2_TestResultType: type: string enum: - HEMATOCRIT - HEMOGLOBIN - LDL - VITAMIN_D title: TestResultType type_service-lines_v2_ServiceLine: type: object properties: created_at: type: string format: date-time modifiers: type: array items: $ref: '#/components/schemas/type_commons_ProcedureModifier' charge_amount_cents: type: integer allowed_amount_cents: type: integer insurance_balance_cents: type: integer patient_balance_cents: type: integer paid_amount_cents: type: integer primary_paid_amount_cents: type: integer secondary_paid_amount_cents: type: integer tertiary_paid_amount_cents: type: integer patient_responsibility_cents: type: integer copay_cents: type: integer coinsurance_cents: type: integer deductible_cents: type: integer diagnosis_id_zero: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_one: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_two: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_three: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' drug_identification: $ref: '#/components/schemas/type_service-lines_v2_DrugIdentification' service_line_era_data: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineERAData' service_line_manual_adjustments: type: array items: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineAdjustment' related_invoices: type: array items: $ref: '#/components/schemas/type_invoices_Invoice' related_invoice_info: type: array items: $ref: '#/components/schemas/type_invoices_v2_InvoiceInfo' denial_reason: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineDenialReason' place_of_service_code: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your organization does not intend to submit claims with a different place of service at the service line level, this field should not be populated. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). place_of_service_code_as_submitted: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). service_line_id: $ref: '#/components/schemas/type_commons_ServiceLineId' procedure_code: type: string ordering_provider: $ref: '#/components/schemas/type_encounter-providers_v2_EncounterProvider' revenue_code: type: string description: A 4 digit code that specifies facility department or type of service arrangement for institutional service line items (837i). This code is not required for professional claim billing (837p). quantity: $ref: '#/components/schemas/type_commons_Decimal' description: 'String representation of a Decimal that can be parsed by most libraries. For professional claims, a ServiceLine quantity cannot contain more than one digit of precision (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine quantity cannot contain more than three decimal digits of precision.' units: $ref: '#/components/schemas/type_commons_ServiceLineUnits' claim_id: $ref: '#/components/schemas/type_commons_ClaimId' date_of_service_range: $ref: '#/components/schemas/type_commons_DateRangeOptionalEnd' description: 'A range of dates of service for this service line. If the service line is for a single date, the end date will be empty.' description: type: string description: A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form. date_of_service: type: string format: date end_date_of_service: type: string format: date test_results: type: array items: $ref: '#/components/schemas/type_service-lines_v2_TestResult' description: 'Contains a list of test results. Test result types may map to MEA-02 on the 837-P (ex: Hemoglobin, Hematocrit). This is unused by 837-i and ignored for institutional service lines. No more than 5 MEA-02 test results may be submitted per service line.' has_epsdt_indicator: type: boolean description: 'Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' has_family_planning_indicator: type: boolean description: 'Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' note: type: string description: Maps to NTE02 loop 2400 on the EDI 837. prior_authorization_number: type: string description: Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i). external_id: type: string description: 'An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems. This field should not contain PHI. Must be unique on a given claim.' required: - created_at - service_line_id - procedure_code - quantity - units - claim_id - date_of_service_range - date_of_service title: ServiceLine type_commons_ServiceLineId: type: string format: uuid title: ServiceLineId type_invoices_v2_Invoice: type: object properties: amount_cents: type: integer description: Total monetary amount (in cents) of all Invoice Items created_at: type: string format: date-time updated_at: type: string format: date-time organization_id: $ref: '#/components/schemas/type_commons_OrganizationId' invoice_destination_metadata: $ref: '#/components/schemas/type_invoices_v2_InvoiceDestinationMetadata' description: Contains all relevant information from the third-party service this invoice was created in patient_external_id: $ref: '#/components/schemas/type_commons_PatientExternalId' note: type: string due_date: type: string format: date status: $ref: '#/components/schemas/type_invoices_v2_InvoiceStatus' url: type: string description: Link to the admin view of the invoice in the third-party service customer_invoice_url: type: string description: Link to the patient view of the invoice in the third-party service items: $ref: '#/components/schemas/type_invoices_v2_InvoiceItemInfo' description: The InvoiceItem rollup which contains all claim and service line invoice items required: - amount_cents - created_at - updated_at - organization_id - invoice_destination_metadata - patient_external_id - due_date - status - items title: Invoice type_service-lines_v2_MeasurementUnitCode: type: string enum: - ML - UN - GR - F2 - ME title: MeasurementUnitCode type_commons_ProcedureModifier: type: string enum: - AV - AU - AW - AY - '07' - 08 - 09 - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '22' - '23' - '24' - '25' - '26' - '27' - '28' - '32' - '33' - '47' - '50' - '51' - '52' - '53' - '54' - '55' - '56' - '57' - '58' - '59' - '62' - '63' - '66' - '73' - '74' - '76' - '77' - '78' - '79' - '80' - '81' - '82' - '90' - '91' - '92' - '93' - '95' - '96' - '97' - '99' - A1 - A2 - A3 - A4 - A5 - A6 - A7 - A8 - A9 - AA - AB - AD - AE - AF - AG - AH - AI - AJ - AK - AM - AO - AP - AQ - AR - AS - AT - AZ - BA - BL - BO - BP - BR - BU - CA - CB - CC - CD - CE - CF - CG - CH - CI - CJ - CK - CL - CM - CN - CR - CS - CT - CO - CQ - DA - E1 - E2 - E3 - E4 - EA - EB - EC - ED - EE - EJ - EM - EP - ER - ET - EV - EX - EY - F1 - F2 - F3 - F4 - F5 - F6 - F7 - F8 - F9 - FA - FB - FC - FP - FQ - FR - FS - FT - FX - FY - G0 - G1 - G2 - G3 - G4 - G5 - G6 - G7 - G8 - G9 - GA - GB - GC - GE - GF - GG - GH - GJ - GK - GL - GM - GN - GO - GP - GQ - GR - GS - GT - GU - GV - GW - GX - GY - GZ - HA - HB - HC - HD - HE - HF - HG - HH - HI - HJ - HK - HL - HM - HN - HO - HP - HQ - HR - HS - HT - HU - HV - HW - HX - HY - HZ - J1 - J2 - J3 - J4 - J5 - JA - JB - JC - JD - JE - JG - JW - JZ - K0 - K1 - K2 - K3 - K4 - KA - KB - KC - KD - KE - KF - KG - KH - KI - KJ - KK - KL - KM - KN - KO - KP - KQ - KR - KS - KT - KU - KV - KW - KX - KY - KZ - LC - LD - LL - LM - LR - LS - LT - LU - M2 - MA - MB - MC - MD - ME - MF - MG - MH - MS - N1 - N2 - N3 - NB - NR - NU - P1 - P2 - P3 - P4 - P5 - P6 - PA - PB - PC - PD - PI - PL - PM - PN - PO - PS - PT - Q0 - Q1 - Q2 - Q3 - Q4 - Q5 - Q6 - Q7 - Q8 - Q9 - QA - QB - QC - QD - QE - QF - QG - QH - QJ - QK - QL - QM - QN - QP - QQ - QR - QS - QT - QW - QX - QY - QZ - RA - RB - RC - RD - RE - RI - RR - RT - SA - SB - SC - SD - SE - SF - SG - SH - SJ - SL - SM - SN - SQ - SS - ST - SU - SV - SW - SY - T1 - T2 - T3 - T4 - T5 - T6 - T7 - T8 - T9 - TA - TB - TC - TD - TE - TF - TG - TH - TJ - TK - TL - TM - TN - TP - TQ - TR - TS - TT - TU - TV - TW - U1 - U2 - U3 - U4 - U5 - U6 - U7 - U8 - U9 - UA - UB - UC - UD - UE - UF - UG - UH - UJ - UK - UN - UP - UQ - UR - US - V1 - V2 - V3 - W1 - W2 - W3 - X4 - XE - XP - XS - XU - XY - ZZ title: ProcedureModifier type_commons_DateRangeOptionalEnd: type: object properties: start_date: $ref: '#/components/schemas/type_commons_Date' end_date: $ref: '#/components/schemas/type_commons_Date' required: - start_date title: DateRangeOptionalEnd type_commons_BillingProviderCommercialLicenseType: type: string enum: - '0' - A - B - C - D - E - F - G - H - I title: BillingProviderCommercialLicenseType type_service-lines_v2_ServiceLineDenialReason: type: object properties: reason: $ref: '#/components/schemas/type_service-lines_v2_DenialReasonContent' description: Text of the denial reason description: 'The reason a given service line was denied within a given time range. A service line may be denied for different reasons over time, but only one reason at a time.' title: ServiceLineDenialReason type_service-lines_v2_DrugIdentification: type: object properties: service_id_qualifier: $ref: '#/components/schemas/type_service-lines_v2_ServiceIdQualifier' national_drug_code: type: string national_drug_unit_count: type: string measurement_unit_code: $ref: '#/components/schemas/type_service-lines_v2_MeasurementUnitCode' link_sequence_number: type: string pharmacy_prescription_number: type: string conversion_formula: type: string drug_description: type: string required: - service_id_qualifier - national_drug_code - national_drug_unit_count - measurement_unit_code title: DrugIdentification type_encounter-providers_v2_ProviderSecondaryIdentification: type: object properties: reference_identification: type: string description: Represents REF02 on the EDI 837 Loop 2010BB Billing Provider Secondary Identification segment. Value cannot exceed 50 characters reference_identification_qualifier: $ref: '#/components/schemas/type_encounter-providers_v2_ProviderSecondaryIdentificationQualifier' description: Represents REF01 on the EDI 837 Loop 2010BB Provider Secondary Identification segment. required: - reference_identification title: ProviderSecondaryIdentification type_invoices_v2_UnattributedInvoiceItem: type: object properties: amount_cents: type: integer required: - amount_cents title: UnattributedInvoiceItem type_service-lines_v2_UniversalServiceLineUpdate: type: object properties: edit_reason: type: string modifiers: type: array items: $ref: '#/components/schemas/type_commons_ProcedureModifier' charge_amount_cents: type: integer description: The total amount charged for this service line, factoring in quantity. If procedure_code is updated and this is not, the system will attempt to set it based on chargemasters entries and the service line’s quantity. For example, if a single unit has an entry of 100 cents and 2 units were rendered, the charge_amount_cents will be set to 200, if there is no chargemaster entry, it will default to the amount set in this field. drug_identification: $ref: '#/components/schemas/type_service-lines_v2_DrugIdentification' denial_reason: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineDenialReason' place_of_service_code: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your organization does not intend to submit claims with a different place of service at the service line level, this field should not be populated. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). units: $ref: '#/components/schemas/type_commons_ServiceLineUnits' procedure_code: type: - string - 'null' description: 'If `procedure_code` is updated, and `charge_amount_cents` is not, then `charge_amount_cents` will be set by the system. Pass `null` to uncode the service line, which is valid for institutional (837i) claims that bill by revenue code rather than a CPT/HCPCS code.' quantity: $ref: '#/components/schemas/type_commons_Decimal' description: 'String representation of a Decimal that can be parsed by most libraries. For professional claims, a ServiceLine quantity cannot contain more than one digit of precision (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine quantity cannot contain more than three decimal digits of precision.' description: type: string description: A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form. date_of_service: type: string format: date description: date_of_service must be defined on either the encounter or the service lines but not both. end_date_of_service: type: string format: date test_results: type: array items: $ref: '#/components/schemas/type_service-lines_v2_TestResult' description: 'Contains a list of test results. Test result types may map to MEA-02 on the 837-P (ex: Hemoglobin, Hematocrit). This is unused by 837-i and ignored for institutional service lines. No more than 5 MEA-02 test results may be submitted per service line. Updating test results utilizes PUT semantics, so the test results on the service line will be set to whatever inputs are provided.' has_epsdt_indicator: type: boolean description: Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with “Y”. Otherwise, the box will not be populated. This box is not used on an 837i. has_family_planning_indicator: type: boolean description: 'Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' note: type: string description: Maps to NTE02 loop 2400 on the EDI 837. prior_authorization_number: type: string description: Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i). external_id: type: string description: 'An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems. This field should not contain PHI. Must be unique on a given claim.' revenue_code: type: string description: A 4 digit code that specifies facility department or type of service arrangement for institutional service line items (837i). This code is not required for professional claim billing (837p). diagnosis_id_zero: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_one: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_two: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_three: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' title: UniversalServiceLineUpdate type_invoices_v2_InvoiceItemInfo: type: object properties: claim_invoice_items: type: object additionalProperties: $ref: '#/components/schemas/type_invoices_v2_ClaimInvoiceItemInfo' unattributed_items: type: array items: $ref: '#/components/schemas/type_invoices_v2_UnattributedInvoiceItem' required: - claim_invoice_items - unattributed_items title: InvoiceItemInfo type_commons_RequestValidationError: type: object properties: fieldName: type: string humanReadableMessage: type: string required: - fieldName title: RequestValidationError type_service-lines_v2_ServiceLineERAData: type: object properties: service_line_adjustments: type: array items: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineAdjustment' description: 'Deprecated. This field aggregates all CARCs across a service line''s history without granular context (e.g., which CARCs relate to denials vs. payments vs. reversals), making it unsuitable for denial analysis or operational workflows.' remittance_advice_remark_codes: type: array items: type: string required: - service_line_adjustments - remittance_advice_remark_codes title: ServiceLineERAData type_commons_EntityNotFoundErrorMessage: type: object properties: id: type: string required: - id title: EntityNotFoundErrorMessage type_commons_OrganizationId: type: string format: uuid title: OrganizationId type_invoices_v2_ClaimInvoiceItemInfo: type: object properties: claim_invoice_item: $ref: '#/components/schemas/type_invoices_v2_ClaimInvoiceItem' service_line_invoice_items: type: object additionalProperties: $ref: '#/components/schemas/type_invoices_v2_ServiceLineInvoiceItem' required: - service_line_invoice_items title: ClaimInvoiceItemInfo type_service-lines_v2_ServiceLineUpdate: type: object properties: edit_reason: type: string modifiers: type: array items: $ref: '#/components/schemas/type_commons_ProcedureModifier' charge_amount_cents: type: integer description: The total amount charged for this service line, factoring in quantity. If procedure_code is updated and this is not, the system will attempt to set it based on chargemasters entries and the service line’s quantity. For example, if a single unit has an entry of 100 cents and 2 units were rendered, the charge_amount_cents will be set to 200, if there is no chargemaster entry, it will default to the amount set in this field. drug_identification: $ref: '#/components/schemas/type_service-lines_v2_DrugIdentification' denial_reason: $ref: '#/components/schemas/type_service-lines_v2_ServiceLineDenialReason' place_of_service_code: $ref: '#/components/schemas/type_commons_FacilityTypeCode' description: 837p Loop2300, SV105. This enum is not used or required in 837i claims. If your organization does not intend to submit claims with a different place of service at the service line level, this field should not be populated. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set). units: $ref: '#/components/schemas/type_commons_ServiceLineUnits' procedure_code: type: - string - 'null' description: 'If `procedure_code` is updated, and `charge_amount_cents` is not, then `charge_amount_cents` will be set by the system. Pass `null` to uncode the service line, which is valid for institutional (837i) claims that bill by revenue code rather than a CPT/HCPCS code.' quantity: $ref: '#/components/schemas/type_commons_Decimal' description: 'String representation of a Decimal that can be parsed by most libraries. For professional claims, a ServiceLine quantity cannot contain more than one digit of precision (Example: 1.1 is valid, 1.11 is not). For institutional claims, a ServiceLine quantity cannot contain more than three decimal digits of precision.' description: type: string description: A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on a 837-P and SV2-02, C003-07 on a 837-I form. date_of_service: type: string format: date description: date_of_service must be defined on either the encounter or the service lines but not both. end_date_of_service: type: string format: date test_results: type: array items: $ref: '#/components/schemas/type_service-lines_v2_TestResult' description: 'Contains a list of test results. Test result types may map to MEA-02 on the 837-P (ex: Hemoglobin, Hematocrit). This is unused by 837-i and ignored for institutional service lines. No more than 5 MEA-02 test results may be submitted per service line. Updating test results utilizes PUT semantics, so the test results on the service line will be set to whatever inputs are provided.' has_epsdt_indicator: type: boolean description: Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with “Y”. Otherwise, the box will not be populated. This box is not used on an 837i. has_family_planning_indicator: type: boolean description: 'Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500. If the value is true, the box will be populated with "Y". Otherwise, the box will not be populated.' note: type: string description: Maps to NTE02 loop 2400 on the EDI 837. prior_authorization_number: type: string description: Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i). external_id: type: string description: 'An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems. This field should not contain PHI. Must be unique on a given claim.' diagnosis_id_zero: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_one: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_two: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' diagnosis_id_three: $ref: '#/components/schemas/type_diagnoses_DiagnosisId' title: ServiceLineUpdate type_encounter-providers_v2_ProviderSecondaryIdentificationQualifier: type: string enum: - 0B - 1G - G2 - LU title: ProviderSecondaryIdentificationQualifier type_commons_FacilityTypeCode: type: string enum: - '01' - '02' - '03' - '04' - '05' - '06' - '07' - 08 - 09 - '10' - '11' - '12' - '13' - '14' - '15' - '16' - '17' - '18' - '19' - '20' - '21' - '22' - '23' - '24' - '25' - '26' - '31' - '32' - '33' - '34' - '41' - '42' - '49' - '50' - '51' - '52' - '53' - '54' - '55' - '56' - '57' - '58' - '60' - '61' - '62' - '65' - '71' - '72' - '81' - '99' description: 'Box 24B on the CMS-1500 claim form. Line-level place of service is not currently supported. 02 for telemedicine, 11 for in-person. Full list here: https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set' title: FacilityTypeCode type_encounter-providers_v2_ProviderId: type: string format: uuid title: ProviderId type_invoices_Invoice: type: object properties: id: $ref: '#/components/schemas/type_commons_InvoiceId' created_at: type: string format: date-time updated_at: type: string format: date-time organzation_id: $ref: '#/components/schemas/type_commons_OrganizationId' source_id: type: string source_customer_id: type: string patient_external_id: $ref: '#/components/schemas/type_commons_PatientExternalId' note: type: string due_date: $ref: '#/components/schemas/type_commons_Date' status: $ref: '#/components/schemas/type_invoices_InvoiceStatus' url: type: string customer_invoice_url: type: string items: type: array items: $ref: '#/components/schemas/type_invoices_InvoiceItem' required: - id - created_at - updated_at - organzation_id - source_id - source_customer_id - patient_external_id - due_date - status - items title: Invoice type_invoices_v2_InvoiceDestination: type: string enum: - STRIPE - CEDAR - HEALTHIE - COLLECTLY - THIRD_PARTY_PAYERS - INSTAMED - REVSPRING title: InvoiceDestination type_commons_QualifierCode: type: string enum: - DQ - DN - DK - P3 title: QualifierCode type_commons_UnauthorizedErrorMessage: type: object properties: message: type: string title: UnauthorizedErrorMessage type_invoices_v2_ClaimInvoiceItem: type: object properties: claim_id: $ref: '#/components/schemas/type_commons_ClaimId' amount_cents: type: integer required: - claim_id - amount_cents title: ClaimInvoiceItem type_commons_Decimal: type: string description: String representation of a Decimal that can be parsed by most libraries. title: Decimal type_commons_ClaimId: type: string format: uuid title: ClaimId securitySchemes: OAuthScheme: type: http scheme: bearer description: OAuth 2.0 authentication