> ## 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 Project By ID

> Retrieve detailed information about a specific project using its unique identifier

Retrieve comprehensive details about a specific project, including associated documents and metadata. This endpoint provides more detailed information than the projects list endpoint.

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

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

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

  const project = await response.json();
  console.log("Project details:", project);
  ```

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

  project_id = "60b8d6f1e1b9b1d8c6c0d8e1"

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

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

  project = response.json()
  print("Project details:", project)
  ```

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

  $curl = curl_init();

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

  $response = curl_exec($curl);
  $project = json_decode($response, true);
  curl_close($curl);

  echo "Project details: " . json_encode($project);
  ```

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

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

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

      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()

      body, _ := io.ReadAll(resp.Body)

      var project map[string]interface{}
      json.Unmarshal(body, &project)

      fmt.Println("Project details:", project)
  }
  ```

  ```java Java theme={null}
  String projectId = "60b8d6f1e1b9b1d8c6c0d8e1";
  String url = "https://api-integration.ollang.com/integration/project/" + projectId;

  HttpResponse<String> response = Unirest.get(url)
    .header("X-Api-Key", "<your-api-key>")
    .asString();

  JSONObject project = new JSONObject(response.getBody());
  System.out.println("Project details: " + project.toString());
  ```
</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="projectId" type="string" required>
  The unique identifier of the project to retrieve. This should be a valid
  MongoDB ObjectId that you have access to.
</ParamField>

## Response

The response contains detailed information about the requested project, including all associated documents.

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

<ResponseField name="name" type="string">
  Name of the project as provided during upload.
</ResponseField>

<ResponseField name="sourceLanguage" type="string">
  Source language of the project using ISO 639-1 language codes (e.g., "en",
  "tr", "fr").
</ResponseField>

<ResponseField name="createdAt" type="string">
  The date and time when the project was created in ISO 8601 format.
</ResponseField>

<ResponseField name="folderId" type="string">
  Identifier of the folder associated with the project for organization
  purposes.
</ResponseField>

<ResponseField name="projectDocs" type="array">
  Array of documents associated with the project, including source files and generated content.

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

    <ResponseField name="createdAt" type="string">
      The creation date of the document in ISO 8601 format.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      The last update date of the document in ISO 8601 format.
    </ResponseField>

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

    <ResponseField name="url" type="string">
      URL of the document for access or download.
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of the document. See [Document Types](#document-types) for available values.
    </ResponseField>

    <ResponseField name="size" type="number" optional>
      Size of the document in bytes.
    </ResponseField>

    <ResponseField name="storageUrl" type="string" optional>
      Storage URL of the document if different from the main URL.
    </ResponseField>

    <ResponseField name="wordCount" type="number" optional>
      Word count of the document, applicable to text documents.
    </ResponseField>

    <ResponseField name="duration" type="number" optional>
      Duration of the document if it is a media file, in seconds.
    </ResponseField>

    <ResponseField name="sourceLanguage" type="string" optional>
      Source language of the document, typically in ISO 639-1 format.
    </ResponseField>

    <ResponseField name="waveformUrl" type="string" optional>
      URL of the waveform image if applicable to audio documents.
    </ResponseField>

    <ResponseField name="projectId" type="string" optional>
      Identifier of the project this document is associated with.
    </ResponseField>

    <ResponseField name="orderId" type="string" optional>
      Identifier of the order this document is associated with.
    </ResponseField>

    <ResponseField name="clientId" type="string">
      Identifier of the client who owns the document.
    </ResponseField>

    <ResponseField name="thumbnailUrl" type="string" optional>
      URL of the thumbnail image of the document.
    </ResponseField>

    <ResponseField name="folderId" type="string" optional>
      Identifier of the folder where the document is stored.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="ordersCount" type="number" optional>
  Number of orders related to this project.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "60b8d6f1e1b9b1d8c6c0d8e1",
    "name": "Marketing Video Q4",
    "sourceLanguage": "en",
    "createdAt": "2024-01-15T10:30:45.511Z",
    "folderId": "60b8d6f1e1b9b1d8c6c0d8e2",
    "projectDocs": [
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e3",
        "createdAt": "2024-01-15T10:30:45.511Z",
        "updatedAt": "2024-01-15T10:35:22.847Z",
        "name": "marketing_video_q4.mp4",
        "url": "https://storage.ollang.com/files/marketing_video_q4.mp4",
        "type": "source_video",
        "size": 157286400,
        "duration": 240,
        "sourceLanguage": "en",
        "clientId": "60b8d6f1e1b9b1d8c6c0d8e4",
        "projectId": "60b8d6f1e1b9b1d8c6c0d8e1",
        "folderId": "60b8d6f1e1b9b1d8c6c0d8e2",
        "thumbnailUrl": "https://storage.ollang.com/thumbnails/marketing_video_q4.jpg"
      },
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e5",
        "createdAt": "2024-01-15T10:32:18.211Z",
        "updatedAt": "2024-01-15T10:32:18.211Z",
        "name": "marketing_video_waveform.png",
        "url": "https://storage.ollang.com/waveforms/marketing_video_waveform.png",
        "type": "created_waveform",
        "size": 524288,
        "clientId": "60b8d6f1e1b9b1d8c6c0d8e4",
        "projectId": "60b8d6f1e1b9b1d8c6c0d8e1",
        "folderId": "60b8d6f1e1b9b1d8c6c0d8e2"
      }
    ],
    "ordersCount": 3
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Project not found",
    "message": "No project found with the provided projectId",
    "code": "PROJECT_NOT_FOUND"
  }
  ```

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

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

  ```json 400 theme={null}
  {
    "error": "Invalid project ID",
    "message": "The provided projectId is not a valid MongoDB ObjectId",
    "code": "INVALID_PROJECT_ID"
  }
  ```
</ResponseExample>
