# 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 %}


---

# 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://apidocs.gsped.com/spedizioni-e-dintorni/refreshqr.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.
