# Certificate

The VirtualCar360 vehicle certificate can be accessed independently of the Player through a dedicated Certificate API. The endpoint returns certificate links in several formats:

- a **widget** that can be embedded in an `iframe`,
- a **onepage** certificate view,
- downloadable **PDF** files in available languages.


Certificates can also be visible directly in the Player if they are available for a given vehicle. The Certificate API is intended for integrations that need to display or share the certificate outside the Player, for example on a vehicle page, in CRM, DMS or an administrative panel.

Information
If you use the Player, the certificate can be displayed directly in the Player interface. The Certificate API provides an extended, independent way to retrieve and embed the certificate.

## Access

The endpoint requires an `apiKey`. The key can be issued by VirtualCar360 support for:

- a single location,
- the entire organization,
- a group of locations or dealers.


The returned data depends on the permissions assigned to the key.

## Endpoint

```http
GET https://api-certificate.vc360.app/api/v1/{apiKey}/certificate/vin/{vin}
```

Example:

```http
GET https://api-certificate.vc360.app/api/v1/a0d8eb5cd984c08a58e7b88a/certificate/vin/WVWZZZ3H5RE500898
```

## Response example

```json
{
  "widget": "https://certificate.vc360.app/widget/inspection-pia/1f093ac5-dd71-6f24-8abc-c735770b85d5/pl",
  "onepage": "https://certificate.vc360.app/certificate/inspection-pia/1f093ac5-dd71-6f24-8abc-c735770b85d5/pl",
  "pdf": [
    {
      "language": "pl",
      "code": "pia-pdf",
      "fileUrl": "https://vc360inspectionstorage.blob.core.windows.net/inspectiondata/2025/pdf/example/example-pia-pdf-pl.pdf?..."
    },
    {
      "language": "en",
      "code": "pia-pdf",
      "fileUrl": "https://vc360inspectionstorage.blob.core.windows.net/inspectiondata/2025/pdf/example/example-pia-pdf-en.pdf?..."
    }
  ]
}
```

## Response fields

| Field | Type | Description |
|  --- | --- | --- |
| `widget` | `string` | URL to the widget certificate view. Best for embedding in an `iframe`. |
| `onepage` | `string` | URL to the full certificate page. Can be opened directly or embedded in an `iframe`. |
| `pdf` | `array` | List of available PDF certificate files. |
| `pdf[].language` | `string` | PDF language code, for example `pl` or `en`. |
| `pdf[].code` | `string` | PDF document type code, for example `pia-pdf`. |
| `pdf[].fileUrl` | `string` | URL to the PDF file. The URL may be temporary. |


## Embedding the widget

```html
<div class="certificate-widget-wrapper">
  <iframe
    src="https://certificate.vc360.app/widget/inspection-pia/1f093ac5-dd71-6f24-8abc-c735770b85d5/pl"
    title="VirtualCar360 vehicle certificate"
    frameborder="0"
    allowfullscreen
  ></iframe>
</div>
```

```css
.certificate-widget-wrapper {
  width: 100%;
  min-height: 720px;
}

.certificate-widget-wrapper iframe {
  width: 100%;
  height: 720px;
  border: 0;
}
```

## Onepage and PDF

The `onepage` URL can be used as a link or embedded in an iframe. The `pdf` array contains available PDF files in different languages.

Languages
Widget, onepage and PDF versions can be available in multiple languages. Available languages depend on certificate configuration and the API response.

## Certificate in the Player vs Certificate API

| Scenario | Recommended solution |
|  --- | --- |
| Certificate as part of a ready-made vehicle presentation | Player |
| Certificate embedded in a separate page section | `widget` in `iframe` |
| Certificate as a standalone page | `onepage` |
| Certificate for download or sending to a customer | `pdf` |
| Certificate in CRM or DMS | Certificate API |


## Best practices

- Fetch certificates through the customer's backend to avoid exposing `apiKey`.
- Use `widget` for embedded website views.
- Use `onepage` for opening the certificate as a separate page.
- Use `pdf` for downloadable documents.
- Handle multiple language versions.
- Do not assume that every vehicle has a certificate.
- Do not store temporary PDF URLs as permanent links.