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

# Delete Logistics Request

> Delete a single logistics request (shipment) from your organization

# Delete Logistics Request

Permanently delete a logistics request (shipment leg) from your organization. This action cannot be undone.

<Warning>
  **Permanent Action**: Deleting a logistics request is permanent and cannot be undone. The associated emissions data will also be removed from your organization's totals. If the request belongs to a package, the package's aggregated emissions will be recalculated.
</Warning>

## Request

### Headers

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

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

### Path Parameters

<ParamField path="request_id" type="string" required>
  The unique identifier (UUID) of the logistics request to delete

  **Example:** `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

## Response

Returns `204 No Content` on successful deletion.

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X DELETE "https://api.dcycle.io/v1/logistics/requests/550e8400-e29b-41d4-a716-446655440000" \
    -H "x-api-key: ${DCYCLE_API_KEY}" \
    -H "x-organization-id: ${DCYCLE_ORG_ID}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests
  import os

  api_key = os.getenv("DCYCLE_API_KEY")
  org_id = os.getenv("DCYCLE_ORG_ID")
  request_id = "550e8400-e29b-41d4-a716-446655440000"

  headers = {
      "x-api-key": api_key,
      "x-organization-id": org_id
  }

  response = requests.delete(
      f"https://api.dcycle.io/v1/logistics/requests/{request_id}",
      headers=headers
  )

  if response.status_code == 204:
      print("Logistics request deleted successfully")
  else:
      print(f"Error: {response.json()}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const apiKey = process.env.DCYCLE_API_KEY;
  const orgId = process.env.DCYCLE_ORG_ID;
  const requestId = '550e8400-e29b-41d4-a716-446655440000';

  const headers = {
    'x-api-key': apiKey,
    'x-organization-id': orgId
  };

  axios.delete(
    `https://api.dcycle.io/v1/logistics/requests/${requestId}`,
    { headers }
  )
  .then(response => {
    if (response.status === 204) {
      console.log('Logistics request deleted successfully');
    }
  })
  .catch(error => console.error(error));
  ```
</CodeGroup>

### Successful Response

```
HTTP/1.1 204 No Content
```

No response body is returned on successful deletion.

## Common Errors

### 401 Unauthorized

**Cause:** Missing or invalid API key

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Invalid API key",
  "code": "INVALID_API_KEY"
}
```

### 404 Not Found

**Cause:** Logistics request not found or doesn't belong to your organization

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "code": "NOT_FOUND",
  "detail": "Logistics request not found"
}
```

**Solution:** Verify that:

1. The request ID is correct
2. The request belongs to the organization specified in `x-organization-id`
3. The record hasn't already been deleted

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Batch Delete Requests" icon="trash-can" href="/api-reference/logistics/batch-delete-requests">
    Delete multiple requests at once
  </Card>

  <Card title="Get Logistics Requests" icon="list" href="/api-reference/logistics/get-requests">
    Retrieve logistics requests
  </Card>

  <Card title="Create Logistics Request" icon="plus" href="/api-reference/logistics/create-request">
    Create a new shipment
  </Card>
</CardGroup>
