> For the complete documentation index, see [llms.txt](https://apidocs.gsped.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.gsped.com/spedizioni-e-dintorni/refreshqr.md).

# RefreshQr

In abbinamento alla funzionalità che permette di [creare un QrCode in etichetta](/spedizioni-e-dintorni/shipment/shipment-objects/qrcode.md) (nel caso di caricamento file) gli URL hanno una validità di 7 giorni.

Tramite questo endpoint è possibile, nel caso siano scadut&#x69;**, rinnovare per ulteriori 7 giorni la finestra di validità degli stessi fino ad un massimo di 4 volte**.

## Rinnova gli URL dei QrCode

<mark style="color:blue;">`GET`</mark> `https://api.gsped.it/[ISTANZA]/shipment/refreshQr/[ID_SPEDIZIONE_GSPED]`

7 giorni di validità ulteriore dal momento della chiamata, per massimo 4 rinnovi

#### Headers

| Name                                        | Type   | Description             |
| ------------------------------------------- | ------ | ----------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Apikey fornita da Gsped |

{% tabs %}
{% tab title="200: OK URL rinnovati correttamente" %}

```json
{
    "result": {
        "qrCode": [
            {
                "putUrl": "XXXXXXXXX", // URL per il PUT
                "url": "XXXXXXXXX" // URL per il GET
            }
        ]
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Dati non corretti" %}
Esempio di seguito per massimo numero di refresh effettuati:

```json
{
    "error": "Max number of refresh reached", // messaggio errore
    "code": 400 // codice HTTP errore
}
```

{% endtab %}
{% endtabs %}
