> 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/gsped-api-english-version/spedizioni-e-dintorni/refreshqr.md).

# RefreshQr

Renew the PUT URLs of the file defined in the QrCode

In combination with the feature that lets you [create a QrCode on the label](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/qrcode) (when uploading a file), the URLs are valid for 7 days.

With this endpoint, if they have expire&#x64;**, you can renew their validity window for another 7 days, up to a maximum of 4 times**.

## Renew the QrCode URLs

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

7 more days of validity from the time of the call, for a maximum of 4 renewals

#### Headers

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

{% tabs %}
{% tab title="200: OK URLs renewed successfully" %}

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

{% endtab %}

{% tab title="400: Bad Request Incorrect data" %}
Below is an example for when the maximum number of refreshes has been reached:

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

{% endtab %}
{% endtabs %}
