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

# Get Orders

> Retrieve a list of translation orders with optional pagination and filters

Retrieve a list of your translation orders with optional pagination and filtering capabilities. This endpoint allows you to view and manage all your submitted orders.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/orders?pageOptions[page]=1&pageOptions[take]=10&pageOptions[search]=sample&pageOptions[orderBy]=createdAt&pageOptions[orderDirection]=desc" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```bash cURL with filters theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/orders" \
    -H "X-Api-Key: <your-api-key>" \
    -G \
    -d "pageOptions[page]=1" \
    -d "pageOptions[take]=20" \
    -d "filter[type]=cc" \
    -d "filter[name]=sample" \
    -d "filter[createdAtRange][from]=2024-01-01T00:00:00Z" \
    -d "filter[createdAtRange][to]=2024-12-31T23:59:59Z"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    "pageOptions[page]": "1",
    "pageOptions[take]": "10",
    "pageOptions[search]": "sample",
    "pageOptions[orderBy]": "createdAt",
    "pageOptions[orderDirection]": "desc",
  });

  const response = await fetch(
    `https://api-integration.ollang.com/integration/orders?${params}`,
    {
      method: "GET",
      headers: {
        "X-Api-Key": "<your-api-key>",
      },
    }
  );
  ```

  ```javascript JavaScript with filters theme={null}
  const params = new URLSearchParams({
    "pageOptions[page]": "1",
    "pageOptions[take]": "20",
    "filter[type]": "cc",
    "filter[name]": "sample",
    "filter[createdAtRange][from]": "2024-01-01T00:00:00Z",
    "filter[createdAtRange][to]": "2024-12-31T23:59:59Z",
  });

  const response = await fetch(
    `https://api-integration.ollang.com/integration/orders?${params}`,
    {
      headers: {
        "X-Api-Key": "<your-api-key>",
      },
    }
  );
  ```

  ```python Python theme={null}
  import requests

  params = {
      'pageOptions[page]': 1,
      'pageOptions[take]': 10,
      'pageOptions[search]': 'sample',
      'pageOptions[orderBy]': 'createdAt',
      'pageOptions[orderDirection]': 'desc'
  }

  headers = {
      'X-Api-Key': '<your-api-key>'
  }

  response = requests.get(
      'https://api-integration.ollang.com/integration/orders',
      params=params,
      headers=headers
  )
  ```

  ```python Python with filters theme={null}
  import requests

  params = {
      'pageOptions[page]': 1,
      'pageOptions[take]': 20,
      'filter[type]': 'cc',
      'filter[name]': 'sample',
      'filter[createdAtRange][from]': '2024-01-01T00:00:00Z',
      'filter[createdAtRange][to]': '2024-12-31T23:59:59Z'
  }

  headers = {
      'X-Api-Key': '<your-api-key>'
  }

  response = requests.get(
      'https://api-integration.ollang.com/integration/orders',
      params=params,
      headers=headers
  )
  ```

  ```php PHP theme={null}
  $params = http_build_query([
      'pageOptions' => [
          'page' => 1,
          'take' => 10,
          'search' => 'sample',
          'orderBy' => 'createdAt',
          'orderDirection' => 'desc'
      ]
  ]);

  $curl = curl_init();

  curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://api-integration.ollang.com/integration/orders?' . $params,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => array(
          'X-Api-Key: <your-api-key>'
      ),
  ));

  $response = curl_exec($curl);
  curl_close($curl);
  ```

  ```go Go theme={null}
  package main

  import (
      "fmt"
      "net/http"
      "net/url"
  )

  func main() {
      baseURL := "https://api-integration.ollang.com/integration/orders"

      params := url.Values{}
      params.Add("pageOptions[page]", "1")
      params.Add("pageOptions[take]", "10")
      params.Add("pageOptions[search]", "sample")
      params.Add("pageOptions[orderBy]", "createdAt")
      params.Add("pageOptions[orderDirection]", "desc")

      req, _ := http.NewRequest("GET", baseURL + "?" + params.Encode(), nil)
      req.Header.Set("X-Api-Key", "<your-api-key>")

      client := &http.Client{}
      resp, _ := client.Do(req)
  }
  ```

  ```java Java theme={null}
  String params = "pageOptions[page]=1&pageOptions[take]=10&pageOptions[search]=sample&pageOptions[orderBy]=createdAt&pageOptions[orderDirection]=desc";

  HttpResponse<String> response = Unirest.get("https://api-integration.ollang.com/integration/orders?" + params)
    .header("X-Api-Key", "<your-api-key>")
    .asString();
  ```
</RequestExample>

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard
* **Format**: `X-Api-Key: your-api-key-here`

You can obtain your API key from your [Ollang dashboard](https://lab.ollang.com).

## Query Parameters

### Pagination Parameters

<ParamField query="pageOptions[page]" type="number" default="1">
  The page number to retrieve. Must be 1 or greater.
</ParamField>

<ParamField query="pageOptions[take]" type="number" default="10">
  The number of items per page. Must be between 1 and 50.
</ParamField>

### Sorting Parameters

<ParamField query="pageOptions[orderBy]" type="string" default="id">
  The field to sort the results by. Common values: `id`, `createdAt`, `name`,
  `status`.
</ParamField>

<ParamField query="pageOptions[orderDirection]" type="string" default="desc">
  The direction to sort the results. Options: `asc`, `desc`.
</ParamField>

### Search Parameters

<ParamField query="pageOptions[search]" type="string">
  A search term to filter the results. Searches across order names and other
  relevant fields.
</ParamField>

### Filter Parameters

<ParamField query="filter[type]" type="string">
  Filter by order type. Common values are the five creatable types — `cc`,
  `subtitle`, `document`, `aiDubbing`, and `studioDubbing` (see
  [Order Types](/apis/ollang-api-reference/order-types)). Legacy or
  system-generated values (`proofreading`, `other`, `revision`) are also
  accepted and may match historical orders that were not created through
  [Create Order](/apis/ollang-api-reference/create-order).
</ParamField>

<ParamField query="filter[name]" type="string">
  Filter by the name of the order.
</ParamField>

<ParamField query="filter[createdAtRange][from]" type="string">
  Filter by creation date range - start date (ISO 8601 format).
</ParamField>

<ParamField query="filter[createdAtRange][to]" type="string">
  Filter by creation date range - end date (ISO 8601 format).
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of order objects containing order details.

  <Expandable title="Order Object Properties">
    <ResponseField name="id" type="string">
      Unique identifier of the order.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the order.
    </ResponseField>

    <ResponseField name="sourceLanguage" type="string">
      Source language of the order content.
    </ResponseField>

    <ResponseField name="targetLanguage" type="string">
      Target language for translation.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status of the order. Possible values: `pending`, `ongoing`, `completed`, `revision`, `delayed`,
      `waitingForCC`, `waitingForSubtitle`, `delivered`, `qualityCheck`, `readyToSent`.
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of the order. Possible values: `cc`, `subtitle`, `document`, `aiDubbing`, `studioDubbing`, `proofreading`,
      `other`, `revision`.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Creation date of the order (ISO 8601 format).
    </ResponseField>

    <ResponseField name="clientId" type="string">
      Client identifier associated with the order.
    </ResponseField>

    <ResponseField name="projectId" type="string">
      Project identifier associated with the order.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  Pagination metadata.

  <Expandable title="Meta Object Properties">
    <ResponseField name="page" type="number">
      Current page number.
    </ResponseField>

    <ResponseField name="take" type="number">
      Number of items per page.
    </ResponseField>

    <ResponseField name="itemCount" type="number">
      Number of items in current page.
    </ResponseField>

    <ResponseField name="pageCount" type="number">
      Total number of pages.
    </ResponseField>

    <ResponseField name="hasNextPage" type="boolean">
      Whether there is a next page available.
    </ResponseField>

    <ResponseField name="hasPreviousPage" type="boolean">
      Whether there is a previous page available.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e1",
        "name": "Sample Project - Episode 1",
        "sourceLanguage": "en",
        "targetLanguage": "fr",
        "status": "completed",
        "type": "cc",
        "createdAt": "2024-01-15T10:30:00Z",
        "clientId": "client_abc123",
        "projectId": "proj_xyz789"
      },
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e2",
        "name": "Corporate Training Video",
        "sourceLanguage": "en",
        "targetLanguage": "es",
        "status": "ongoing",
        "type": "aiDubbing",
        "createdAt": "2024-01-14T15:45:00Z",
        "clientId": "client_abc123",
        "projectId": "proj_xyz790"
      }
    ],
    "meta": {
      "page": 1,
      "take": 10,
      "itemCount": 2,
      "pageCount": 1,
      "hasNextPage": false,
      "hasPreviousPage": false
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Invalid pagination parameters",
    "message": "Page must be greater than 0 and take must be between 1 and 50",
    "code": "INVALID_PAGINATION"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing API key",
    "code": "UNAUTHORIZED"
  }
  ```
</ResponseExample>
