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

# Cancel Product

> Cancel a running extract. Stops an active extract job that is currently processing.

<Tip>
  **When to use:** Use this endpoint when you need to stop a product processing job that is currently running. This is useful if:

  * You started a processing job by mistake
  * The processing is taking longer than expected and you want to stop it
  * You need to free up resources for other operations
</Tip>

<Note>
  **Cancellation Requirements:** You can only cancel executions that are currently running. If an execution has already completed or failed, it cannot be canceled. The endpoint will return an error if you attempt to cancel a non-running execution.
</Note>

## Request

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField path="execution_id" type="string" required>
  The execution ID of the product processing job to cancel

  **Format:** `products-batch-{uuid}`

  **Note:** If the execution ID does not exist, the endpoint returns a 404 Not Found error.
</ParamField>

## Response

<ResponseField name="status" type="string">
  Status after cancellation. Always `"canceled"` on success.
</ResponseField>

<ResponseField name="execution_id" type="string">
  The execution identifier that was canceled
</ResponseField>

<ResponseField name="stop_date" type="string | null">
  ISO 8601 timestamp when the execution was stopped (null if not available)
</ResponseField>

<RequestExample dropdown>
  ```powershell cURL theme={null}
  curl -X DELETE "https://api.getcatalog.ai/v1/products/products-batch-550e8400-e29b-41d4-a716-446655440000" \
    -H "x-api-key: $CATALOG_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  // Cancel execution
  const executionId = 'products-batch-550e8400-e29b-41d4-a716-446655440000';

  const response = await fetch(
    `https://api.getcatalog.ai/v1/products/${executionId}`,
    {
      method: 'DELETE',
      headers: {
        'x-api-key': 'YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(`Execution ${data.execution_id} canceled at ${data.stop_date}`);
  ```

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

  execution_id = 'products-batch-550e8400-e29b-41d4-a716-446655440000'

  # Cancel execution
  response = requests.delete(
      f'https://api.getcatalog.ai/v1/products/{execution_id}',
      headers={'x-api-key': 'YOUR_API_KEY'}
  )

  data = response.json()
  print(f"Execution {data['execution_id']} canceled at {data['stop_date']}")
  ```
</RequestExample>

<ResponseExample>
  ```json DELETE Response theme={null}
  {
    "status": "canceled",
    "execution_id": "products-batch-550e8400-e29b-41d4-a716-446655440000",
    "stop_date": "2025-01-15T10:35:22.000Z"
  }
  ```
</ResponseExample>
