openapi: 3.1.0 info: title: API Reference subpackage_auth.subpackage_auth/default subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 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: subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 paths: /organization-external-providers/v1/{id}: get: operationId: get summary: Get description: Gets an organization external provider by ID. tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderId' - 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_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProvider' '404': description: Error response with status 404 content: application/json: schema: type: object properties: errorName: type: string enum: - NotFoundError content: $ref: '#/components/schemas/type_pre-encounter/common:ErrorBase4xx' required: - errorName - content /organization-external-providers/v1: get: operationId: get-multi summary: Get Multi description: Searches for organization external providers that match the query parameters. tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 parameters: - name: limit in: query required: false schema: type: integer - name: page_token in: query required: false schema: $ref: '#/components/schemas/type_pre-encounter/common:PageToken' - name: sort_field in: query description: Defaults to name.family. required: false schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderSortField' - name: sort_direction in: query description: Defaults to ascending. required: false schema: $ref: '#/components/schemas/type_pre-encounter/common:SortDirection' - name: npi in: query required: false schema: type: string - name: type in: query required: false schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderType' - name: first_name in: query required: false schema: type: string - name: last_name in: query required: false schema: type: string - 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_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderPage' post: operationId: create summary: Create description: Creates a new organization external provider. BadRequestError is returned when the NPI is already in use. tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 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_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProvider' '400': description: Error response with status 400 content: application/json: schema: type: object properties: errorName: type: string enum: - BadRequestError content: $ref: '#/components/schemas/type_pre-encounter/common:ErrorBase4xx' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:MutableOrganizationExternalProvider' /organization-external-providers/v1/{id}/{version}: put: operationId: update summary: Update description: Updates an organization external provider. The path must contain the next version number to prevent race conditions. For example, if the current version of the provider is n, you will need to send a request to this endpoint with `/{id}/n+1` to update the provider. Updating historic versions is not supported. BadRequestError is returned when the NPI is already in use by another provider. tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderId' - name: version in: path required: true schema: type: string - 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_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProvider' '400': description: Error response with status 400 content: application/json: schema: type: object properties: errorName: type: string enum: - BadRequestError content: $ref: '#/components/schemas/type_pre-encounter/common:ErrorBase4xx' required: - errorName - content '404': description: Error response with status 404 content: application/json: schema: type: object properties: errorName: type: string enum: - NotFoundError content: $ref: '#/components/schemas/type_pre-encounter/common:ErrorBase4xx' required: - errorName - content '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - VersionConflictError content: $ref: '#/components/schemas/type_pre-encounter/common:VersionConflictErrorBody' required: - errorName - content requestBody: content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:MutableOrganizationExternalProvider' delete: operationId: deactivate summary: Deactivate description: Sets an organization external provider as deactivated. The path must contain the most recent version plus 1 to prevent race conditions. Deactivating historic versions is not supported. tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProviderId' - name: version in: path required: true schema: type: string - 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: - NotFoundError content: $ref: '#/components/schemas/type_pre-encounter/common:ErrorBase4xx' required: - errorName - content '409': description: Error response with status 409 content: application/json: schema: type: object properties: errorName: type: string enum: - VersionConflictError content: $ref: '#/components/schemas/type_pre-encounter/common:VersionConflictErrorBody' required: - errorName - content /organization-external-providers/v1/updates/scan: get: operationId: scan summary: Scan description: 'Scans up to 1000 organization external provider updates. The since query parameter is inclusive, and the result list is ordered by updatedAt ascending. **Polling Pattern:** To continuously poll for updates without gaps: 1. Make your initial request with a `since` timestamp (e.g., `since=2020-01-01T13:00:00.000Z`) 2. The API returns 100 by default and up to 1000 records, sorted by `updated_at` ascending 3. Find the `updated_at` value from the last record in the response 4. Use that `updated_at` value as the `since` parameter in your next request 5. Repeat steps 2-4 to ingest updates until you receive an empty list **Important Notes:** - The `since` parameter is inclusive, so you may receive the last record from the previous batch again (you can deduplicate by ID and version) - All records include `updated_at`, `id`, `version`, `deactivated`, and `updating_user` fields for tracking changes - Timestamps have millisecond resolution for precise ordering' tags: - subpackage_pre-encounter.subpackage_pre-encounter/organizationExternalProviders.subpackage_pre-encounter/organizationExternalProviders/v1 parameters: - name: since in: query required: true schema: type: string format: date-time - name: maxResults in: query required: false schema: type: integer - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: type: array items: $ref: '#/components/schemas/type_pre-encounter/organizationExternalProviders/v1:OrganizationExternalProvider' components: securitySchemes: OAuthScheme: type: http scheme: bearer description: OAuth 2.0 authentication