openapi: 3.2.0 info: title: Reference Non Insurance Payers 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: Non Insurance Payers paths: /api/non-insurance-payers/v1: post: operationId: create summary: Create tags: - Non Insurance Payers 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_non-insurance-payers_v1_NonInsurancePayer' '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 requestBody: content: application/json: schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_CreateNonInsurancePayerRequest' get: operationId: get_multi summary: Get Multi tags: - Non Insurance Payers parameters: - name: name in: query required: false schema: type: string - name: category in: query description: Fuzzy-match category names of non-insurance payers. required: false schema: type: string - name: categories_exact in: query description: 'Filter by one or more categories by name. When multiple are present, non-insurance payers with any of the specified categories will be matched.' required: false schema: type: string - name: clinical_trial_ids in: query description: 'Filter by one or more clinical trials by their `clinical_trial_id`. When multiple are present, non-insurance payers with any of the specified clinical trials will be matched.' required: false schema: $ref: '#/components/schemas/type_commons_ClinicalTrialId' - name: enabled in: query required: false schema: type: boolean - name: sort in: query required: false schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerSortField' - name: sort_direction in: query required: false schema: $ref: '#/components/schemas/type_commons_SortDirection' - name: limit in: query description: Defaults to 100 required: false schema: type: integer - name: page_token in: query required: false schema: $ref: '#/components/schemas/type_commons_PageToken' - name: organization_id in: query description: Filter to a specific organization's non-insurance payers. If not provided, defaults to the requesting user's organization. required: false schema: $ref: '#/components/schemas/type_commons_OrganizationId' - 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_non-insurance-payers_v1_NonInsurancePayerPage' '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 '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - UnprocessableEntityError content: $ref: '#/components/schemas/type_commons_UnprocessableEntityErrorMessage' required: - errorName - content /api/non-insurance-payers/v1/{non_insurance_payer_id}/toggle_enablement: patch: operationId: toggle_enablement summary: Toggle Enablement tags: - Non Insurance Payers parameters: - name: non_insurance_payer_id in: path required: true schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' - 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_non-insurance-payers_v1_NonInsurancePayer' '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 requestBody: content: application/json: schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_ToggleNonInsurancePayerEnablementRequest' /api/non-insurance-payers/v1/categories: get: operationId: getCategories summary: Get non-insurance payer categories description: 'Returns a paginated list of all non-insurance payer categories. Non-insurance payer categories are simply strings and are not stored as a separate object in Candid. They are created when added to at least one non-insurance payer''s `category` field and are deleted when there are no longer any non-insurance payers that contain them.' tags: - Non Insurance Payers parameters: - name: search_term in: query description: Filters categories by fuzzy matching on name. required: false schema: type: string - name: limit in: query description: Limits the maximum number of categories that will be returned. Defaults to 100. required: false schema: type: integer - name: page_token in: query description: The page token to continue paging through a previous request. required: false schema: $ref: '#/components/schemas/type_commons_PageToken' - 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_non-insurance-payers_v1_NonInsurancePayerCategoriesPage' /api/non-insurance-payers/v1/{non_insurance_payer_id}: get: operationId: get summary: Get tags: - Non Insurance Payers parameters: - name: non_insurance_payer_id in: path required: true schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' - name: organization_id in: query description: Organization context for cross-org access. If not provided, defaults to the requesting user's organization. required: false schema: $ref: '#/components/schemas/type_commons_OrganizationId' - 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_non-insurance-payers_v1_NonInsurancePayer' '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 patch: operationId: update summary: Update tags: - Non Insurance Payers parameters: - name: non_insurance_payer_id in: path required: true schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' - 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_non-insurance-payers_v1_NonInsurancePayer' '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 requestBody: content: application/json: schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerUpdateRequest' delete: operationId: delete summary: Delete tags: - Non Insurance Payers parameters: - name: non_insurance_payer_id in: path required: true schema: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Successful response '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 components: schemas: type_non-insurance-payers_v1_NonInsurancePayer: type: object properties: non_insurance_payer_id: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' name: type: string description: type: string category: type: string enabled: type: boolean address: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' clinical_trials: type: array items: $ref: '#/components/schemas/type_clinical-trials_v1_ClinicalTrial' required: - non_insurance_payer_id - name - enabled - clinical_trials title: NonInsurancePayer type_non-insurance-payers_v1_NonInsurancePayerAddressUpdate: oneOf: - type: object properties: type: type: string enum: - remove description: 'Discriminator value: remove' required: - type - type: object properties: type: type: string enum: - set description: 'Discriminator value: set' value: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' required: - type discriminator: propertyName: type title: NonInsurancePayerAddressUpdate type_non-insurance-payers_v1_NonInsurancePayerCategoriesPage: type: object properties: prev_page_token: $ref: '#/components/schemas/type_commons_PageToken' next_page_token: $ref: '#/components/schemas/type_commons_PageToken' items: type: array items: type: string required: - items title: NonInsurancePayerCategoriesPage type_clinical-trials_v1_ClinicalTrial: type: object properties: name: type: string clinical_trial_number: type: string description: Must be 8 characters long clinical_trial_phase: $ref: '#/components/schemas/type_clinical-trials_v1_ClinicalTrialPhase' clinical_trial_id: $ref: '#/components/schemas/type_commons_ClinicalTrialId' non_insurance_payer_id: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerId' is_active: type: boolean required: - name - clinical_trial_number - clinical_trial_id - non_insurance_payer_id - is_active title: ClinicalTrial type_non-insurance-payers_v1_NonInsurancePayerPage: type: object properties: prev_page_token: $ref: '#/components/schemas/type_commons_PageToken' next_page_token: $ref: '#/components/schemas/type_commons_PageToken' items: type: array items: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayer' required: - items title: NonInsurancePayerPage type_commons_EntityConflictErrorMessage: type: object properties: entity_name: type: string required: - entity_name title: EntityConflictErrorMessage 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_commons_StreetAddressShortZip: 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 title: StreetAddressShortZip type_non-insurance-payers_v1_NonInsurancePayerCategoryUpdate: oneOf: - type: object properties: type: type: string enum: - remove description: 'Discriminator value: remove' required: - type - type: object properties: type: type: string enum: - set description: 'Discriminator value: set' value: type: string required: - type - value description: Max 255 characters allowed discriminator: propertyName: type title: NonInsurancePayerCategoryUpdate type_commons_SortDirection: type: string enum: - asc - desc title: SortDirection type_clinical-trials_v1_MutableClinicalTrial: type: object properties: name: type: string clinical_trial_number: type: string description: Must be 8 characters long clinical_trial_phase: $ref: '#/components/schemas/type_clinical-trials_v1_ClinicalTrialPhase' required: - name - clinical_trial_number title: MutableClinicalTrial type_non-insurance-payers_v1_CreateNonInsurancePayerRequest: type: object properties: name: type: string description: Max 50 characters allowed description: type: string description: Max 255 characters allowed category: type: string description: Max 255 characters allowed address: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' clinical_trials: type: array items: $ref: '#/components/schemas/type_clinical-trials_v1_MutableClinicalTrial' description: The same name cannot be used across several clinical trials required: - name title: CreateNonInsurancePayerRequest type_non-insurance-payers_v1_NonInsurancePayerSortField: type: string enum: - NAME - CATEGORY - ENABLED - UPDATED_AT title: NonInsurancePayerSortField type_non-insurance-payers_v1_NonInsurancePayerId: type: string format: uuid title: NonInsurancePayerId type_commons_PageToken: type: string title: PageToken type_commons_OrganizationId: type: string format: uuid title: OrganizationId type_commons_EntityNotFoundErrorMessage: type: object properties: id: type: string required: - id title: EntityNotFoundErrorMessage type_non-insurance-payers_v1_NonInsurancePayerDescriptionUpdate: oneOf: - type: object properties: type: type: string enum: - remove description: 'Discriminator value: remove' required: - type - type: object properties: type: type: string enum: - set description: 'Discriminator value: set' value: type: string required: - type - value description: Max 255 characters allowed discriminator: propertyName: type title: NonInsurancePayerDescriptionUpdate type_commons_UnprocessableEntityErrorMessage: type: object properties: message: type: string title: UnprocessableEntityErrorMessage type_commons_ClinicalTrialId: type: string format: uuid title: ClinicalTrialId type_commons_UnauthorizedErrorMessage: type: object properties: message: type: string title: UnauthorizedErrorMessage type_non-insurance-payers_v1_ToggleNonInsurancePayerEnablementRequest: type: object properties: enabled: type: boolean required: - enabled title: ToggleNonInsurancePayerEnablementRequest type_non-insurance-payers_v1_NonInsurancePayerUpdateRequest: type: object properties: name: type: string description: Max 50 characters allowed description: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerDescriptionUpdate' category: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerCategoryUpdate' address: $ref: '#/components/schemas/type_non-insurance-payers_v1_NonInsurancePayerAddressUpdate' title: NonInsurancePayerUpdateRequest type_clinical-trials_v1_ClinicalTrialPhase: type: string enum: - Phase 1 - Phase 2 - Phase 3 title: ClinicalTrialPhase securitySchemes: OAuthScheme: type: http scheme: bearer description: OAuth 2.0 authentication