# Get QR Code of Public Card

Send a <mark style="color:green;">`POST`</mark> request to the server to receive the image URL for the dynamic QR code in response.

<mark style="color:green;">`POST`</mark> `/v1/public/card/{UUID}/qr-code`

#### Path Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| UUID<mark style="color:red;">\*</mark> | String | Card UUID   |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "url": "https://cdn.becard.me/live/card_qrcodes/39-*****.jpg"
}
```

{% endtab %}
{% endtabs %}

## Offline QR-Code

Offline? No problem. Generate and let the user download the offline QR code before heading to a location without an internet connection. Learn how to generate this as an alternative to the dynamic QR code through the API.

### STEP 1: Request a Signature Key

We need to send a request to the server, to get a signature key.

<mark style="color:green;">`POST`</mark> `/v1/public/card/{UUID}/qr-code/offline`

#### Path Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| UUID<mark style="color:red;">\*</mark> | String | Card UUID   |

{% tabs %}
{% tab title="200: OK " %}

```html
expires=1697764975&signature=c1747a63f5786029f748a6ef404d1574c885e2731444e9ab54f9fa3049c5436f
```

{% endtab %}
{% endtabs %}

### STEP 2: Request the offline QR-Code

As part of the initial response, you received an '<mark style="color:orange;">`expires`</mark>' and '<mark style="color:orange;">`signature`</mark>' value. For the <mark style="color:blue;">`GET`</mark> request, append this response as query parameters to obtain the offline QR code as a data image in `base64 format`.

<mark style="color:blue;">`GET`</mark> `/v1/public/card/{UUID}/qr-code/offline?{SIGNATURE}`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| UUID | String | Card UUID   |

#### Query Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| expires<mark style="color:red;">\*</mark>   | int    |             |
| signature<mark style="color:red;">\*</mark> | string |             |

{% tabs %}
{% tab title="200: OK " %}

```html
data:image/png;base64,iVBORw0KGgoAAAANSUhEU....
```

{% endtab %}
{% endtabs %}
