> 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/patients/orders/cancel-the-patients-order.md).

# Cancel the patient's order

Marks an existing order belonging to the patient as cancelled.

```json
{"openapi":"3.1.0","info":{"title":"MD Integrations","version":"1.0.0"},"tags":[{"name":"Patients/Orders"}],"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":{"PatientOrderResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"order_number":{"type":"string"},"status":{"type":"string"},"payment_status":{"type":"string"},"total_amount":{"type":"number"},"consultation_price":{"type":"number"},"billing":{"anyOf":[{"$ref":"#/components/schemas/PatientOrderBillingResource"},{"type":"null"}]},"tracking":{"anyOf":[{"$ref":"#/components/schemas/PatientOrderTrackingResource"},{"type":"null"}]},"products":{"type":"array","items":{"$ref":"#/components/schemas/PatientOrderProductResource"}},"patient_id":{"type":["string","null"]},"partner_id":{"type":["string","null"]},"case_id":{"type":["string","null"]},"case_order_id":{"type":["string","null"]},"patient_subscription_id":{"type":["string","null"]},"order_created_at":{"type":"string"},"cancelled_at":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"patient":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.PatientResource"},"partner":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.PartnerResource"},"case":{"description":"When loaded;","$ref":"#/components/schemas/CaseModelResource"},"case_order":{"description":"When loaded;","$ref":"#/components/schemas/CaseOrderResource"},"patient_subscription":{"description":"When loaded; Circular reference to PatientSubscriptionResource flattened to avoid an unbounded self-referential schema; see components.schemas.PatientSubscriptionResource for the full shape.","type":"object"}},"required":["id","order_number","status","payment_status","total_amount","consultation_price","billing","tracking","products","patient_id","partner_id","case_id","case_order_id","patient_subscription_id","order_created_at","cancelled_at","created_at","updated_at","deleted_at"],"title":"PatientOrderResource"},"PatientOrderBillingResource":{"type":"object","properties":{"card_id":{},"issuer":{},"type":{},"expire_date":{"anyOf":[{"type":"array","items":{}},{"type":"string"},{"type":"null"}]}},"required":["card_id","issuer","type","expire_date"],"title":"PatientOrderBillingResource"},"PatientOrderTrackingResource":{"type":"object","properties":{"number":{},"company":{},"link":{},"shipping_price":{}},"required":["number","company","link","shipping_price"],"title":"PatientOrderTrackingResource"},"PatientOrderProductResource":{"type":"object","properties":{"name":{},"description":{},"image_url":{},"unit_price":{},"amount":{},"total_amount":{"type":"number"},"offering_id":{},"file_id":{}},"required":["name","description","image_url","unit_price","amount","total_amount","offering_id","file_id"],"title":"PatientOrderProductResource"},"App.Http.Resources.PatientResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"first_name":{"type":"string"},"middle_name":{"type":["string","null"]},"last_name":{"type":"string"},"email":{"type":"string"},"ssn":{"type":["string","null"]},"active":{"type":"string"},"prefix":{"type":["string","null"]},"weight":{"type":"string"},"height":{"type":"string"},"blood_pressure":{"type":"string"},"body_temperature":{"type":"string"},"oxygen_saturation":{"type":"string"},"special_necessities":{"type":"string"},"date_of_birth":{"type":"string"},"gender":{"type":"integer"},"gender_label":{"type":"string"},"phone_number":{"type":["string","null"]},"phone_type":{"type":"string"},"address_id":{"type":"string"},"driver_license_id":{"type":["string","null"]},"allergies":{"type":"string"},"current_medications":{"type":"string"},"medical_conditions":{"type":"string"},"pregnancy":{"type":"string"},"partner_id":{"type":"string"},"environment_id":{"type":"string"},"clinician_id":{"type":["string","null"]},"metadata":{"type":["string","null"]},"intro_video_file_id":{"type":["string","null"]},"recent_encounter_id":{"type":["string","null"]},"important_offering_case_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"is_sms_enabled":{"type":"string"},"is_email_enabled":{"type":"string"},"original_patient_id":{"type":["string","null"]},"status":{"type":["string","null"]},"patient_id":{"type":"string","description":"Appended Attributes;"},"full_name":{"type":"string"},"abbreviated_name":{"type":"string"},"is_live":{"type":"string"},"intro_video_id":{"type":"string"},"exam_id":{"type":"string"},"dosespot":{"type":"string"},"metafields":{"type":"array","items":{"$ref":"#/components/schemas/MetafieldResource"}},"shopify_customer_id":{"type":"string"},"address":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.AddressResource"},"clinician":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.ClinicianResource"},"driver_license":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"environment":{"description":"When loaded;","$ref":"#/components/schemas/EnvironmentResource"},"intro_video":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"tags":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/App.Http.Resources.TagResource"}}},"required":["id","first_name","middle_name","last_name","email","ssn","active","prefix","weight","height","blood_pressure","body_temperature","oxygen_saturation","special_necessities","date_of_birth","gender","gender_label","phone_number","phone_type","address_id","driver_license_id","allergies","current_medications","medical_conditions","pregnancy","partner_id","environment_id","clinician_id","metadata","intro_video_file_id","recent_encounter_id","important_offering_case_id","created_at","updated_at","deleted_at","is_sms_enabled","is_email_enabled","original_patient_id","status","patient_id","full_name","abbreviated_name","is_live","intro_video_id","exam_id","dosespot","metafields","shopify_customer_id"],"title":"App.Http.Resources.PatientResource"},"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"},"App.Http.Resources.AddressResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"address":{"type":"string"},"address2":{"type":["string","null"]},"zip_code":{"type":"string"},"city_name":{"type":["string","null"]},"state_id":{"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/App.Http.Resources.StateResource"}},"required":["id","address","address2","zip_code","city_name","state_id","created_at","updated_at","deleted_at"],"title":"App.Http.Resources.AddressResource"},"App.Http.Resources.StateResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"abbreviation":{"type":"string"},"country_id":{"type":"string"},"is_av_flow":{"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"},"expires_at":{"type":"string","description":"Appended Attributes;"},"is_expired":{"type":"string"},"is_sync":{"type":"string"},"epcs_support":{"type":"string"},"license_number":{"type":"string"},"pivot":{"type":"object","description":"Pivot Attributes (Clinician);","properties":{"state_id":{"type":"string","description":"When loaded;"},"clinician_id":{"type":"string"},"expires_at":{"type":"string"},"license_number":{"type":"string"},"is_sync":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["state_id","clinician_id","expires_at","license_number","is_sync","created_at","updated_at"]},"country":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.CountryResource"}},"required":["id","name","abbreviation","country_id","is_av_flow","created_at","updated_at","deleted_at","expires_at","is_expired","is_sync","epcs_support","license_number"],"title":"App.Http.Resources.StateResource"},"App.Http.Resources.CountryResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"abbreviation":{"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","name","abbreviation","created_at","updated_at","deleted_at"],"title":"App.Http.Resources.CountryResource"},"App.Http.Resources.ClinicianResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"first_name":{"type":"string"},"last_name":{"type":"string"},"suffix":{"type":["string","null"]},"email":{"type":"string"},"phone_number":{"type":["string","null"]},"phone_type":{"type":["string","null"]},"photo_id":{"type":["string","null"]},"url_thumbnail":{"type":["string","null"]},"active":{"type":"string"},"bio_details":{"type":["string","null"]},"date_of_birth":{"type":["string","null"]},"address_id":{"type":["string","null"]},"specialty":{"type":["string","null"]},"fax_number":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"signature_id":{"type":["string","null"]},"npdb_id":{"type":["string","null"]},"case_assignment_availability":{"type":"string"},"is_video_call_available":{"type":"boolean"},"is_message_availability":{"type":"string"},"timezone_id":{"type":["string","null"]},"passcode_id":{"type":["string","null"]},"is_out_of_office":{"type":"string"},"out_of_office_message":{"type":["string","null"]},"out_of_office_at":{"type":["string","null"]},"out_of_office_return_at":{"type":["string","null"]},"automatic_sync_message":{"type":["string","null"]},"automatic_sync_video_file_id":{"type":["string","null"]},"thank_you_video_file_id":{"type":["string","null"]},"w9form_file_id":{"type":["string","null"]},"managed_by_partner":{"type":"string"},"epcs_requested":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"full_name":{"type":"string","description":"Appended Attributes;"},"is_online":{"type":"string"},"priority":{"type":"string"},"dosespot":{"type":"string"},"mfa_status":{"type":"string"},"licenses":{"type":"array","description":"Relationships;","items":{"$ref":"#/components/schemas/LicenseResource"}},"practice_areas":{"type":"array","items":{"$ref":"#/components/schemas/PracticeAreaResource"}},"address":{"description":"TODO improve this resource later moving it to microservice structure;","$ref":"#/components/schemas/App.Http.Resources.AddressResource"},"permissions":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/App.Http.Resources.PermissionResource"}},"photo":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"roles":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/App.Http.Resources.RoleResource"}},"signature":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"npdb":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"automatic_sync_video_file":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"thank_you_video_file":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"w9form_file":{"$ref":"#/components/schemas/App.Http.Resources.FileResource"},"offerings":{"type":"array","items":{"type":"object","description":"Circular reference to OfferingResource flattened to avoid an unbounded self-referential schema; see components.schemas.OfferingResource for the full shape."}},"metafields":{"type":"array","items":{"$ref":"#/components/schemas/MetafieldResource"}},"pivot":{"type":"object","description":"Pivot Attributes (Offering);","properties":{"offering_id":{"type":"string"},"clinician_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["offering_id","clinician_id","type","created_at","updated_at"]},"clinician_id":{"type":"string","description":"Keep compatibility;"}},"required":["id","first_name","last_name","suffix","email","phone_number","phone_type","photo_id","url_thumbnail","active","bio_details","date_of_birth","address_id","specialty","fax_number","profile_url","signature_id","npdb_id","case_assignment_availability","is_video_call_available","is_message_availability","timezone_id","passcode_id","is_out_of_office","out_of_office_message","out_of_office_at","out_of_office_return_at","automatic_sync_message","automatic_sync_video_file_id","thank_you_video_file_id","w9form_file_id","managed_by_partner","epcs_requested","created_at","updated_at","deleted_at","full_name","is_online","priority","mfa_status","metafields","clinician_id"],"title":"App.Http.Resources.ClinicianResource"},"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"},"App.Http.Resources.PermissionResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"pivot":{"type":"object","description":"Pivot Attributes (User);","properties":{"permission_id":{"type":"string","description":"When loaded;"},"model_id":{"type":"string"},"model_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["permission_id","model_id","model_type","created_at","updated_at"]}},"required":["id","name","created_at","updated_at"],"title":"App.Http.Resources.PermissionResource"},"App.Http.Resources.FileResource":{"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":"App.Http.Resources.FileResource"},"App.Http.Resources.RoleResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"pivot":{"type":"object","description":"Pivot Attributes (User);","properties":{"role_id":{"type":"string","description":"When loaded;"},"model_id":{"type":"string"},"model_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["role_id","model_id","model_type","created_at","updated_at"]}},"required":["id","name","created_at","updated_at"],"title":"App.Http.Resources.RoleResource"},"EnvironmentResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"identifier":{"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","identifier","created_at","updated_at","deleted_at"],"title":"EnvironmentResource"},"App.Http.Resources.TagResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"key":{"type":"string"},"description":{"type":["string","null"]},"color":{"type":"string"},"type":{"type":"string"},"removable_role":{"type":["string","null"]},"auto_detach_status":{"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"},"notes":{"type":"string","description":"Appended Attributes;"},"pivot":{"type":"object","description":"Pivot Attributes (Model Tag);","properties":{"tag_id":{"type":"string","description":"When loaded;"},"model_type":{"type":"string"},"model_id":{"type":"string"},"notes":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["tag_id","model_type","model_id","notes","created_at","updated_at"]}},"required":["id","name","key","description","color","type","removable_role","auto_detach_status","created_at","updated_at","deleted_at","notes"],"title":"App.Http.Resources.TagResource"},"App.Http.Resources.PartnerResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"is_patient_identity_verified":{"type":"string"},"name":{"type":"string"},"active":{"type":"string"},"logo_file_id":{"type":["string","null"]},"operation_country_id":{"type":"string"},"about":{"type":["string","null"]},"address_id":{"type":["string","null"]},"website_url":{"type":["string","null"]},"status":{"type":["string","null"]},"is_expedited":{"type":"string"},"customer_support_email":{"type":["string","null"]},"operations_support_email":{"type":["string","null"]},"escalation_support_email":{"type":["string","null"]},"patient_message_capability":{"type":["string","null"]},"support_message_capability":{"type":["string","null"]},"support_hours":{"type":["string","null"]},"support_location":{"type":["string","null"]},"enable_av_flow":{"type":"string"},"is_auto_dl_flow":{"type":"string"},"is_review_required":{"type":"string"},"is_statistics_enabled":{"type":"string"},"is_global_statistics_enabled":{"type":"string"},"is_patient_allowed_choose_notification_inbox":{"type":"string"},"is_sending_tracking_number_enabled":{"type":"string"},"is_ai_auto_summary_enabled":{"type":"string"},"enable_icd_bmi":{"type":"string"},"business_model":{"type":"string"},"use_intake_form":{"type":"string"},"is_voucher_reminder":{"type":"string"},"reassignment_interval":{"type":"integer"},"invoice_due_days":{"type":"integer"},"invoice_minimum_charge":{"type":["string","null"]},"enable_automatic_sync_flow":{"type":"string"},"force_hold_status":{"type":"string"},"force_is_additional_approval_needed":{"type":"string"},"use_messaging":{"type":"string"},"messaging_app_primary_color":{"type":["string","null"]},"messaging_app_secondary_color":{"type":["string","null"]},"messaging_app_background_color":{"type":["string","null"]},"notification_priority":{"type":["string","null"]},"notification_schedule":{"type":["integer","null"]},"partner_notes":{"type":["string","null"]},"parent_partner_id":{"type":["string","null"]},"parent_partner":{"type":["string","null"]},"thank_you_note_header":{"type":["string","null"]},"thank_you_note_footer":{"type":["string","null"]},"charge_sync_new_case":{"type":"string"},"charge_async_new_case":{"type":"string"},"charge_sync_follow_up_case":{"type":"string"},"charge_async_follow_up_case":{"type":"string"},"vouched_integration_type":{"type":"string"},"vouched_integration_charge":{"type":"string"},"text_message_integration_type":{"type":"string"},"text_message_integration_charge":{"type":"string"},"accepted_at":{"type":"string","format":"date-time"},"slack_channel_id":{"type":["string","null"]},"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"},"shopify_id":{"type":"string"},"shopify_url":{"type":"string","description":"Keep for front-end compatibility"},"is_shopify_active":{"type":"boolean","description":"Keep for front-end compatibility"},"custom_theme":{"type":["string","null"],"description":"Keep for front-end compatibility"},"custom_style":{"type":["string","null"]},"review_notes":{"type":["string","null"]},"contract_file_id":{"type":["string","null"]},"insurance_file_id":{"type":["string","null"]},"is_receiving_patient_transfers":{"type":"string"},"is_sending_patient_transfers":{"type":"string"},"is_patient_workflow_notification_enabled":{"type":"string"},"is_workflow_email_sms_enabled":{"type":"string"},"integration_type":{"type":["string","null"]},"recommendation_pageview_charge_amount":{"type":["string","null"]},"recommendation_encounter_charge_amount":{"type":["string","null"]},"onboarding_status":{"type":["string","null"]},"onboarding_progress":{"type":["string","null"]},"is_auto_patient_status_enabled":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time","description":"Timestamps;"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"integrations":{"type":"object","description":"external integrations","properties":{"woocommerce":{"type":["object","null"],"properties":{"id":{"type":"string"},"store_name":{"type":"string"},"store_url":{"type":"string"},"intake_flow":{"type":"string"}},"required":["id","store_name","store_url","intake_flow"]},"boothwyn":{"type":["object","null"],"properties":{"api_key":{"type":"string"}},"required":["api_key"]},"shopify":{"type":["object","null"],"properties":{"id":{"type":"string"},"store_url":{"type":"string"},"environment":{"type":"string"},"intake_flow":{"type":"string"}},"required":["id","store_url","environment","intake_flow"]}},"required":["woocommerce","boothwyn","shopify"]},"is_support_auto_archive_email_enabled":{"type":"string"},"ai":{"type":"object","properties":{"tone":{"type":"string"}},"required":["tone"]},"partner_id":{"type":"string","description":"Appended Attributes;"},"parent_partner_name":{"type":["string","null"]},"contract_file":{"$ref":"#/components/schemas/App.Http.Resources.FileResource"},"insurance_file":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"logo":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.FileResource"},"specialties":{"type":"array","description":"When loaded;","items":{"type":"object","description":"Circular reference to SpecialtyResource flattened to avoid an unbounded self-referential schema; see components.schemas.SpecialtyResource for the full shape."}},"pricing_tiers":{"type":"array","description":"When loaded;","items":{"type":"object","description":"Circular reference to PricingTierResource flattened to avoid an unbounded self-referential schema; see components.schemas.PricingTierResource for the full shape."}},"pivot":{"type":"object","description":"Pivot Attributes (Panel User);","properties":{"partner_id":{"type":"string","description":"When loaded;"},"panel_user_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"type":"string"}},"required":["partner_id","panel_user_id","created_at","updated_at","deleted_at"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/App.Http.Resources.TagResource"}}},"required":["id","is_patient_identity_verified","name","active","logo_file_id","operation_country_id","about","address_id","website_url","status","is_expedited","customer_support_email","operations_support_email","escalation_support_email","patient_message_capability","support_message_capability","support_hours","support_location","enable_av_flow","is_auto_dl_flow","is_review_required","is_global_statistics_enabled","is_patient_allowed_choose_notification_inbox","is_sending_tracking_number_enabled","is_ai_auto_summary_enabled","enable_icd_bmi","business_model","use_intake_form","is_voucher_reminder","reassignment_interval","enable_automatic_sync_flow","force_hold_status","force_is_additional_approval_needed","use_messaging","messaging_app_primary_color","messaging_app_secondary_color","messaging_app_background_color","notification_priority","notification_schedule","partner_notes","parent_partner_id","parent_partner","thank_you_note_header","thank_you_note_footer","charge_sync_new_case","charge_async_new_case","charge_sync_follow_up_case","charge_async_follow_up_case","vouched_integration_type","vouched_integration_charge","text_message_integration_type","text_message_integration_charge","accepted_at","contract_file_id","insurance_file_id","is_receiving_patient_transfers","is_sending_patient_transfers","is_patient_workflow_notification_enabled","is_workflow_email_sms_enabled","integration_type","onboarding_status","onboarding_progress","is_auto_patient_status_enabled","created_at","updated_at","deleted_at","integrations","is_support_auto_archive_email_enabled","ai","partner_id","parent_partner_name"],"title":"App.Http.Resources.PartnerResource"},"CaseModelResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"is_blocked_by_partner_state":{"type":"string"},"patient_id":{"type":"string"},"partner_id":{"type":"string"},"reference_case_id":{"type":["string","null"]},"is_sync":{"type":"string"},"is_additional_approval_needed":{"type":"string"},"case_type":{"type":"string"},"case_assignment_id":{"type":["string","null"]},"case_status_id":{"type":["string","null"]},"prioritized_at":{"type":["string","null"],"format":"date-time"},"locked_at":{"type":["string","null"],"format":"date-time"},"is_locked":{"type":"string"},"prioritized_reason":{"type":["string","null"]},"service_pdf_exported":{"type":"string"},"is_chargeable":{"type":"string"},"charged_by":{"type":["string","null"]},"partner_amount_charged":{"type":["number","null"]},"partner_offering_amount_charged":{"type":["number","null"]},"metadata":{"type":["string","null"]},"patient_exam_id":{"type":["string","null"]},"programs":{"type":["array","null"],"items":{}},"tier":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"prioritized":{"type":"string","description":"Appended Attributes;"},"patient":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.PatientResource"},"partner":{"description":"When loaded;","$ref":"#/components/schemas/App.Http.Resources.PartnerResource"},"case_assignment":{"description":"When loaded;","$ref":"#/components/schemas/EncounterAssignmentResource"},"case_status":{"description":"When loaded;","$ref":"#/components/schemas/EncounterStatusResource"},"case_prescriptions":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/EncounterPrescriptionResource"}},"case_notes":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/EncounterNoteResource"}},"case_services":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/EncounterServiceResource"}},"case_questions":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/EncounterQuestionResource"}},"tags":{"type":"array","description":"When loaded;","items":{"$ref":"#/components/schemas/App.Http.Resources.TagResource"}}},"required":["id","is_blocked_by_partner_state","patient_id","partner_id","reference_case_id","is_sync","is_additional_approval_needed","case_type","case_assignment_id","case_status_id","prioritized_at","locked_at","is_locked","prioritized_reason","service_pdf_exported","is_chargeable","charged_by","partner_amount_charged","partner_offering_amount_charged","metadata","patient_exam_id","programs","tier","created_at","updated_at","deleted_at","prioritized"],"title":"CaseModelResource"},"EncounterAssignmentResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"case_id":{"type":"string"},"clinician_id":{"type":"string"},"reason":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"clinician":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.ClinicianResource"}},"required":["id","case_id","clinician_id","reason","created_at","updated_at"],"title":"EncounterAssignmentResource"},"EncounterStatusResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"name":{"type":"string"},"reason":{"type":"string"},"updated_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","name","reason","updated_at","created_at"],"title":"EncounterStatusResource"},"EncounterPrescriptionResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"title":{"type":"string"},"name":{"type":"string"},"refills":{"type":"string"},"quantity":{"type":"string"},"days_supply":{"type":"string"},"directions":{"type":"string"},"dispense_unit_id":{"type":"string"},"is_additional_approval_needed":{"type":"string"},"pharmacy_id":{"type":"string"},"thank_you_note":{"type":"string"},"clinical_note":{"type":"string"},"dosespot_prescription_id":{"type":"string"},"status":{"type":"string"},"status_details":{"type":"string"},"pharmacy_notes":{"type":"string"},"no_substitutions":{"type":"string"},"dosespot_display_name":{"type":"string"},"medication":{"type":"string"},"offerable_type":{"type":"string"},"offerable_id":{"type":"string"},"updated_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","title","name","refills","quantity","days_supply","directions","dispense_unit_id","is_additional_approval_needed","pharmacy_id","thank_you_note","clinical_note","dosespot_prescription_id","status","status_details","pharmacy_notes","no_substitutions","dosespot_display_name","medication","offerable_type","offerable_id","updated_at","created_at"],"title":"EncounterPrescriptionResource"},"EncounterNoteResource":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"case_id":{"type":"string"},"clinician_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"clinician":{"description":"Relationships;","$ref":"#/components/schemas/App.Http.Resources.ClinicianResource"}},"required":["id","text","case_id","clinician_id","created_at","updated_at"],"title":"EncounterNoteResource"},"EncounterServiceResource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"service_type":{"type":"string"},"description":{"type":"string"},"additional_note":{"type":"string"},"thank_you_note":{"type":"string"},"clinical_notes":{"type":"string"},"pharmacy_fax_number":{"type":"string"},"include_drivers_license":{"type":"string"},"send_pdf_file_automatically":{"type":"string"},"order":{"type":"string"},"offerable_type":{"type":"string"},"offerable_id":{"type":"string"}},"required":["id","title","service_type","description","additional_note","thank_you_note","clinical_notes","pharmacy_fax_number","include_drivers_license","send_pdf_file_automatically","order","offerable_type","offerable_id"],"title":"EncounterServiceResource"},"EncounterQuestionResource":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"type":{"type":"string"},"important":{"type":"string"},"is_critical":{"type":"string"},"display_in_pdf":{"type":"string"},"description":{"type":"string"},"label":{"type":"string"},"displayed_options":{"type":"string"},"metadata":{"type":"string"}},"required":["id","question","answer","type","important","is_critical","display_in_pdf","description","label","displayed_options","metadata"],"title":"EncounterQuestionResource"},"CaseOrderResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"case_id":{"type":"string"},"external_id":{"type":"string"},"pharmacy_id":{"type":"string"},"prescriptions_id":{"type":"array","items":{}},"status":{"type":"string"},"details":{"type":["string","null"]},"status_details":{"type":["string","null"],"description":"retrocompatibility"},"status_metadata":{"type":["string","null"]},"number":{"type":["string","null"]},"date":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"tracking_metadata":{"type":["string","null"]},"tracked_at":{"type":["string","null"]},"sequence_number":{"type":["integer","null"]},"sequence_total":{"type":["integer","null"]},"sequence_order_id":{"type":["string","null"]},"acknowledged_at":{"type":["string","null"]},"acknowledged_id":{"type":["string","null"]},"acknowledged_metadata":{"type":["string","null"]},"payment_date":{"type":["string","null"]},"payment_status":{"type":["string","null"]},"pharmacy_name":{"type":["string","null"],"description":"appends;"},"case":{"$ref":"#/components/schemas/CaseByStatusResource"},"offerings":{"type":"array","items":{"$ref":"#/components/schemas/CaseOfferingResource"}},"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"status":{"type":"string"},"status_details":{"type":"string"},"number":{"type":"string"},"sequence_number":{"type":"string"},"sequence_total":{"type":"string"},"sequence_order_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"date":{"type":"string"}},"required":["id","external_id","status","status_details","number","sequence_number","sequence_total","sequence_order_id","created_at","updated_at","date"]}},"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","case_id","external_id","pharmacy_id","prescriptions_id","status","details","status_details","status_metadata","number","date","tracking_number","tracking_url","tracking_metadata","tracked_at","sequence_number","sequence_total","sequence_order_id","acknowledged_at","acknowledged_id","acknowledged_metadata","payment_date","payment_status","pharmacy_name","case","created_at","updated_at","deleted_at"],"title":"CaseOrderResource"},"CaseByStatusResource":{"type":"object","properties":{"case_id":{"type":"string","description":"Attributes;"},"external_id":{"type":"string"},"metadata":{"type":"string"},"is_additional_approval_needed":{"type":"string"},"prioritized_at":{"type":"string"},"programs":{"type":"string"},"tier":{"type":"string"},"prioritized_reason":{"type":"string"},"prioritized":{"type":"string"},"partner_id":{"type":"string"},"reference_case_id":{"type":"string"},"patient_exam_id":{"type":"string"},"service_pdf_exported":{"type":"string"},"case_type":{"type":"string"},"is_chargeable":{"type":"string"},"is_upsell_generated":{"type":"string"},"charged_by":{"type":"string"},"is_sync":{"type":"string"},"is_video_consult_required":{"type":"string"},"case_status":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string"},"updated_at":{"type":"string"},"created_at":{"type":"string"}},"required":["name","reason","updated_at","created_at"]},"created_at":{"type":"string"},"patient":{"type":"object","properties":{"patient_id":{"type":"string"},"date_of_birth":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"external_id":{"type":"string"},"metadata":{"type":"string"},"gender":{"type":"string"},"gender_label":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"pregnancy":{"type":"string"},"address":{"anyOf":[{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},{"type":"object","properties":{"address_id":{"type":"string"},"address":{"type":"string"},"address2":{"type":"string"},"city_name":{"type":"string"},"zip_code":{"type":"string"},"state":{"type":"object","properties":{"state_id":{"type":"string"},"abbreviation":{"type":"string"},"name":{"type":"string"},"is_sync":{"type":"string"},"country":{"type":"object","properties":{"state_id":{"type":"string"},"abbreviation":{"type":"string"}},"required":["state_id","abbreviation"]}},"required":["state_id","abbreviation","name","is_sync","country"]}},"required":["address_id","address","address2","city_name","zip_code","state"]}]}},"required":["patient_id","date_of_birth","first_name","last_name","external_id","metadata","gender","gender_label","email","phone_number","pregnancy","address"]},"case_assignment":{"anyOf":[{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},{"type":"object","properties":{"created_at":{"type":"string"},"reason":{"type":"string"},"clinician_id":{"type":"string"},"clinician":{"anyOf":[{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},{"type":"object","properties":{"clinician_id":{"type":"string"},"clinician_specialty":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"full_name":{"type":"string"},"is_online":{"type":"string"},"photo":{"type":["object","null"],"properties":{"url_thumbnail":{"type":"string"}},"required":["url_thumbnail"]}},"required":["clinician_id","clinician_specialty","first_name","last_name","full_name","is_online","photo"]}]}},"required":["created_at","reason","clinician_id","clinician"]}]},"case_prescriptions":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},"case_offerings":{"type":"array","items":{"type":"object","properties":{"case_offering_id":{"type":"string"},"case_prescription_id":{"type":"string"},"is_important":{"type":"string"},"order":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"}},"required":["case_offering_id","case_prescription_id","is_important","order","name","title"]}},"case_services":{"type":"string"},"diseases":{"type":"string"},"tags":{"type":"string"},"orders":{"type":"string"}},"required":["case_id","external_id","metadata","is_additional_approval_needed","prioritized_at","programs","tier","prioritized_reason","prioritized","partner_id","reference_case_id","patient_exam_id","service_pdf_exported","case_type","is_chargeable","is_upsell_generated","charged_by","is_sync","case_status","created_at","patient","case_assignment","case_prescriptions","case_offerings","case_services","diseases","tags","orders"],"title":"CaseByStatusResource"},"CaseOfferingResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"case_offering_id":{"type":"string"},"title":{"type":"string"},"name":{"type":"string"},"directions":{"type":"string"},"is_additional_approval_needed":{"type":"string"},"thank_you_note":{"type":"string"},"clinical_note":{"type":"string"},"status":{"type":"string"},"status_details":{"type":"string"},"has_recommendations":{"type":"string"},"recommendation_message":{"type":["string","null"],"description":"virtual attribute from CasePrescription model"},"store_url":{"type":["string","null"],"description":"virtual attribute from Offering model"},"product_name":{"type":["string","null"],"description":"virtual attribute from Offering model"},"image_file_id":{"type":["string","null"],"description":"virtual attribute from Offering model"},"order":{"type":"string","description":"virtual attribute from Offering model"},"upcharged":{"type":"string"},"offering_cost":{"type":"string"},"clinician_extra_fee":{"type":"string"},"is_important":{"type":"string"},"offerable_type":{"type":"string"},"offerable_id":{"type":"string"},"order_status":{"type":"string"},"order_date":{"type":"string"},"order_details":{"type":"string"},"order_updated":{"type":"string"},"programs":{"type":"string"},"external_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"type":"string"},"submitted_at":{"type":"string"},"product":{"type":"string"},"product_id":{"type":["string","null"]},"product_type":{"type":["string","null"]},"diseases":{"type":"array","items":{"$ref":"#/components/schemas/DiseaseResource"}}},"required":["id","case_offering_id","title","name","directions","is_additional_approval_needed","thank_you_note","clinical_note","status","status_details","has_recommendations","recommendation_message","store_url","product_name","image_file_id","order","upcharged","offering_cost","clinician_extra_fee","is_important","offerable_type","offerable_id","order_status","order_date","order_details","order_updated","programs","external_id","created_at","updated_at","deleted_at","submitted_at","product","product_id","product_type","diseases"],"title":"CaseOfferingResource"},"DiseaseResource":{"type":"object","properties":{"id":{"type":"string","description":"Attributes;"},"disease_id":{"type":"string"},"icd":{"type":"string"},"description":{"type":"string"},"dosespot_id":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"is_primary":{"type":"string"},"pivot":{"type":"object","description":"Pivot Attributes (Compound);","properties":{"disease_id":{"type":"string","description":"When loaded;"},"partner_compound_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["disease_id","partner_compound_id","created_at","updated_at"]}},"required":["id","disease_id","icd","description","dosespot_id","created_at","updated_at","deleted_at"],"title":"DiseaseResource"}}},"paths":{"/partner/patients/{patient}/orders/{order}/cancel":{"post":{"operationId":"v1.partner.patients.orders.cancel","description":"Marks an existing order belonging to the patient as cancelled.","summary":"Cancel the patient's order","tags":["Patients/Orders"],"parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"`PatientOrderResource`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOrderResource"}}}}}}}}}
```


---

# 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/patients/orders/cancel-the-patients-order.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.
