# How to Generate Certificates

The DIVOC certificate generation service provides a ‘Certify” API for other eHealth systems, to generate digital certificates for specific events. With the help of this service, the user can generate a certificate that must have a QR code. The QR will have the link to the reference website or the database containing all the details of the required documents. These may include details such as name, document identification number, and license.

## API Structure

The API structure for the Certify API includes the following:

**Recipient information:** This section contains information about the beneficiary of the specific event (for example, the registration event).&#x20;

**Registration event information:** This includes details about the registration event such as name, year of passing, and college/university.&#x20;

**Issuer information:** It contains information about the issuing authority.

**Certificate information:** It includes details such as certificate ID and expiry date, among others.

## Create Certificate & Get Certificate ID Workflow

<figure><img src="/files/CS1eScc7rYERbzKFAwQ9" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/zlfLZjnhSLv47YcQvnUS" alt=""><figcaption></figcaption></figure>

### Step 1: Create Certificate (Certify)

* **Request method:** POST
* **Request URL:** {{baseUrl}}/vc-certification/v1/certify/EnitityName
* **Sample URL:** {{baseUrl}}/vc-certification/v1/certify/HealthProfessional\_1

#### Request Body

```
{
    "name": "Neha",
    "dob": "1991-11-29",
    "registrationId": "12345-6",
    "gender": "female",
    "registrationCouncil": "Karnataka",
    "latestQualification": "PostGraduate",
    "university": "Delhi University",
    "degreeYear": "2019",
    "systemOfMedicine": "Ayurveda",
    "registrationDate": "2023-01-09",
    "registrationExpiry": "2025-09-09",
    "issuer": "http://www.india.gov.in",
    "issuedOn": "2023-09-09",
    "validFrom":"2023-09-09T21:01:01.121Z",
    "validTill": "2025-09-09T21:01:01.121Z",
    "issuanceDate": "2023-09-09T21:01:01.121Z"
}
```

#### ResponseJson

```
{
    "transactionId": "63114647-b3a3-4863-a667-48d06b1c93c5"
}
```

### Step 2: Get Transaction

* **Request method:** GET
* **Request URL:** {{baseUrl}}/vc-management/v1/transaction/transactionId
* **Sample URL:** {{baseUrl}}/vc-management/v1/transaction/63114647-b3a3-4863-a667-48d06b1c93c5

#### ResponseJson

```
{
    "transactionId": "63114647-b3a3-4863-a667-48d06b1c93c5",
    "certificateId": "614894628867",
    "entityType": "HealthProfessional_1",
    "status": "SUCCESSFUL"
}
```

[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation*](https://egov.org.in/) *is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# Agent Instructions: 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:

```
GET https://divoc.digit.org/platform/divocs-verifiable-certificate-features-3.0/how-to-generate-certificates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
