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

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

# Function: readDoc()

> **readDoc**(`id`): `Promise`\<`string`\>

Defined in: [packages/b2c-tooling-sdk/src/docs/search.ts:469](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/docs/search.ts#L469)

Reads the full content of a documentation entry by its exact id.

Bundled entries are read from disk. Entries whose content is published online
(Developer Center guides) are fetched from their canonical URL; on network
failure a readable fallback assembled from the indexed metadata is returned.

## Parameters

### id

`string`

The documentation id

## Returns

`Promise`\<`string`\>

The document content (markdown)

## Throws

Error if the id is unknown
