> ## Documentation Index
> Fetch the complete documentation index at: https://docs.waec.org/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /certificate/confirmation/preview/{id}

> Retrieve a digital preview of a confirmed WAEC certificate by its confirmation ID.

This endpoint returns a digital preview of a confirmed certificate. Use the confirmation ID returned when the certificate was confirmed to fetch the viewable digital copy.

## Endpoint

| Environment | URL                                                                                       |
| ----------- | ----------------------------------------------------------------------------------------- |
| Production  | `GET https://api.waec.org/api/v1/external/certificate/confirmation/preview/{id}`          |
| Sandbox     | `GET https://api.smartdocument.org/api/v1/external/certificate/confirmation/preview/{id}` |

## Authentication

Required. Include your API Secret key in the `X-DigiCert-Secret` request header.

```text theme={null}
X-DigiCert-Secret: <your_api_secret_key>
```

Each environment uses a separate key. See [Environments](/configuration/environment) for details.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the confirmed certificate (for example, `48a78b36-073a-46cf-85d4-d1d4f5afb2cf`).
</ParamField>

## Example Request

```bash theme={null}
curl -X GET https://api.smartdocument.org/api/v1/external/certificate/confirmation/preview/48a78b36-073a-46cf-85d4-d1d4f5afb2cf \
  -H "X-DigiCert-Secret: <your_api_secret_key>"
```

## Response

The response returns the digital certificate content. This may be rendered as an image, PDF, or structured JSON object depending on the certificate type.

<ResponseField name="success" type="boolean">
  `true` when the certificate preview was retrieved successfully.
</ResponseField>

<ResponseField name="data" type="object">
  The digital certificate preview data, including the certificate image or document URL and associated metadata.
</ResponseField>

## Success Response

**Status: `200 OK`**

```json theme={null}
{
  "success": true,
  "data": {
    "id": "48a78b36-073a-46cf-85d4-d1d4f5afb2cf",
    "preview_url": "https://api.smartdocument.org/storage/certificates/48a78b36-073a-46cf-85d4-d1d4f5afb2cf/front.png",
    "candidate_number": "4251212055",
    "year": "2013",
    "country": "NG"
  }
}
```

## Error Cases

| Error Code     | HTTP Status | When it occurs                                        |
| -------------- | ----------- | ----------------------------------------------------- |
| `UNAUTHORIZED` | `401`       | The `X-DigiCert-Secret` header is missing or invalid  |
| `NOT_FOUND`    | `404`       | No confirmed certificate exists for the supplied `id` |
