> 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/create-a-new-case-for-the-partner.md).

# Create a new Case for the Partner

Creates a new case for the given patient, optionally with a caller-supplied case ID and external ID. It runs the standard creation workflow (audit logging, tier calculation based on any supplied prescriptions, offerings, or services, and hold-status handling) before the case is returned.

```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":{"PostCaseRequest":{"type":"object","properties":{"case_id":{"type":["string","null"],"format":"uuid"},"reference_case_id":{"type":["string","null"],"format":"uuid"},"hold_status":{"type":["boolean","null"]},"is_additional_approval_needed":{"type":["boolean","null"]},"patient_id":{"type":"string"},"clinician_id":{"type":"string","format":"uuid"},"external_id":{"type":["string","null"],"maxLength":255},"metadata":{"type":["string","null"],"maxLength":255},"is_chargeable":{"type":["boolean","null"]},"is_video_consult_required":{"type":["boolean","null"]},"is_test":{"type":["boolean","null"]},"programs":{"type":"array","items":{"type":"string"}},"case_files":{"type":"array","items":{"type":"string","format":"uuid"}},"case_prescriptions":{"type":"array","items":{"type":"object","properties":{"refills":{"type":"integer","maximum":99},"days_supply":{"type":["integer","null"],"maximum":365},"quantity":{"type":"number","minimum":0,"maximum":9999999999},"directions":{"type":"string","maxLength":1000},"dispense_unit_id":{"type":"integer"},"pharmacy_id":{"type":"integer"},"dosespot_medication_id":{"type":"integer"},"partner_medication_id":{"type":"string","format":"uuid"},"partner_supply_id":{"type":"string","format":"uuid"},"dosespot_supply_ndc":{"type":"string"},"partner_compound_id":{"type":"string","format":"uuid"},"pharmacy_notes":{"type":["string","null"],"maxLength":210},"no_substitutions":{"type":"boolean"},"is_additional_approval_needed":{"type":["boolean","null"]},"effective_date":{"type":["string","null"],"format":"date"},"order":{"type":["integer","null"],"minimum":1},"is_insurance_check_needed":{"type":["boolean","null"]}}}},"case_offerings":{"type":"array","items":{"type":"object","properties":{"offering_id":{"type":"string","format":"uuid"},"pharmacy_notes":{"type":["string","null"],"maxLength":210},"is_additional_approval_needed":{"type":["boolean","null"]},"order":{"type":["integer","null"],"minimum":1}}}},"case_services":{"type":"array","items":{"type":"object","properties":{"partner_service_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"additional_note":{"type":["string","null"]},"clinical_notes":{"type":["string","null"]},"thank_you_note":{"type":["string","null"]},"pharmacy_fax_number":{"type":["string","null"]},"include_drivers_license":{"type":["boolean","null"]},"send_pdf_file_automatically":{"type":["boolean","null"]},"is_additional_approval_needed":{"type":["boolean","null"]},"service_type":{"type":"string"},"order":{"type":["integer","null"],"minimum":1}}}},"tags":{"type":["array","null"],"items":{"type":"object","properties":{"tag_id":{"type":["string","null"],"format":"uuid"}}}},"case_questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"type":{"type":"string"},"important":{"type":["boolean","null"]},"is_critical":{"type":["boolean","null"]},"display_in_pdf":{"type":["boolean","null"]},"displayed_options":{"type":["array","null"],"items":{"type":"string"}}},"required":["question","answer","type"]}},"diseases":{"type":["array","null"],"items":{"type":"object","properties":{"disease_id":{"type":["string","null"],"format":"uuid"}}}}},"required":["patient_id"],"title":"PostCaseRequest"}},"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":{"post":{"operationId":"v1.partners-app.cases.post","description":"Creates a new case for the given patient, optionally with a caller-supplied case ID and external\nID. It runs the standard creation workflow (audit logging, tier calculation based on any supplied\nprescriptions, offerings, or services, and hold-status handling) before the case is returned.","summary":"Create a new Case for the Partner","tags":["Cases/General"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCaseRequest"}}}},"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"},"patient":{"type":"object"},"partner":{"type":"object"},"case_assignment":{"type":"object"},"tags":{"type":"array","items":{}}},"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","patient","partner","case_assignment","tags"]}}}},"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/create-a-new-case-for-the-partner.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.
