> ## 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 All Revisions for an Order

> Retrieve all revision requests created for a specific order

Retrieve all revision requests that have been created for a specific order. This endpoint provides a complete history of issues reported and changes requested for the order's delivered content.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/revision/60b8d6f1e1b9b1d8c6c0d8e1" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```javascript JavaScript theme={null}
  const orderId = "60b8d6f1e1b9b1d8c6c0d8e1";

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

  const revisions = await response.json();
  console.log(`Found ${revisions.length} revisions for order ${orderId}`);
  ```

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

  order_id = "60b8d6f1e1b9b1d8c6c0d8e1"

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

  response = requests.get(
      f'https://api-integration.ollang.com/integration/revision/{order_id}',
      headers=headers
  )

  revisions = response.json()
  print(f"Found {len(revisions)} revisions for order {order_id}")
  ```

  ```php PHP theme={null}
  $orderId = '60b8d6f1e1b9b1d8c6c0d8e1';

  $curl = curl_init();

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

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

  $revisions = json_decode($response, true);
  echo "Found " . count($revisions) . " revisions for order " . $orderId;
  ```

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

  import (
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      orderId := "60b8d6f1e1b9b1d8c6c0d8e1"
      url := fmt.Sprintf("https://api-integration.ollang.com/integration/revision/%s", orderId)

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

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

      var revisions []map[string]interface{}
      json.NewDecoder(resp.Body).Decode(&revisions)

      fmt.Printf("Found %d revisions for order %s\n", len(revisions), orderId)
  }
  ```

  ```java Java theme={null}
  import com.fasterxml.jackson.databind.JsonNode;
  import com.fasterxml.jackson.databind.ObjectMapper;

  String orderId = "60b8d6f1e1b9b1d8c6c0d8e1";

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

  ObjectMapper mapper = new ObjectMapper();
  JsonNode revisions = mapper.readTree(response.getBody());

  System.out.println("Found " + revisions.size() + " revisions for order " + orderId);
  ```
</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).

## Path Parameters

<ParamField path="orderId" type="string" required>
  The unique identifier of the order for which you want to retrieve all revision
  requests. This should be a valid order ID that you have access to.
</ParamField>

## Response

The endpoint returns an array of revision objects. Each revision object contains the following fields:

<ResponseField name="id" type="string">
  Unique identifier of the revision request.
</ResponseField>

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

<ResponseField name="type" type="string">
  The type of revision that was requested. Possible values: - `missingSubtitle`

  * Subtitle is missing at a specific time - `wrongSubtitle` - Subtitle content
    is incorrect - `syncError` - Subtitle timing is not synchronized with audio -
    `formatError` - Subtitle formatting issues - `other` - Other types of issues
</ResponseField>

<ResponseField name="time" type="string">
  Timestamp indicating where the issue occurs in the content (format:
  "HH:MM:SS").
</ResponseField>

<ResponseField name="description" type="string">
  Detailed description of the revision request, if provided.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "rev_60b8d6f1e1b9b1d8c6c0d8e1",
      "createdAt": "2024-01-17T10:30:00Z",
      "type": "wrongSubtitle",
      "time": "02:15:30",
      "description": "The subtitle at this timestamp is incorrectly translated. Should be 'Hello world' instead of 'Hello universe'."
    },
    {
      "id": "rev_60b8d6f1e1b9b1d8c6c0d8e2",
      "createdAt": "2024-01-17T14:45:00Z",
      "type": "syncError",
      "time": "01:42:15",
      "description": "Subtitle appears 2 seconds too late compared to the spoken dialogue."
    },
    {
      "id": "rev_60b8d6f1e1b9b1d8c6c0d8e3",
      "createdAt": "2024-01-18T09:20:00Z",
      "type": "missingSubtitle",
      "time": "03:28:45",
      "description": "No subtitle appears during the character's important monologue."
    }
  ]
  ```

  ```json 200 Empty Array theme={null}
  []
  ```

  ```json 404 theme={null}
  {
    "error": "Order not found",
    "message": "No order found with the provided orderId",
    "code": "ORDER_NOT_FOUND"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "Access denied",
    "message": "You don't have permission to view revisions for this order",
    "code": "ACCESS_DENIED"
  }
  ```

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