openapi: 3.2.0 info: title: Reference Guarantors 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: Guarantors paths: /api/guarantors/v1/{encounter_id}: post: operationId: create summary: Create guarantor description: Creates a new guarantor and returns the newly created Guarantor object. tags: - Guarantors parameters: - name: encounter_id in: path required: true schema: $ref: '#/components/schemas/type_commons_EncounterId' - 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_guarantor_v1_Guarantor' '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - EncounterHasExistingGuarantorError content: $ref: '#/components/schemas/type_guarantor_v1_EncounterHasExistingGuarantorErrorType' required: - errorName - content '422': description: Error response with status 422 content: application/json: schema: type: object properties: errorName: type: string enum: - HttpRequestValidationsError content: type: array items: $ref: '#/components/schemas/type_commons_RequestValidationError' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_guarantor_v1_GuarantorCreate' /api/guarantors/v1/{guarantor_id}: get: operationId: get summary: Get guarantor description: Retrieves a guarantor by its `guarantor_id`. tags: - Guarantors parameters: - name: guarantor_id in: path required: true schema: $ref: '#/components/schemas/type_guarantor_v1_GuarantorId' - 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_guarantor_v1_Guarantor' patch: operationId: update summary: Update guarantor description: Updates a guarantor by its `guarantor_id`. tags: - Guarantors parameters: - name: guarantor_id in: path required: true schema: $ref: '#/components/schemas/type_guarantor_v1_GuarantorId' - 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_guarantor_v1_Guarantor' requestBody: content: application/json: schema: $ref: '#/components/schemas/type_guarantor_v1_GuarantorUpdate' components: schemas: type_guarantor_v1_GuarantorCreate: type: object properties: first_name: type: string last_name: type: string external_id: type: string date_of_birth: type: string format: date address: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' phone_numbers: type: array items: $ref: '#/components/schemas/type_commons_PhoneNumber' phone_consent: type: boolean description: Defaults to false email: $ref: '#/components/schemas/type_commons_Email' email_consent: type: boolean description: Defaults to false auto_charge_consent: type: boolean description: Defaults to false required: - first_name - last_name - external_id - address title: GuarantorCreate type_guarantor_v1_EncounterHasExistingGuarantorErrorType: type: object properties: message: type: string required: - message title: EncounterHasExistingGuarantorErrorType 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_guarantor_v1_GuarantorId: type: string format: uuid title: GuarantorId type_guarantor_v1_GuarantorUpdate: type: object properties: first_name: type: string last_name: type: string external_id: type: string description: A unique identifier for the guarantor assigned by an external system. date_of_birth: type: string format: date description: 'Date formatted as YYYY-MM-DD; eg: 2019-08-25.' address: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' phone_numbers: type: array items: $ref: '#/components/schemas/type_commons_PhoneNumber' phone_consent: type: boolean email: $ref: '#/components/schemas/type_commons_Email' email_consent: type: boolean auto_charge_consent: type: boolean title: GuarantorUpdate type_commons_PhoneNumber: type: object properties: number: type: string type: $ref: '#/components/schemas/type_commons_PhoneNumberType' required: - number - type title: PhoneNumber type_commons_EncounterId: type: string format: uuid title: EncounterId type_commons_Email: type: string title: Email type_commons_PhoneNumberType: type: string enum: - Home - Mobile - Work title: PhoneNumberType type_guarantor_v1_Guarantor: type: object properties: first_name: type: string last_name: type: string external_id: type: string date_of_birth: type: string format: date address: $ref: '#/components/schemas/type_commons_StreetAddressShortZip' guarantor_id: $ref: '#/components/schemas/type_guarantor_v1_GuarantorId' phone_numbers: type: array items: $ref: '#/components/schemas/type_commons_PhoneNumber' phone_consent: type: boolean email: $ref: '#/components/schemas/type_commons_Email' email_consent: type: boolean auto_charge_consent: type: boolean required: - first_name - last_name - external_id - address - guarantor_id - phone_numbers - phone_consent - email_consent - auto_charge_consent title: Guarantor type_commons_RequestValidationError: type: object properties: fieldName: type: string humanReadableMessage: type: string required: - fieldName title: RequestValidationError 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 securitySchemes: OAuthScheme: type: http scheme: bearer description: OAuth 2.0 authentication