> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecobalt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Orders

> Returns a list of orders for a patient.

### Example Request

```bash theme={null}
curl -X GET https://api.usecobalt.com/v1/orders \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-G \
--data-urlencode "patient_mrn=414421" \
--data-urlencode "start_date=2024-01-01" \
--data-urlencode "end_date=2024-03-31"
```

### Example Response

```json theme={null}
{
    "success": true,
    "orders": [
        {
            "order_id": "ord_123456",
            "order_name": "Comprehensive Metabolic Panel",
            "order_date": "2024-02-15",
            "provider_id": "prov_789",
            "patient_mrn": "414421",
            "patient_name": "Jane Smith",
            "patient_dob": "1980-06-15",
            "appointment_id": "appt_456",
            "priority": "routine",
            "assigned_to_name": "Jane Doe",
            "emr_assigned_to_id": "staff_101",
            "lab_results": null
        },
        {
            "order_id": "ord_789012",
            "order_name": "Chest X-Ray",
            "order_date": "2024-03-01",
            "provider_id": "prov_789",
            "patient_mrn": "414421",
            "patient_name": "Jane Smith",
            "patient_dob": "1980-06-15",
            "appointment_id": "appt_789",
            "priority": null,
            "assigned_to_name": null,
            "emr_assigned_to_id": null,
            "lab_results": null
        }
    ]
}
```


## OpenAPI

````yaml GET /orders
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /orders:
    get:
      summary: Get Orders
      description: Returns a list of orders for a patient.
      parameters:
        - in: query
          name: patient_mrn
          required: true
          schema:
            type: string
          description: The medical record number of the patient
        - in: query
          name: start_date
          schema:
            type: string
            format: date
          description: Filter orders after this date (ISO 8601 format)
        - in: query
          name: end_date
          schema:
            type: string
            format: date
          description: Filter orders before this date (ISO 8601 format)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        order_id:
                          type: string
                        order_name:
                          type: string
                        order_date:
                          type: string
                          format: date
                        provider_id:
                          type: string
                        patient_mrn:
                          type: string
                        patient_name:
                          type: string
                        patient_dob:
                          type: string
                          format: date
                        appointment_id:
                          type: string
                        priority:
                          type: string
                          nullable: true
                        assigned_to_name:
                          type: string
                          nullable: true
                        emr_assigned_to_id:
                          type: string
                          nullable: true
                        lab_results:
                          type: object
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````