> ## 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.

# Delete a Specific Revision

> Delete a specific revision request that is no longer needed or was created in error

Delete a specific revision request that is no longer needed or was created in error. This action is irreversible, so use it carefully to remove revision requests that are no longer relevant.

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

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

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

  if (response.status === 204) {
    console.log("Revision deleted successfully");
  }
  ```

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

  order_id = "60b8d6f1e1b9b1d8c6c0d8e1"
  revision_id = "rev_60b8d6f1e1b9b1d8c6c0d8e2"

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

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

  if response.status_code == 204:
      print("Revision deleted successfully")
  ```

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

  $curl = curl_init();

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

  $response = curl_exec($curl);
  $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
  curl_close($curl);

  if ($httpCode === 204) {
      echo "Revision deleted successfully";
  }
  ```

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

  import (
      "fmt"
      "net/http"
  )

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

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

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

      if resp.StatusCode == 204 {
          fmt.Println("Revision deleted successfully")
      }
  }
  ```

  ```java Java theme={null}
  String orderId = "60b8d6f1e1b9b1d8c6c0d8e1";
  String revisionId = "rev_60b8d6f1e1b9b1d8c6c0d8e2";

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

  if (response.getStatus() == 204) {
      System.out.println("Revision deleted successfully");
  }
  ```
</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 that contains the revision you want to
  delete. This should be a valid order ID that you have access to.
</ParamField>

<ParamField path="revId" type="string" required>
  The unique identifier of the specific revision request you want to delete.
  This should be a valid revision ID that belongs to the specified order.
</ParamField>

## Response

This endpoint returns no content on successful deletion (HTTP 204 status code). The absence of an error response indicates that the revision was successfully deleted.

<ResponseExample>
  ```json 204 theme={null}
  No content - Revision deleted successfully
  ```

  ```json 404 theme={null}
  {
    "error": "Revision not found",
    "message": "No revision found with the provided revisionId for the specified order",
    "code": "REVISION_NOT_FOUND"
  }
  ```

  ```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 delete revisions for this order",
    "code": "ACCESS_DENIED"
  }
  ```

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

  ```json 400 theme={null}
  {
    "error": "Invalid revision",
    "message": "The revision does not belong to the specified order",
    "code": "REVISION_ORDER_MISMATCH"
  }
  ```
</ResponseExample>
