---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [docs](../index.md) / readDoc

# Function: readDoc()

> **readDoc**(`id`): `string`

Defined in: [packages/b2c-tooling-sdk/src/docs/search.ts:89](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/docs/search.ts#L89)

Reads the content of a documentation file by its ID.

## Parameters

### id

`string`

The documentation ID (filename without .md extension)

## Returns

`string`

The raw markdown content of the document

## Throws

Error if the document is not found

## Example

```typescript
const content = readDoc('dw.catalog.ProductMgr');
console.log(content);
```
