> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.enigmagenomics.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.enigmagenomics.com/_mcp/server.

# Update an existing order

PATCH https://api.enigmagenomics.com/orders/{oid}
Content-Type: application/json

The Update Order API enables clients to modify an existing order using its unique Order ID (oid). This endpoint is designed for scenarios where the order information needs correction or update.

Reference: https://docs.enigmagenomics.com/enigma-lis-integrations/orders/oid/update-an-existing-order

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /orders/{oid}:
    patch:
      operationId: Update an existing order
      summary: Update an existing order
      description: >-
        The Update Order API enables clients to modify an existing order using
        its unique Order ID (oid). This endpoint is designed for scenarios where
        the order information needs correction or update.
      tags:
        - oid
      parameters:
        - name: oid
          in: path
          description: '(Required) '
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/orders_{oid}_Update an existing
                  order_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                patient_details:
                  $ref: >-
                    #/components/schemas/OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetails
                shipping_details:
                  $ref: >-
                    #/components/schemas/OrdersOidPatchRequestBodyContentApplicationJsonSchemaShippingDetails
                primary_contact_details:
                  $ref: >-
                    #/components/schemas/OrdersOidPatchRequestBodyContentApplicationJsonSchemaPrimaryContactDetails
              required:
                - patient_details
                - shipping_details
                - primary_contact_details
servers:
  - url: https://api.enigmagenomics.com
    description: https://api.enigmagenomics.com
components:
  schemas:
    OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems:
      type: object
      properties:
        id:
          type: string
        age_of_manifestation:
          type: string
      required:
        - id
        - age_of_manifestation
      title: >-
        OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems
    OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems:
      type: object
      properties:
        id:
          type: string
        age_of_manifestation:
          type: string
      required:
        - id
        - age_of_manifestation
      title: >-
        OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems
    OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetails:
      type: object
      properties:
        age:
          type: string
        dob:
          type: string
        mrn:
          type: string
        tel:
          type: string
        email:
          type: string
        fname:
          type: string
        lname:
          type: string
        gender:
          type: string
        country:
          type: string
        ethnicity:
          type: string
        indication:
          type: string
        body_height:
          type: string
        body_weight:
          type: string
        countryCode:
          type: string
        nationality:
          type: string
        sample_type:
          type: string
        sample_count:
          type: string
        history_family:
          type: array
          items:
            $ref: >-
              #/components/schemas/OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems
        is_fetus_sample:
          type: string
        parents_related:
          type: string
        history_personal:
          type: array
          items:
            $ref: >-
              #/components/schemas/OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems
        secondary_findings:
          type: string
        parents_first_cousin:
          type: string
        additional_indication:
          type: string
        sample_collection_date:
          type: string
        sample_collection_time:
          type: string
      required:
        - age
        - dob
        - mrn
        - tel
        - email
        - fname
        - lname
        - gender
        - country
        - ethnicity
        - indication
        - body_height
        - body_weight
        - countryCode
        - nationality
        - sample_type
        - sample_count
        - history_family
        - is_fetus_sample
        - parents_related
        - history_personal
        - secondary_findings
        - parents_first_cousin
        - additional_indication
        - sample_collection_date
        - sample_collection_time
      title: OrdersOidPatchRequestBodyContentApplicationJsonSchemaPatientDetails
    OrdersOidPatchRequestBodyContentApplicationJsonSchemaShippingDetails:
      type: object
      properties:
        ship_to:
          type: string
        ship_lat:
          type: string
        ship_lng:
          type: string
        ship_state:
          type: string
        ship_country:
          type: string
        ship_areacode:
          type: string
        ship_locality:
          type: string
      required:
        - ship_to
        - ship_lat
        - ship_lng
        - ship_state
        - ship_country
        - ship_areacode
        - ship_locality
      title: OrdersOidPatchRequestBodyContentApplicationJsonSchemaShippingDetails
    OrdersOidPatchRequestBodyContentApplicationJsonSchemaPrimaryContactDetails:
      type: object
      properties:
        tel:
          type: string
        email:
          type: string
        fname:
          type: string
        lname:
          type: string
        country:
          type: string
        countryCode:
          type: string
      required:
        - tel
        - email
        - fname
        - lname
        - country
        - countryCode
      title: >-
        OrdersOidPatchRequestBodyContentApplicationJsonSchemaPrimaryContactDetails
    OrdersOidPatchResponsesContentApplicationJsonSchemaDataUpdatedAt:
      type: object
      properties:
        _seconds:
          type: integer
        _nanoseconds:
          type: integer
      required:
        - _seconds
        - _nanoseconds
      title: OrdersOidPatchResponsesContentApplicationJsonSchemaDataUpdatedAt
    OrdersOidPatchResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        oid:
          type: string
        status:
          type: string
        updatedAt:
          $ref: >-
            #/components/schemas/OrdersOidPatchResponsesContentApplicationJsonSchemaDataUpdatedAt
      required:
        - oid
        - status
        - updatedAt
      title: OrdersOidPatchResponsesContentApplicationJsonSchemaData
    orders_{oid}_Update an existing order_Response_200:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: >-
            #/components/schemas/OrdersOidPatchResponsesContentApplicationJsonSchemaData
        message:
          type: string
      required:
        - code
        - data
        - message
      title: orders_{oid}_Update an existing order_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

```

## Examples



**Request**

```json
{
  "patient_details": {
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "gender": "string",
    "country": "string",
    "ethnicity": "string",
    "indication": "string",
    "body_height": "string",
    "body_weight": "string",
    "countryCode": "string",
    "nationality": "string",
    "sample_type": "string",
    "sample_count": "string",
    "history_family": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "string",
        "age_of_manifestation": "string"
      }
    ],
    "is_fetus_sample": "yes",
    "parents_related": "no",
    "history_personal": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "string",
        "age_of_manifestation": "string"
      }
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "no",
    "additional_indication": "string",
    "sample_collection_date": "st",
    "sample_collection_time": "string"
  },
  "shipping_details": {
    "ship_to": "string",
    "ship_lat": "string",
    "ship_lng": "string",
    "ship_state": "string",
    "ship_country": "string",
    "ship_areacode": "string",
    "ship_locality": "string"
  },
  "primary_contact_details": {
    "tel": "stri",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "country": "string",
    "countryCode": "string"
  }
}
```

**Response**

```json
{
  "code": 200,
  "data": {
    "oid": "ORD20250831120015_987654",
    "status": "Updated",
    "updatedAt": {
      "_seconds": 1756700000,
      "_nanoseconds": 123000000
    }
  },
  "message": "Order updated successfully"
}
```

**SDK Code**

```python orders_{oid}_Update an existing order_example
import requests

url = "https://api.enigmagenomics.com/orders/string"

payload = {
    "patient_details": {
        "age": "string",
        "dob": "string",
        "mrn": "string",
        "tel": "string",
        "email": "string",
        "fname": "string",
        "lname": "string",
        "gender": "string",
        "country": "string",
        "ethnicity": "string",
        "indication": "string",
        "body_height": "string",
        "body_weight": "string",
        "countryCode": "string",
        "nationality": "string",
        "sample_type": "string",
        "sample_count": "string",
        "history_family": [
            {
                "id": "string",
                "age_of_manifestation": "string"
            },
            {
                "id": "string",
                "age_of_manifestation": "string"
            }
        ],
        "is_fetus_sample": "yes",
        "parents_related": "no",
        "history_personal": [
            {
                "id": "string",
                "age_of_manifestation": "string"
            },
            {
                "id": "string",
                "age_of_manifestation": "string"
            }
        ],
        "secondary_findings": "string",
        "parents_first_cousin": "no",
        "additional_indication": "string",
        "sample_collection_date": "st",
        "sample_collection_time": "string"
    },
    "shipping_details": {
        "ship_to": "string",
        "ship_lat": "string",
        "ship_lng": "string",
        "ship_state": "string",
        "ship_country": "string",
        "ship_areacode": "string",
        "ship_locality": "string"
    },
    "primary_contact_details": {
        "tel": "stri",
        "email": "string",
        "fname": "string",
        "lname": "string",
        "country": "string",
        "countryCode": "string"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript orders_{oid}_Update an existing order_example
const url = 'https://api.enigmagenomics.com/orders/string';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"patient_details":{"age":"string","dob":"string","mrn":"string","tel":"string","email":"string","fname":"string","lname":"string","gender":"string","country":"string","ethnicity":"string","indication":"string","body_height":"string","body_weight":"string","countryCode":"string","nationality":"string","sample_type":"string","sample_count":"string","history_family":[{"id":"string","age_of_manifestation":"string"},{"id":"string","age_of_manifestation":"string"}],"is_fetus_sample":"yes","parents_related":"no","history_personal":[{"id":"string","age_of_manifestation":"string"},{"id":"string","age_of_manifestation":"string"}],"secondary_findings":"string","parents_first_cousin":"no","additional_indication":"string","sample_collection_date":"st","sample_collection_time":"string"},"shipping_details":{"ship_to":"string","ship_lat":"string","ship_lng":"string","ship_state":"string","ship_country":"string","ship_areacode":"string","ship_locality":"string"},"primary_contact_details":{"tel":"stri","email":"string","fname":"string","lname":"string","country":"string","countryCode":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go orders_{oid}_Update an existing order_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.enigmagenomics.com/orders/string"

	payload := strings.NewReader("{\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"gender\": \"string\",\n    \"country\": \"string\",\n    \"ethnicity\": \"string\",\n    \"indication\": \"string\",\n    \"body_height\": \"string\",\n    \"body_weight\": \"string\",\n    \"countryCode\": \"string\",\n    \"nationality\": \"string\",\n    \"sample_type\": \"string\",\n    \"sample_count\": \"string\",\n    \"history_family\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"is_fetus_sample\": \"yes\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"no\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"st\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"shipping_details\": {\n    \"ship_to\": \"string\",\n    \"ship_lat\": \"string\",\n    \"ship_lng\": \"string\",\n    \"ship_state\": \"string\",\n    \"ship_country\": \"string\",\n    \"ship_areacode\": \"string\",\n    \"ship_locality\": \"string\"\n  },\n  \"primary_contact_details\": {\n    \"tel\": \"stri\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby orders_{oid}_Update an existing order_example
require 'uri'
require 'net/http'

url = URI("https://api.enigmagenomics.com/orders/string")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"gender\": \"string\",\n    \"country\": \"string\",\n    \"ethnicity\": \"string\",\n    \"indication\": \"string\",\n    \"body_height\": \"string\",\n    \"body_weight\": \"string\",\n    \"countryCode\": \"string\",\n    \"nationality\": \"string\",\n    \"sample_type\": \"string\",\n    \"sample_count\": \"string\",\n    \"history_family\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"is_fetus_sample\": \"yes\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"no\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"st\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"shipping_details\": {\n    \"ship_to\": \"string\",\n    \"ship_lat\": \"string\",\n    \"ship_lng\": \"string\",\n    \"ship_state\": \"string\",\n    \"ship_country\": \"string\",\n    \"ship_areacode\": \"string\",\n    \"ship_locality\": \"string\"\n  },\n  \"primary_contact_details\": {\n    \"tel\": \"stri\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java orders_{oid}_Update an existing order_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.enigmagenomics.com/orders/string")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"gender\": \"string\",\n    \"country\": \"string\",\n    \"ethnicity\": \"string\",\n    \"indication\": \"string\",\n    \"body_height\": \"string\",\n    \"body_weight\": \"string\",\n    \"countryCode\": \"string\",\n    \"nationality\": \"string\",\n    \"sample_type\": \"string\",\n    \"sample_count\": \"string\",\n    \"history_family\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"is_fetus_sample\": \"yes\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"no\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"st\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"shipping_details\": {\n    \"ship_to\": \"string\",\n    \"ship_lat\": \"string\",\n    \"ship_lng\": \"string\",\n    \"ship_state\": \"string\",\n    \"ship_country\": \"string\",\n    \"ship_areacode\": \"string\",\n    \"ship_locality\": \"string\"\n  },\n  \"primary_contact_details\": {\n    \"tel\": \"stri\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}")
  .asString();
```

```php orders_{oid}_Update an existing order_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.enigmagenomics.com/orders/string', [
  'body' => '{
  "patient_details": {
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "gender": "string",
    "country": "string",
    "ethnicity": "string",
    "indication": "string",
    "body_height": "string",
    "body_weight": "string",
    "countryCode": "string",
    "nationality": "string",
    "sample_type": "string",
    "sample_count": "string",
    "history_family": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "string",
        "age_of_manifestation": "string"
      }
    ],
    "is_fetus_sample": "yes",
    "parents_related": "no",
    "history_personal": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "string",
        "age_of_manifestation": "string"
      }
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "no",
    "additional_indication": "string",
    "sample_collection_date": "st",
    "sample_collection_time": "string"
  },
  "shipping_details": {
    "ship_to": "string",
    "ship_lat": "string",
    "ship_lng": "string",
    "ship_state": "string",
    "ship_country": "string",
    "ship_areacode": "string",
    "ship_locality": "string"
  },
  "primary_contact_details": {
    "tel": "stri",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "country": "string",
    "countryCode": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp orders_{oid}_Update an existing order_example
using RestSharp;

var client = new RestClient("https://api.enigmagenomics.com/orders/string");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"gender\": \"string\",\n    \"country\": \"string\",\n    \"ethnicity\": \"string\",\n    \"indication\": \"string\",\n    \"body_height\": \"string\",\n    \"body_weight\": \"string\",\n    \"countryCode\": \"string\",\n    \"nationality\": \"string\",\n    \"sample_type\": \"string\",\n    \"sample_count\": \"string\",\n    \"history_family\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"is_fetus_sample\": \"yes\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"no\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"st\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"shipping_details\": {\n    \"ship_to\": \"string\",\n    \"ship_lat\": \"string\",\n    \"ship_lng\": \"string\",\n    \"ship_state\": \"string\",\n    \"ship_country\": \"string\",\n    \"ship_areacode\": \"string\",\n    \"ship_locality\": \"string\"\n  },\n  \"primary_contact_details\": {\n    \"tel\": \"stri\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift orders_{oid}_Update an existing order_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "patient_details": [
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "gender": "string",
    "country": "string",
    "ethnicity": "string",
    "indication": "string",
    "body_height": "string",
    "body_weight": "string",
    "countryCode": "string",
    "nationality": "string",
    "sample_type": "string",
    "sample_count": "string",
    "history_family": [
      [
        "id": "string",
        "age_of_manifestation": "string"
      ],
      [
        "id": "string",
        "age_of_manifestation": "string"
      ]
    ],
    "is_fetus_sample": "yes",
    "parents_related": "no",
    "history_personal": [
      [
        "id": "string",
        "age_of_manifestation": "string"
      ],
      [
        "id": "string",
        "age_of_manifestation": "string"
      ]
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "no",
    "additional_indication": "string",
    "sample_collection_date": "st",
    "sample_collection_time": "string"
  ],
  "shipping_details": [
    "ship_to": "string",
    "ship_lat": "string",
    "ship_lng": "string",
    "ship_state": "string",
    "ship_country": "string",
    "ship_areacode": "string",
    "ship_locality": "string"
  ],
  "primary_contact_details": [
    "tel": "stri",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "country": "string",
    "countryCode": "string"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.enigmagenomics.com/orders/string")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```