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

# Get HOCs

> List all active logistics HOCs (Handling and Other Costs)

# Get HOCs

Retrieve all active logistics HOCs (Handling and Other Costs). HOCs represent additional logistics operations — like warehousing, loading, or customs handling — that contribute to the overall emission footprint.

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

## Response

Returns an array of HOC objects with HTTP 200. Each item contains:

<ResponseField name="id" type="string">
  HOC UUID
</ResponseField>

<ResponseField name="category" type="string">
  HOC category (e.g. `warehousing`, `loading`, `customs`)
</ResponseField>

<ResponseField name="iv" type="number">
  Emission intensity value (kgCO2e per tonne)
</ResponseField>

<ResponseField name="status" type="string">
  Record status: `active` or `deleted`
</ResponseField>

<ResponseField name="created_at" type="datetime">
  Creation timestamp (ISO 8601)
</ResponseField>

<ResponseField name="updated_at" type="string | null">
  Last update timestamp (ISO 8601)
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl "https://api.dcycle.io/v1/logistics/hocs" \
    -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

  response = requests.get(
      "https://api.dcycle.io/v1/logistics/hocs",
      headers={
          "x-api-key": os.getenv("DCYCLE_API_KEY"),
          "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
      },
  )

  hocs = response.json()
  for hoc in hocs:
      print(hoc)
  ```

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

  const response = await axios.get('https://api.dcycle.io/v1/logistics/hocs', {
    headers: {
      'x-api-key': process.env.DCYCLE_API_KEY,
      'x-organization-id': process.env.DCYCLE_ORG_ID,
    },
  });

  console.log('HOCs:', response.data);
  ```
</CodeGroup>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "category": "transshipment_ambient",
    "iv": 0.0052,
    "status": "active",
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  },
  {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "category": "transshipment_mixed",
    "iv": 0.0078,
    "status": "active",
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  }
]
```

<ResponseField name="id" type="string">
  HOC UUID.
</ResponseField>

<ResponseField name="category" type="string">
  HOC category describing the type of handling operation (e.g. `transshipment_ambient`, `transshipment_mixed`).
</ResponseField>

<ResponseField name="iv" type="number">
  Emission intensity value in kg CO2e per tonne.
</ResponseField>

## Common Errors

### 401 Unauthorized

**Cause:** Missing or invalid API key

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

### 403 Forbidden

**Cause:** The authenticated user is not a member of the organization

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Get TOCs" icon="route" href="/api-reference/logistics/get-tocs">
    List transport operation categories
  </Card>

  <Card title="Logistics Overview" icon="truck" href="/api-reference/logistics/overview">
    Module overview
  </Card>
</CardGroup>
