Import Integration
Import a full integration (integration + resource records + use cases) into the requester’s team.
Strategy:
- Create the integration document with fresh IDs owned by the requester’s team.
- Create all resource records (Pass 1) and build a source_id → destination_id map so we know how each old MongoDB ID maps to its new counterpart.
- Update cross-reference fields in resource records (Pass 2) — e.g. a practitioner’s supervisorId or preferred_visiting_reasons now point at the newly created records.
- Create use cases with their resource-record references remapped to the new IDs.
Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Body
Request body for the import endpoint.
Uses plain Pydantic models (not Beanie documents) so the body can be parsed without a live MongoDB connection. The endpoint validates each item against the appropriate BaseConfig TypeAdapter after parsing.
Response
Successful Response
Summary returned by the import endpoint.
MongoDB id of the newly created integration.
Number of use cases successfully imported.
Number of resource records successfully imported.
Non-fatal errors from use-case/resource-record creation.