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

# List R/D Codes

> Look up the id of an R/D (recovery/disposal) treatment code, to send as waste_rd_code_id

[← Wastes API](/api-reference/wastes/overview)

The catalog of R/D codes: the recovery (`R…`) and disposal (`D…`) operations Dcycle accepts, from Annexes I and II of
the Waste Framework Directive 2008/98/EC plus `R14` (preparation for reuse), written with two digits (`R03`, not
`R3`). Send the `id` of an entry as `waste_rd_code_id` when you create wastes with
[`POST /v2/wastes`](/api-reference/wastes/create-v2) or update one with
[`PATCH /v1/wastes/{waste_id}`](/api-reference/wastes/update). The field is optional, but send it when you know the
treatment: without it only a factor defined for the LER code alone can be used.

Pass `ler_code_id` to get only the treatments that have an emission factor for that LER code. A pair outside that
list is stored, but its calculation ends as `CALCULATION_FAILED`; a pair in it usually calculates.

<Info>
  This replaces the deprecated `waste_efs_id`, a single id for a LER + R/D pair: now the [LER
  code](/api-reference/wastes/ler-codes) and the treatment are sent separately. The old catalog,
  [`GET /v1/waste-efs`](/api-reference/wastes/emission-factors), is read-only and no longer accepted on create or
  update.
</Info>

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

### Query Parameters

<ParamField query="ler_code_id" type="uuid">
  The `id` of a [LER code](/api-reference/wastes/ler-codes): returns only the treatments that have an emission factor
  for it. Omit it to get the full catalog.

  **Example:** `33d3e986-2e02-4aaa-8be0-708c143c02d9`
</ParamField>

## Response

Returns a plain array — not paginated.

<ResponseField name="id" type="string">
  UUID to send as `waste_rd_code_id` when creating a waste
</ResponseField>

<ResponseField name="code" type="string">
  R/D operation code, e.g. `R3`, `D1`
</ResponseField>

<ResponseField name="name" type="string">
  R/D code name/slug
</ResponseField>

<ResponseField name="description" type="string | null">
  Human-readable description
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET "https://api.dcycle.io/v1/wastes/rd-codes?ler_code_id=33d3e986-2e02-4aaa-8be0-708c143c02d9" \
    -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

  headers = {
      "x-api-key": os.getenv("DCYCLE_API_KEY"),
      "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
  }

  response = requests.get(
      "https://api.dcycle.io/v1/wastes/rd-codes",
      headers=headers,
      params={"ler_code_id": "33d3e986-2e02-4aaa-8be0-708c143c02d9"},
  )

  for rd_code in response.json():
      print(f"{rd_code['code']} → {rd_code['id']}")
  ```

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

  const headers = {
    'x-api-key': process.env.DCYCLE_API_KEY,
    'x-organization-id': process.env.DCYCLE_ORG_ID,
  };

  axios.get('https://api.dcycle.io/v1/wastes/rd-codes', {
    headers,
    params: { ler_code_id: '33d3e986-2e02-4aaa-8be0-708c143c02d9' },
  }).then(response => {
    response.data.forEach(rdCode => {
      console.log(`${rdCode.code} → ${rdCode.id}`);
    });
  });
  ```
</CodeGroup>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "id": "6617caab-9db0-40df-8716-54d8c94e8056",
    "code": "R03",
    "name": "recycling_recovery_of_organic_substances",
    "description": "Recycling/recovery of organic substances"
  }
]
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List LER Codes" icon="list" href="/api-reference/wastes/ler-codes">
    List waste type codes to scope this endpoint with `ler_code_id`
  </Card>

  <Card title="Create Wastes (v2)" icon="plus" href="/api-reference/wastes/create-v2">
    Create wastes with the `waste_rd_code_id` from this endpoint
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.