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

# List Orders

> Returns orders for a lab. The orders are returned sorted by creation date, with the most recent orders appearing first.

```http theme={null}
GET https://api.speccheckrx.com/v1/orders
```

### Authentication

This endpoint requires bearer token authentication.

### Headers

<ParamField header="Authorization" type="string" required="true">
  Your bearer token in the format `Bearer <token>`.
</ParamField>

<ParamField header="User-Email" type="string" required="true">
  The email address of the user making the request.

  Must exactly match the email address used to log in to the SpecCheck Dashboard.
</ParamField>

### Parameters

<ParamField query="lab" type="string" required="true">
  The ID of the lab for this request.
</ParamField>

<ParamField query="account_number" type="string" required="true">
  The lab account number for this request.
</ParamField>

<ParamField query="created" type="object">
  Only return orders that were created during the given date interval.
</ParamField>

<Expandable title="created">
  <ParamField query="created.gt" type="integer">
    Minimum value to filter by (exclusive).
  </ParamField>

  <ParamField query="created.gte" type="integer">
    Minimum value to filter by (inclusive).
  </ParamField>

  <ParamField query="created.lt" type="integer">
    Maximum value to filter by (exclusive).
  </ParamField>

  <ParamField query="created.lte" type="integer">
    Maximum value to filter by (inclusive).
  </ParamField>
</Expandable>

<ParamField query="ending_before" type="string">
  A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
</ParamField>

<ParamField query="starting_after" type="string">
  A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
</ParamField>

<ParamField query="limit" type="integer">
  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
</ParamField>

### Returns

Returns an object with a `data` array of orders and a `has_more` pagination flag. If there are no matching orders, `data` is an empty array.

<ResponseField name="has_more" type="boolean">
  Whether there are more orders available beyond this page.
</ResponseField>

<ResponseField name="data" type="array of Order Object">
  <Expandable title="Order">
    <ResponseField name="id" type="string">
      The unique identifier for the order.
    </ResponseField>

    <ResponseField name="tray_number" type="string">
      The tray number for the order.
    </ResponseField>

    <ResponseField name="invoice_number" type="string">
      The invoice number for the order.
    </ResponseField>

    <ResponseField name="lab_status" type="string">
      The current status of the order at the lab.
    </ResponseField>

    <ResponseField name="created" type="integer">
      Time at which the object was created. Measured in seconds since the Unix epoch.
    </ResponseField>

    <ResponseField name="updated" type="integer">
      Time at which the object was last updated. Measured in seconds since the Unix epoch.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "has_more": false,
    "data": [
      {
        "id": "ord_1234",
        "tray_number": "1234",
        "invoice_number": "1234",
        "lab_status": "in_progress",
        "created": 1710000000,
        "updated": 1710003600
      }
    ]
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash theme={null}
  curl -g "https://api.speccheckrx.com/v1/orders?lab={{LAB_ID}}&account_number={{ACCOUNT_NUMBER}}&created[gte]={{CREATED_GTE}}" \
    -H "Authorization: Bearer {{ACCESS_TOKEN}}" \
    -H "User-Email: {{USER_EMAIL}}"
  ```
</RequestExample>
