> For the complete documentation index, see [llms.txt](https://knowlg.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowlg.sunbird.org/learn/product-and-developer-guide/dialcode/faqs.md).

# FAQs

How to create a DIAL code?

You should [create a publisher](https://documenter.getpostman.com/view/25463377/2s935hR7AM#81d8ee57-d567-4e62-829e-d3ee7c5671cf) in order to [create/generate a DIAL code](https://documenter.getpostman.com/view/25463377/2s935hR7AM#dc8b03d5-95e3-4314-a78a-ab61e9ebaa4e).

### How to generate QR Code images of DIAL codes?

You have to [reserve DIAL codes](https://documenter.getpostman.com/view/25463377/2s935hRnae#cb3a2a6e-2e4c-4a13-9cde-5abf9b848baa) for a textbook before downloading the QR Code images of the reserved DIAL codes. Once, the DIAL codes are reserved, you can [download QR code images](https://documenter.getpostman.com/view/25463377/2s935hR7AM#c70aa3ea-78c1-46ee-9ffe-0d194ff5c711) using the "processId" returned in the response of 'Reserve DIAL codes API'.

### How to link a DIAL code to content?

DIAL codes can only be linked to Collection and Collection Units at present. However, contents can be added to collection units and hence, make contents indirectly linked to DIAL codes.

Please follow this [link](/learn/product-and-developer-guide/dialcode/faqs/link-dial-code-to-a-book.md).

### How to check if a QR code is linked to a content?

The QR code image generated by the Sunbird-Ed will internally have a unique DIAL code linked to it. The URL format of the QR code is `<base_path>/<DIAL Code>`.

Below are the steps to extract the METADATA behind the QR code:

1. Extract the DIAL code from the URL of the QR code.
2. Use the DIAL code and trigger [content search API](https://documenter.getpostman.com/view/25463377/2s8ZDa3MP7#2c1683e9-8942-46b1-8177-eaa8ad5e95f4) with the below request body.

```
{
    "request": {
        "filters": {
            "visibility": ["Default" ,"Parent"],
            "dialcodes": "<DIAL Code>"
        },
        "mode": "collection"
    }
}
```

Content Search API is a public endpoint. With the above request body, the API will return METADATA of the contents which are linked to the specific QR code (or DIAL code).

In the API response,

"collections" block gives the information of the **TextBook** that contains the 'TextBookUnit' to which DIAL Code is tagged to. "identifier" - id of the TextBook, "name" - name of the TextBook, "board" - board value to which TextBook is tagged to. similarly, "medium", "gradeLevel" (Class) and "subject" values.

"content" block gives the information of the **TextBook Unit** DIAL Code is tagged to. "identifier" - id of the TextBook Unit, "name" - name of the TextBook Unit, "topic" - topics/concepts to which Unit is tagged with, **"children" - contents which are part of the TextBook Unit.**

### **How DIAL code search works?**

You can use [search DIAL code API](https://documenter.getpostman.com/view/25463377/2s935hR7AM#d8bad7a5-ee3c-411a-bd85-e7cbb89ae9d8) to fetch list of DIAL codes generated by a publisher of the tenant or to get the list of DIAL codes generated as part of a batchCode.

### How to define our own vocabulary to the dial code context?

You can add a new folder parallel to 'sb' under 'jsonld-schema' folder and mention the folder name in configuration: 'jsonld.type'. Folder can have 'schema.jsonld', 'context.json'  'contextValidation.json' files.

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowlg.sunbird.org/learn/product-and-developer-guide/dialcode/faqs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
