---
title: "Update an order"
method: PUT
path: "/orders/{order_id}"
tags: ["Orders"]
---

# Update an order

`PUT /orders/{order_id}`

Modify an order that has not yet been submitted.

## Path parameters

- `order_id` string, required

## Headers

- `version-datavant` string — Version of the Orders API to use with this call

## Request body

- UpdateOrderRequest — Model for all delivery configuration fields (including those set at project/customer level). Should contain any fields that need to be referenced when creating the nested delivery config object
  - `delivery_type` DeliveryType[] — The preferred formats the charts should be delivered in.
  - `delivery_format` 'individual' | 'zipped' — An enumeration.
  - `structured_data_file_delivery_format` 'individual' | 'zipped' — An enumeration.
  - `delivery_filename_template` string — file naming template for charts to be delivered.
  - `delivery_manifest_included` boolean — Whether to include a manifest with the delivery.
  - `delivery_manifest_filename_template` string — file naming template for delivery manifests.
  - `delivery_manifest_file_extension` '.csv' | '.txt' | '.dat' — file extension for delivery manifests.
  - `delivery_manifest_delimiter` ',' | '|' | '	' — delimiter for delivery manifests.
  - `delivery_zip_filename_template` string — file naming template for zip file for when charts need to be zipped.
  - `delivery_frequency` 'continuous' | 'daily' | 'weekly' | 'biweekly' | 'monthly' | 'order_due_date' | 'each_document' — An enumeration.
  - `delivery_frequency_sub_option` union — A list of days for a weekly delivery, or a date (e.g. 5 for the 5th of the month) for a monthly delivery.
    - DeliveryFrequencyDay[]
    - integer
  - `delivery_schedule` string[] — A list of date times (in ISO format) for when deliveries should happen.
  - `delivery_timing` 'continuous' | 'scheduled' — An enumeration.
  - `delivery_location` 'api' | 'sftp' | 's3' — Additional delivery locations for documents (besides API)
  - `delivery_email_recipients` string[] — Email recipients for order delivery notifications.
  - `delivery_manifest_configuration` unknown
  - `zip_password` string, password — User can specify a password that will be applied to the zip file encryption on delivery
  - `merge_charts` boolean
  - `structured_data_extraction_report_configuration` StructuredDataExtractionReportConfiguration — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `delivery_schedule` string[] — List of datetimes (in ISO format) for when deliveries should happen
    - `deliver_automatically` boolean — Whether to deliver the report automatically
    - `delivery_schedule_options` union — Options for scheduling the delivery of the structured data extraction report.
      - DailyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'daily', required
      - WeeklyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` DeliveryFrequencyDay[], required
        - `delivery_frequency` 'weekly', required
      - BiweeklyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` DeliveryFrequencyDay[], required
        - `delivery_frequency` 'biweekly', required
      - MonthlyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` integer, required
        - `delivery_frequency` 'monthly', required
      - DueDateDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'order_due_date', required
      - EachDocumentDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'each_document', required
    - `filename_prefix` string, required — The filename will be <filename_prefix>_YYYY-MM-DD.csv
    - `include_npi` boolean
    - `include_diagnosis` boolean
    - `filter_encounters_by_requested_dos` boolean
    - `write_empty_encounters` boolean
  - `chart_detail_extract_report_configuration` ChartDetailExtractConfiguration — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `delivery_schedule` string[] — List of datetimes (in ISO format) for when deliveries should happen
    - `deliver_automatically` boolean — Whether to deliver the report automatically
    - `delivery_schedule_options` union — Options for scheduling the delivery of the structured data extraction report.
      - DailyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'daily', required
      - WeeklyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` DeliveryFrequencyDay[], required
        - `delivery_frequency` 'weekly', required
      - BiweeklyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` DeliveryFrequencyDay[], required
        - `delivery_frequency` 'biweekly', required
      - MonthlyDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` integer, required
        - `delivery_frequency` 'monthly', required
      - DueDateDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'order_due_date', required
      - EachDocumentDeliveryOptions — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `delivery_frequency_sub_option` unknown, required
        - `delivery_frequency` 'each_document', required
    - `filename_template` string, required — The template for the CDE report filename.
  - `name` string — User-friendly name for the order.
  - `project_id` string — ID for the project with which you want to associate the order.
  - `type` 'attorney' | 'datavant' | 'disability' | 'continuing_care' | 'copya' | 'copyi' | 'facility' | 'government' | 'insurance' | 'patient' | 'payd' | 'payi' | 'pro' | 'fac', required — An enumeration.
  - `due_date` string, date-time — Date by which record delivery should be complete. Default is 90 days from order submission.
  - `primary_reason` 'attorney' | 'hospital_lien' | 'patient_directive' | 'personal_injury' | 'social_security_disability' | 'subpoena' | 'workers_comp' | 'illinois_industrial_commission_subpoena' | 'florida_statute' | 'veterans_disability' | 'ssa_appeal_representative_form_1696' | 'patient_social_security_appeal' | 'life_sciences' | 'audit_of_claims' | 'clinical_research' | 'disability' | 'insurance' | 'medicare_medicaid' | 'rac' | 'revenue_cycle_management' | 'business_office_copy_risk_management' | 'special_project' | 'drg_payment_integrity' | 'hedis_audit' | 'hix' | 'radv' | 'standard_insurance_claim_payment' | 'utilization_review' | 'disability_gov_benefits' | 'forms_completion_by_provider' | 'patient_personal' | 'patient_transfer' | 'second_request_not_work_comp' | 'agency' | 'government_audit' | 'medicaid_dds' | 'non_profit' | 'state_dds' | 'workers_comp_board' | 'continuity_of_care' | 'ciox_audit' | 'mra' | 'ciox_real_world_data_team_request' | 'aca_hix' | 'drg' | 'underwriting' | 'claim' | 'general_attorney' | 'general_attorney_subpoena' | 'workers_comp_subpoena' | 'ssa_appeal' | 'pro_medicaid' | 'standard_pro' | 'value_based_care' | 'payd' | 'payer' | 'attestation' | 'unknown' — An enumeration.
  - `secondary_reason` 'aca' | 'defense_attorney' | 'defense_subpoena' | 'personal_injury' | 'state_attorney_office' | 'represent_indignant' | 'subpoena_second_request' | 'disability_gov_benefits' | 'ssi_claim_second_request' | 'hospital_per_admission' | 'no' | 'second_request' | 'social_security_appeal' | 'patient_social_security_appeal' | 'social_security_claim_appeal_second_request' | 'forms_completion_by_provider' | 'attorney_rep_pat' | 'appeal_second_request' | 'court_issued' | 'criminal' | 'subpoena' | 'workers_comp_subpoena' | 'subpoena_deposition_trial_testimony_with_records' | 'workers_comp_second_request' | 'workers_comp' | 'workers_comp_self_insured' | 'requested_by_patient' | 'requested_by_attorney' | 'drg_payment_integrity' | 'hedis_audit' | 'hix' | 'mra' | 'radv' | 'utilization_review' | 'short_term_long_term_claim' | 'second_request_insurance' | 'bc_bs_claim' | 'non_medical_insurance_claim' | 'standard_insurance_claim_payment' | 'underwriting' | 'pharmacy' | 'aps' | 'medicare_medicaid_utl_review' | 'medicare_medicaid_eligibility' | 'rac_medicaid' | 'second_request_workers_comp' | 'standard_workers_comp' | 'county' | 'dept_of_health_human_services' | 'dept_of_welfare' | 'family_and_child' | 'omap' | 'probation' | 'public_schools' | 'social_security_application' | 'veterans_affairs' | 'voc_rehab' | 'mi_family' | 'nc_prison' | 'attorney_general' | 'state_attorney' | 'federal_public_defender' | 'utilization_review_medicare_and_medicaid' | 'home_risk_assessment' | 'in_office_assessment' | 'payment_integrity' | 'post_payment_denials' | 'pre_payment_denials' | 'provider_as_requester' | 'switchboard_for_acos' | 'whole_person_understanding' — An enumeration.
  - `metadata` object — Miscellaneous configuration related to order that may be used for scheduling, reporting or billing purposes.
  - `contacts` Contacts — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `billing` LegalEntity — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
      - `phone_number` string — Phone number
      - `full_name` string — If entity is an organization or individual with only full name available include full_name
      - `first_name` string — If entity is an individual include first_name
      - `alternate_first_name` string — If entity is an individual and uses an alias or nickname include alternate_first_name
      - `middle_name` string — If entity is an individual include middle_name if applicable
      - `last_name` string — If entity is an individual include last_name
      - `prefix` string — If entity is an individual include name prefix if applicable
      - `suffix` string — If entity is an individual include name suffix if applicable
      - `id` string, required — An identifier that the Customer has assigned to this legal entity
      - `order_id` string — An identifier that this legal entity has assigned to this order
      - `address` Address — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `normalizations` unknown[]
          - unknown
        - `line1` string — Street address
        - `line2` string — Building, Suite#, Unit#, etc..
        - `city` string — City
        - `country` string — Country Code, ISO 3166-1 alpha-2 code
        - `state` string — State/Province Abbreviation Code, 2 characters
        - `postal_code` string — Postal Code, US - 5 digits or 5+4, Other - Alphanumeric
      - `health_plan` string
    - `customer` LegalEntity — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
      - `phone_number` string — Phone number
      - `full_name` string — If entity is an organization or individual with only full name available include full_name
      - `first_name` string — If entity is an individual include first_name
      - `alternate_first_name` string — If entity is an individual and uses an alias or nickname include alternate_first_name
      - `middle_name` string — If entity is an individual include middle_name if applicable
      - `last_name` string — If entity is an individual include last_name
      - `prefix` string — If entity is an individual include name prefix if applicable
      - `suffix` string — If entity is an individual include name suffix if applicable
      - `id` string, required — An identifier that the Customer has assigned to this legal entity
      - `order_id` string — An identifier that this legal entity has assigned to this order
      - `address` Address — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `normalizations` unknown[]
          - unknown
        - `line1` string — Street address
        - `line2` string — Building, Suite#, Unit#, etc..
        - `city` string — City
        - `country` string — Country Code, ISO 3166-1 alpha-2 code
        - `state` string — State/Province Abbreviation Code, 2 characters
        - `postal_code` string — Postal Code, US - 5 digits or 5+4, Other - Alphanumeric
      - `health_plan` string
  - `retrieval_sources` RetrievalSources[] — List of one or more Identified Switchboard sources to use when retrieving records. Default retrieval sources are based on configuration.
  - `retrieval_allow_block_configuration` RetrievalAllowBlockConfiguration — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `allow` AllowBlockGroup — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
      - `data_foundation_health_system_ids` string[] — The set of Data Foundation health system IDs that are allowed or blocked.
    - `block` AllowBlockGroup — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
      - `data_foundation_health_system_ids` string[] — The set of Data Foundation health system IDs that are allowed or blocked.
  - `alternate_delivery` AlternateDelivery — Delivery to an alternate entity separate from the primary requester.
    - `alternate` union — The alternate entity to deliver to.
      - Mail — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `method` 'mail', required
        - `entity` LegalEntity, required — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
          - `phone_number` string — Phone number
          - `full_name` string — If entity is an organization or individual with only full name available include full_name
          - `first_name` string — If entity is an individual include first_name
          - `alternate_first_name` string — If entity is an individual and uses an alias or nickname include alternate_first_name
          - `middle_name` string — If entity is an individual include middle_name if applicable
          - `last_name` string — If entity is an individual include last_name
          - `prefix` string — If entity is an individual include name prefix if applicable
          - `suffix` string — If entity is an individual include name suffix if applicable
          - `id` string, required — An identifier that the Customer has assigned to this legal entity
          - `order_id` string — An identifier that this legal entity has assigned to this order
          - `address` Address — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
            - `normalizations` unknown[]
              - …
            - `line1` string — Street address
            - `line2` string — Building, Suite#, Unit#, etc..
            - `city` string — City
            - `country` string — Country Code, ISO 3166-1 alpha-2 code
            - `state` string — State/Province Abbreviation Code, 2 characters
            - `postal_code` string — Postal Code, US - 5 digits or 5+4, Other - Alphanumeric
          - `health_plan` string
      - Sftp — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
        - `method` 'sftp', required
        - `entity` LegalEntity, required — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
          - `phone_number` string — Phone number
          - `full_name` string — If entity is an organization or individual with only full name available include full_name
          - `first_name` string — If entity is an individual include first_name
          - `alternate_first_name` string — If entity is an individual and uses an alias or nickname include alternate_first_name
          - `middle_name` string — If entity is an individual include middle_name if applicable
          - `last_name` string — If entity is an individual include last_name
          - `prefix` string — If entity is an individual include name prefix if applicable
          - `suffix` string — If entity is an individual include name suffix if applicable
          - `id` string, required — An identifier that the Customer has assigned to this legal entity
          - `order_id` string — An identifier that this legal entity has assigned to this order
          - `address` Address — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
            - `normalizations` unknown[]
              - …
            - `line1` string — Street address
            - `line2` string — Building, Suite#, Unit#, etc..
            - `city` string — City
            - `country` string — Country Code, ISO 3166-1 alpha-2 code
            - `state` string — State/Province Abbreviation Code, 2 characters
            - `postal_code` string — Postal Code, US - 5 digits or 5+4, Other - Alphanumeric
          - `health_plan` string
    - `use_only_alternate` boolean — Whether to deliver only to the alternate entity.
  - `manual_qa` boolean — Flag to indicate if manual QA is required
  - `coding_required` boolean — Flag to indicate if coding is required
  - `coding_required_v2` boolean — Flag to route coding through the new SB->Archon workflow instead of the legacy ARCH DB export.
  - `demand_id` integer — This field is used to link forecasts to Orders. DemandID can be a dummy value (99999) and does not have to be unique.
  - `wave` integer — This field is used to provide information to ChartFinder for traditional projects.Wave must be an integer between 1 and 9999.
  - `chart_review_year` integer — This field is used to provide information to ChartFinder for traditional projects.Chart Review Year must be an integer between 2022 and 2025.
  - `target_yield` number — This field is used to provide information to ChartFinder for traditional projects.Target Yield must be a float between 0 and 1.
  - `yield_type` integer — This field is used to provide information to ChartFinder for traditional projects.Must be an integer between 1 and 3.
  - `ticket_number` string
  - `coding_configuration` CodingConfiguration — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `deliver_records` boolean, required — Whether to deliver records to the customer in addition to the coding output.
    - `deliver_only_codeable_records` boolean — Whether to deliver only codeable records to the customer.
    - `deliver_records_before_coding` boolean — Whether to deliver records to the customer before the coding project is finished.
  - `chart_finder_config` ChartFinderConfiguration — A custom BaseModel with the eventual goal of populating inheriting models with the value property of enums rather than the raw enum. For now this is set to False (default setting) and we only set enum values to true within the models that have enums we know we need to use the values for.
    - `coding` boolean — Does this client use Datavant for coding?
    - `audit_type` integer — Audit type for this project.
    - `review_type` union — Audit type for this project.
      - string
      - integer
    - `idsb_handling_qa` 0 | 1 — IDSB Handling QA for this project.
    - `idsb_retrieving` 0 | 1 — IDSB directly using some retrieval methods without CF for this project.
    - `idsb_retrieving_embedded` 0 | 1 — IDSB directly retrieving for embedded retrieval methods for this project.
    - `account_manager_id` integer — Account Manager ID for this project.

## Response `204`

Successful Response

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/datavant/apis/datavant-rest-api.md) · [All operations](https://skmtc.net/datavant/apis/datavant-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datavant/datavant-rest-api/revisions/f39a4bfeca8e/schema)
