> For the complete documentation index, see [llms.txt](https://docs.mdintegrations.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mdintegrations.com/partner-api-reference/cases/general/get-a-case-by-partner-provided-external-id.md).

# Get a case by partner-provided external ID

Looks up a case using the external identifier a partner assigned to it when the case was created, scoped to that partner's own cases in their current environment. If exactly one match is found, it returns the same full case details as the get-case-by-ID endpoint; a missing or ambiguous external ID results in a 404 or 409 response.

```json
{"openapi":"3.1.0","info":{"title":"MD Integrations","version":"1.0.0"},"tags":[{"name":"Cases/General"}],"servers":[{"url":"https://api.mdintegrations.dev/v1","description":"Development"}],"security":[{"oauth2":[]}],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.mdintegrations.dev/v1/partner/auth/token","scopes":{"*":"Full partner account access"}}}}},"schemas":{"PatientResource":{"type":"object","properties":{"patient_id":{"type":"string"},"partner_id":{"type":"string"},"prefix":{"type":["string","null"]},"first_name":{"type":"string"},"middle_name":{"type":["string","null"]},"last_name":{"type":"string"},"external_id":{"type":["string","null"]},"metadata":{"type":["string","null"]},"email":{"type":"string"},"weight":{"type":"string"},"blood_pressure":{"type":"string"},"body_temperature":{"type":"string"},"oxygen_saturation":{"type":"string"},"special_necessities":{"type":"string"},"height":{"type":"string"},"date_of_birth":{"type":"string"},"gender":{"type":"integer"},"gender_label":{"type":"string"},"active":{"type":"string"},"phone_number":{"type":["string","null"]},"phone_type":{"type":"string"},"current_medications":{"type":"string"},"medical_conditions":{"type":"string"},"allergies":{"type":"string"},"pregnancy":{"type":"string"},"ssn":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"is_live":{"type":"string"},"exam_id":{"type":"string"},"recent_encounter_id":{"type":["string","null"]},"important_offering_case_id":{"type":["string","null"]},"clinician_id":{"type":["string","null"]},"dosespot":{"type":"string"},"clinician":{"$ref":"#/components/schemas/ClinicianResource"},"partner":{"$ref":"#/components/schemas/PartnerResource"},"driver_license":{"$ref":"#/components/schemas/DriverLicenseResource"},"address":{"$ref":"#/components/schemas/AddressResource"},"auth_link":{"type":"string"},"intro_video":{"$ref":"#/components/schemas/FileResource"},"patient_auth":{"anyOf":[{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"string"},"token_type":{"type":"string"}},"required":["access_token","refresh_token","expires_in","token_type"]},{"type":"object","properties":{"access_token":{"type":"null"},"refresh_token":{"type":"null"},"expires_in":{"type":"null"},"token_type":{"type":"null"}},"required":["access_token","refresh_token","expires_in","token_type"]}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TagResource"}},"metafields":{"type":"array","items":{"$ref":"#/components/schemas/MetafieldResource"}},"is_sms_enabled":{"type":"string"},"is_email_enabled":{"type":"string"},"shopify_customer_id":{"type":"string"},"woocommerce_customer_id":{"type":"string"},"original_patient_id":{"type":["string","null"]},"status":{"type":["string","null"]}},"required":["patient_id","partner_id","prefix","first_name","middle_name","last_name","external_id","metadata","email","weight","blood_pressure","body_temperature","oxygen_saturation","special_necessities","height","date_of_birth","gender","gender_label","active","phone_number","phone_type","current_medications","medical_conditions","allergies","pregnancy","ssn","created_at","is_live","exam_id","recent_encounter_id","important_offering_case_id","clinician_id","dosespot","partner","driver_license","address","intro_video","tags","metafields","is_sms_enabled","is_email_enabled","shopify_customer_id","woocommerce_customer_id","original_patient_id","status"],"title":"PatientResource"},"ClinicianResource":{"type":"object","properties":{"clinician_id":{"type":"string"},"is_online":{"type":"string"},"specialty":{"type":["string","null"]},"full_name":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"suffix":{"type":["string","null"]},"email":{"type":"string"},"date_of_birth":{"type":["string","null"]},"phone_number":{"type":"string","const":"(629) 777-5752"},"phone_type":{"type":["string","null"]},"fax_number":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"active":{"type":"string"},"managed_by_partner":{"type":"string"},"case_assignment_availability":{"type":"string"},"is_video_call_available":{"type":"boolean"},"is_message_availability":{"type":"string"},"photo":{"anyOf":[{"$ref":"#/components/schemas/FileResource"},{"type":"null"}]},"licenses":{"type":"array","items":{"$ref":"#/components/schemas/LicenseResource"}},"practice_areas":{"type":"array","items":{"$ref":"#/components/schemas/PracticeAreaResource"}},"signature":{"anyOf":[{"$ref":"#/components/schemas/FileResource"},{"type":"null"}]},"npdb":{"anyOf":[{"$ref":"#/components/schemas/FileResource"},{"type":"null"}]},"w9form_file":{"anyOf":[{"$ref":"#/components/schemas/FileResource"},{"type":"null"}]},"address":{"$ref":"#/components/schemas/AddressResource"},"partners":{"type":"array","items":{"$ref":"#/components/schemas/PartnerResource"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/RoleResource"}},"dosespot":{"type":"string"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResource"}},"bio_details":{"type":["string","null"]},"is_out_of_office":{"type":"string"},"out_of_office_at":{"type":["string","null"]},"out_of_office_return_at":{"type":["string","null"]},"out_of_office_message":{"type":["string","null"]},"automatic_sync_message":{"type":["string","null"]},"automatic_sync_video_file":{"$ref":"#/components/schemas/FileResource"},"thank_you_video_file":{"$ref":"#/components/schemas/FileResource"},"metafields":{"type":"array","items":{"$ref":"#/components/schemas/MetafieldResource"}},"epcs_requested":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"boolean"}]},"epcs_status":{"type":["string","null"]}},"required":["clinician_id","is_online","specialty","full_name","first_name","last_name","suffix","email","date_of_birth","phone_number","phone_type","fax_number","profile_url","active","managed_by_partner","case_assignment_availability","is_video_call_available","is_message_availability","photo","bio_details","is_out_of_office","out_of_office_at","out_of_office_return_at","out_of_office_message","automatic_sync_message","automatic_sync_video_file","thank_you_video_file","metafields","epcs_requested","epcs_status"],"title":"ClinicianResource"},"FileResource":{"type":"object","properties":{"file_id":{"type":"string"},"path":{"type":"string"},"name":{"type":"string"},"type":{"type":["string","null"]},"mime_type":{"type":"string"},"url":{"type":"string"},"url_thumbnail":{"type":"string"},"case_id":{"type":"string"},"metadata":{"type":["array","null"],"items":{}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TagResource"}}},"required":["file_id","path","name","type","mime_type","url","url_thumbnail","metadata","created_at","updated_at"],"title":"FileResource"},"TagResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"notes":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"description":{"type":["string","null"]},"color":{"type":"string"},"type":{"type":"string"},"removable_role":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","notes","name","key","description","color","type","removable_role","created_at","updated_at"],"title":"TagResource"},"LicenseResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"clinician_id":{"type":"string"},"state_id":{"type":["string","null"]},"type":{"type":"string"},"value":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"state":{"description":"Relationships;","$ref":"#/components/schemas/StateResource"},"license_id":{"type":"string","description":"keep compatibility;"}},"required":["id","clinician_id","state_id","type","value","created_at","updated_at","deleted_at","license_id"],"title":"LicenseResource"},"StateResource":{"type":"object","properties":{"name":{"type":"string"},"abbreviation":{"type":"string"},"state_id":{"type":"string"},"is_sync":{"type":"string"},"country":{"$ref":"#/components/schemas/CountryResource"},"is_av_flow":{"type":"string"}},"required":["name","abbreviation","state_id","is_sync","country","is_av_flow"],"title":"StateResource"},"CountryResource":{"type":"object","properties":{"country_id":{"type":"string"},"name":{"type":"string"},"abbreviation":{"type":"string"}},"required":["country_id","name","abbreviation"],"title":"CountryResource"},"PracticeAreaResource":{"type":"object","properties":{"expires_at":{"type":["string","null"]},"is_expired":{"type":"string"},"is_sync":{"type":"string"},"license_number":{"type":"string"},"state":{"$ref":"#/components/schemas/StateResource"}},"required":["expires_at","is_expired","is_sync","license_number","state"],"title":"PracticeAreaResource"},"AddressResource":{"type":"object","properties":{"address":{"type":"string"},"address2":{"type":["string","null"]},"address_id":{"type":"string"},"zip_code":{"type":"string"},"city_name":{"type":["string","null"]},"state":{"$ref":"#/components/schemas/StateResource"}},"required":["address","address2","address_id","zip_code","city_name","state"],"title":"AddressResource"},"PartnerResource":{"type":"object","properties":{"partner_id":{"type":"string"},"notification_priority":{"type":["string","null"]},"notification_schedule":{"type":["integer","null"]},"is_patient_identity_verified":{"type":"string"},"name":{"type":"string"},"support_message_capability":{"type":["string","null"]},"patient_message_capability":{"type":["string","null"]},"provides_medications":{"type":"string"},"partner_notes":{"type":["string","null"]},"operations_support_email":{"type":["string","null"]},"escalation_support_email":{"type":["string","null"]},"customer_support_email":{"type":["string","null"]},"operation_country":{"$ref":"#/components/schemas/CountryResource"},"can_unlock_phi":{"type":"string"},"enable_av_flow":{"type":"string"},"is_auto_dl_flow":{"type":"string"},"is_review_required":{"type":"string"},"is_global_statistics_enabled":{"type":"string"},"is_patient_allowed_choose_notification_inbox":{"type":"string"},"is_ai_auto_summary_enabled":{"type":"string"},"is_sending_tracking_number_enabled":{"type":"string"},"enable_icd_bmi":{"type":"string"},"reassignment_interval":{"type":"integer"},"enable_automatic_sync_flow":{"type":"string"},"force_hold_status":{"type":"string"},"force_is_additional_approval_needed":{"type":"string"},"business_model":{"type":"string"},"customization":{"type":"string"},"thank_you_note_header":{"type":["string","null"]},"thank_you_note_footer":{"type":["string","null"]},"vouched_integration_type":{"type":"string"},"vouched_integration_charge":{"type":"string"},"text_message_integration_type":{"type":"string"},"text_message_integration_charge":{"type":"string"},"clinician_due_sync_case":{"type":"string"},"clinician_due_async_case":{"type":"string"},"clinician_due_sync_followup_encounter":{"type":"string"},"clinician_due_async_followup_encounter":{"type":"string"},"parent_partner_id":{"type":["string","null"]},"integration_type":{"type":["string","null"]},"onboarding_status":{"type":["string","null"]},"onboarding_progress":{"type":["string","null"]},"is_auto_patient_status_enabled":{"type":"string"},"image":{"type":["object","null"],"description":"It's called \"logo\" in other resource;","properties":{"file_id":{"type":"string"},"path":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":"string"},"url":{"type":"string"},"url_thumbnail":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":["array","null"],"items":{}}},"required":["file_id","path","name","mime_type","url","url_thumbnail","created_at","metadata"]}},"required":["partner_id","notification_priority","notification_schedule","is_patient_identity_verified","name","customer_support_email","operation_country","enable_av_flow","is_auto_dl_flow","is_review_required","is_global_statistics_enabled","is_patient_allowed_choose_notification_inbox","is_ai_auto_summary_enabled","is_sending_tracking_number_enabled","enable_icd_bmi","reassignment_interval","enable_automatic_sync_flow","force_hold_status","force_is_additional_approval_needed","customization","vouched_integration_type","parent_partner_id","integration_type","onboarding_status","onboarding_progress","is_auto_patient_status_enabled","image"],"title":"PartnerResource"},"RoleResource":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"title":"RoleResource"},"PermissionResource":{"type":"object","properties":{"name":{"type":"string","description":"Attributes;"}},"required":["name"],"title":"PermissionResource"},"MetafieldResource":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"model_type":{"type":"string"},"model_id":{"type":"string"},"key":{"type":"string"},"value":{"type":["string","null"]},"scope":{"type":"string"},"type":{"type":["string","null"]},"title":{"type":["string","null"]},"metadata":{"type":["string","null"]},"emailed_at":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}},"required":["id","model_type","model_id","key","value","scope","type","title","metadata","emailed_at","created_at","updated_at","deleted_at"]},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false}],"title":"MetafieldResource"},"DriverLicenseResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"type":{"type":["string","null"]},"mime_type":{"type":"string"},"path":{"type":"string"},"metadata":{"type":["array","null"],"items":{}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"url":{"type":"string","description":"Appended Attributes;"},"url_thumbnail":{"type":"string"},"pivot":{"type":"object","description":"Pivot Attributes (Partner);","properties":{"file_id":{"type":"string","description":"When loaded;"},"partner_id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["file_id","partner_id","title","type","created_at","updated_at"]},"file_id":{"type":"string","description":"Keep compatibility;"}},"required":["id","name","type","mime_type","path","metadata","created_at","updated_at","deleted_at","url","url_thumbnail","file_id"],"title":"DriverLicenseResource"},"PinnedEncounterResource":{"type":"object","properties":{"pinned_by":{"$ref":"#/components/schemas/ClinicianResource"},"pinned_to":{"$ref":"#/components/schemas/ClinicianResource"},"pinned_at":{"type":"string"},"reason":{"type":"string"}},"required":["pinned_by","pinned_to","pinned_at","reason"],"title":"PinnedEncounterResource"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}},"paths":{"/partner/cases/by-external-id/{externalId}":{"get":{"operationId":"v1.partners-app.cases.external-id.get","description":"Looks up a case using the external identifier a partner assigned to it when the case was created,\nscoped to that partner's own cases in their current environment. If exactly one match is found, it\nreturns the same full case details as the get-case-by-ID endpoint; a missing or ambiguous external\nID results in a 404 or 409 response.","summary":"Get a case by partner-provided external ID","tags":["Cases/General"],"parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string"}},{"name":"external_id","in":"query","required":true,"schema":{"type":"string","maxLength":255}},{"name":"partner_id","in":"query","schema":{"type":["string","null"],"format":"uuid"}},{"name":"is_live","in":"query","schema":{"type":["boolean","null"]}},{"name":"is_sandbox","in":"query","schema":{"type":["boolean","null"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"case_id":{"type":"string"},"soap_notes":{"type":"string"},"questionnaire_summary":{"type":"string"},"is_additional_approval_needed":{"type":"boolean"},"is_blocked_by_partner_state":{"type":"boolean"},"reference_case_id":{"type":"string"},"service_pdf_exported":{"type":"boolean"},"case_type":{"type":"string"},"is_chargeable":{"type":"boolean"},"charged_by":{"type":"string"},"is_sync":{"type":"boolean"},"external_id":{"type":"string"},"metadata":{"type":"object"},"patient_exam_id":{"type":"string"},"case_status":{"type":"object"},"created_at":{"type":"string"},"prioritized":{"type":"boolean"},"prioritized_at":{"type":"string"},"programs":{"type":"array","items":{}},"locked_at":{"type":"string"},"is_locked":{"type":"boolean"},"prioritized_reason":{"type":"string"},"partner":{"type":"object"},"case_assignment":{"type":"object"},"tags":{"type":"array","items":{}},"patient":{"$ref":"#/components/schemas/PatientResource"},"shopify_order_id":{"type":"string"},"case_cost":{"type":"number"},"pinned":{"type":"array","items":{"$ref":"#/components/schemas/PinnedEncounterResource"}}},"required":["case_id","soap_notes","questionnaire_summary","is_additional_approval_needed","is_blocked_by_partner_state","reference_case_id","service_pdf_exported","case_type","is_chargeable","charged_by","is_sync","external_id","metadata","patient_exam_id","case_status","created_at","prioritized","prioritized_at","programs","locked_at","is_locked","prioritized_reason","partner","case_assignment","tags","patient"]}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mdintegrations.com/partner-api-reference/cases/general/get-a-case-by-partner-provided-external-id.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
