> 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.

# Create a new order

POST https://api.enigmagenomics.com/orders
Content-Type: application/json

The Create Order API allows clients to initiate a new order by submitting comprehensive patient, contact, and shipping details.

Reference: https://docs.enigmagenomics.com/enigma-lis-integrations/orders/create-a-new-order

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /orders:
    post:
      operationId: Create a new order
      summary: Create a new order
      description: >-
        The Create Order API allows clients to initiate a new order by
        submitting comprehensive patient, contact, and shipping details.
      tags:
        - orders
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orders_Create a new order_Response_201'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                coupon:
                  $ref: >-
                    #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaCoupon
                patient_details:
                  $ref: >-
                    #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetails
                product_details:
                  $ref: >-
                    #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaProductDetails
                shipping_details:
                  $ref: >-
                    #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaShippingDetails
                primary_contact_details:
                  $ref: >-
                    #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaPrimaryContactDetails
              required:
                - coupon
                - patient_details
                - product_details
                - shipping_details
                - primary_contact_details
servers:
  - url: https://api.enigmagenomics.com
    description: https://api.enigmagenomics.com
components:
  schemas:
    OrdersPostRequestBodyContentApplicationJsonSchemaCoupon:
      type: object
      properties:
        code:
          type: string
      required:
        - code
      title: OrdersPostRequestBodyContentApplicationJsonSchemaCoupon
    OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems:
      type: object
      properties:
        id:
          type: string
        age_of_manifestation:
          type: string
      required:
        - id
        - age_of_manifestation
      title: >-
        OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems
    OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems:
      type: object
      properties:
        id:
          type: string
        age_of_manifestation:
          type: string
      required:
        - id
        - age_of_manifestation
      title: >-
        OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems
    OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetails:
      type: object
      properties:
        age:
          type: string
        dob:
          type: string
        mrn:
          type: string
        tel:
          type: string
        email:
          type: string
        fname:
          type: string
        lname:
          type: string
        natid:
          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/OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryFamilyItems
        is_fetus_sample:
          type: string
        parents_related:
          type: string
        history_personal:
          type: array
          items:
            $ref: >-
              #/components/schemas/OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetailsHistoryPersonalItems
        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
        - natid
        - 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: OrdersPostRequestBodyContentApplicationJsonSchemaPatientDetails
    OrdersPostRequestBodyContentApplicationJsonSchemaProductDetails:
      type: object
      properties:
        code:
          type: string
        add_ons:
          type: array
          items:
            type: string
      required:
        - code
        - add_ons
      title: OrdersPostRequestBodyContentApplicationJsonSchemaProductDetails
    OrdersPostRequestBodyContentApplicationJsonSchemaShippingDetails:
      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: OrdersPostRequestBodyContentApplicationJsonSchemaShippingDetails
    OrdersPostRequestBodyContentApplicationJsonSchemaPrimaryContactDetails:
      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: OrdersPostRequestBodyContentApplicationJsonSchemaPrimaryContactDetails
    OrdersPostResponsesContentApplicationJsonSchemaDataCreatedAt:
      type: object
      properties:
        _seconds:
          type: integer
        _nanoseconds:
          type: integer
      required:
        - _seconds
        - _nanoseconds
      title: OrdersPostResponsesContentApplicationJsonSchemaDataCreatedAt
    OrdersPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        oid:
          type: string
        status:
          type: string
        createdAt:
          $ref: >-
            #/components/schemas/OrdersPostResponsesContentApplicationJsonSchemaDataCreatedAt
      required:
        - oid
        - status
        - createdAt
      title: OrdersPostResponsesContentApplicationJsonSchemaData
    orders_Create a new order_Response_201:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: >-
            #/components/schemas/OrdersPostResponsesContentApplicationJsonSchemaData
        message:
          type: string
      required:
        - code
        - data
        - message
      title: orders_Create a new order_Response_201
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

```

## Examples



**Request**

```json
{
  "coupon": {
    "code": "string"
  },
  "patient_details": {
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "VEV  wX　",
    "lname": "  ",
    "natid": "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": "no",
    "parents_related": "no",
    "history_personal": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "stri",
        "age_of_manifestation": "string"
      }
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "notsure",
    "additional_indication": "string",
    "sample_collection_date": "string",
    "sample_collection_time": "string"
  },
  "product_details": {
    "code": "string",
    "add_ons": [
      "string",
      "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": "string",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "country": "string",
    "countryCode": "string"
  }
}
```

**Response**

```json
{
  "code": 201,
  "data": {
    "oid": "ORD20250831163045_984321",
    "status": "Draft",
    "createdAt": {
      "_seconds": 1756628445,
      "_nanoseconds": 123000000
    }
  },
  "message": "Order Created Successfully"
}
```

**SDK Code**

```python orders_Create a new order_example
import requests

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

payload = {
    "coupon": { "code": "string" },
    "patient_details": {
        "age": "string",
        "dob": "string",
        "mrn": "string",
        "tel": "string",
        "email": "string",
        "fname": "VEV  wX　",
        "lname": "  ",
        "natid": "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": "no",
        "parents_related": "no",
        "history_personal": [
            {
                "id": "string",
                "age_of_manifestation": "string"
            },
            {
                "id": "stri",
                "age_of_manifestation": "string"
            }
        ],
        "secondary_findings": "string",
        "parents_first_cousin": "notsure",
        "additional_indication": "string",
        "sample_collection_date": "string",
        "sample_collection_time": "string"
    },
    "product_details": {
        "code": "string",
        "add_ons": ["string", "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": "string",
        "email": "string",
        "fname": "string",
        "lname": "string",
        "country": "string",
        "countryCode": "string"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript orders_Create a new order_example
const url = 'https://api.enigmagenomics.com/orders';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"coupon":{"code":"string"},"patient_details":{"age":"string","dob":"string","mrn":"string","tel":"string","email":"string","fname":"VEV  wX　","lname":"  ","natid":"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":"no","parents_related":"no","history_personal":[{"id":"string","age_of_manifestation":"string"},{"id":"stri","age_of_manifestation":"string"}],"secondary_findings":"string","parents_first_cousin":"notsure","additional_indication":"string","sample_collection_date":"string","sample_collection_time":"string"},"product_details":{"code":"string","add_ons":["string","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":"string","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_Create a new order_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"coupon\": {\n    \"code\": \"string\"\n  },\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"VEV  wX　\",\n    \"lname\": \"  \",\n    \"natid\": \"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\": \"no\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"stri\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"notsure\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"string\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"product_details\": {\n    \"code\": \"string\",\n    \"add_ons\": [\n      \"string\",\n      \"string\"\n    ]\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\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", 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_Create a new order_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"coupon\": {\n    \"code\": \"string\"\n  },\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"VEV  wX　\",\n    \"lname\": \"  \",\n    \"natid\": \"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\": \"no\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"stri\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"notsure\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"string\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"product_details\": {\n    \"code\": \"string\",\n    \"add_ons\": [\n      \"string\",\n      \"string\"\n    ]\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\": \"string\",\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_Create a new order_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.enigmagenomics.com/orders")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"coupon\": {\n    \"code\": \"string\"\n  },\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"VEV  wX　\",\n    \"lname\": \"  \",\n    \"natid\": \"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\": \"no\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"stri\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"notsure\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"string\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"product_details\": {\n    \"code\": \"string\",\n    \"add_ons\": [\n      \"string\",\n      \"string\"\n    ]\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\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"string\",\n    \"lname\": \"string\",\n    \"country\": \"string\",\n    \"countryCode\": \"string\"\n  }\n}")
  .asString();
```

```php orders_Create a new order_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.enigmagenomics.com/orders', [
  'body' => '{
  "coupon": {
    "code": "string"
  },
  "patient_details": {
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "VEV  wX　",
    "lname": "  ",
    "natid": "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": "no",
    "parents_related": "no",
    "history_personal": [
      {
        "id": "string",
        "age_of_manifestation": "string"
      },
      {
        "id": "stri",
        "age_of_manifestation": "string"
      }
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "notsure",
    "additional_indication": "string",
    "sample_collection_date": "string",
    "sample_collection_time": "string"
  },
  "product_details": {
    "code": "string",
    "add_ons": [
      "string",
      "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": "string",
    "email": "string",
    "fname": "string",
    "lname": "string",
    "country": "string",
    "countryCode": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp orders_Create a new order_example
using RestSharp;

var client = new RestClient("https://api.enigmagenomics.com/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"coupon\": {\n    \"code\": \"string\"\n  },\n  \"patient_details\": {\n    \"age\": \"string\",\n    \"dob\": \"string\",\n    \"mrn\": \"string\",\n    \"tel\": \"string\",\n    \"email\": \"string\",\n    \"fname\": \"VEV  wX　\",\n    \"lname\": \"  \",\n    \"natid\": \"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\": \"no\",\n    \"parents_related\": \"no\",\n    \"history_personal\": [\n      {\n        \"id\": \"string\",\n        \"age_of_manifestation\": \"string\"\n      },\n      {\n        \"id\": \"stri\",\n        \"age_of_manifestation\": \"string\"\n      }\n    ],\n    \"secondary_findings\": \"string\",\n    \"parents_first_cousin\": \"notsure\",\n    \"additional_indication\": \"string\",\n    \"sample_collection_date\": \"string\",\n    \"sample_collection_time\": \"string\"\n  },\n  \"product_details\": {\n    \"code\": \"string\",\n    \"add_ons\": [\n      \"string\",\n      \"string\"\n    ]\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\": \"string\",\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_Create a new order_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "coupon": ["code": "string"],
  "patient_details": [
    "age": "string",
    "dob": "string",
    "mrn": "string",
    "tel": "string",
    "email": "string",
    "fname": "VEV  wX　",
    "lname": "  ",
    "natid": "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": "no",
    "parents_related": "no",
    "history_personal": [
      [
        "id": "string",
        "age_of_manifestation": "string"
      ],
      [
        "id": "stri",
        "age_of_manifestation": "string"
      ]
    ],
    "secondary_findings": "string",
    "parents_first_cousin": "notsure",
    "additional_indication": "string",
    "sample_collection_date": "string",
    "sample_collection_time": "string"
  ],
  "product_details": [
    "code": "string",
    "add_ons": ["string", "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": "string",
    "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")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```