# Hash

## hash

<mark style="color:blue;">`GET`</mark> `https://public-api.timesafe.io/hash/{hash}`

Questo servizio restituisce **true** o **false** in base alla presenza o meno del hash specificato come parametro tra i certificati dell'utente. \
L'hash passato può essere quello originale del file, quello calcolato dalla giustapposizione di hash del file e hash del codice fiscale dell'utente, o quello della transazione Ethereum.\
NOTA: se si cerca un hash di un certifica  creato con una modalità (live/sandbox) differente da quella dell'utenza che si sta usando, il servizio risponderà FALSE, anche se il certificato fosse presente.

#### Path Parameters

| Name | Type   | Description                                                                                                                  |
| ---- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| hash | string | Hash del file originale, della transazione ethereum o del risultante calcolato con il codice fiscale, **senza 0x iniziale.** |

#### Headers

| Name  | Type   | Description                               |
| ----- | ------ | ----------------------------------------- |
| token | string | Token JWT ottenuto traimte endpoint login |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
// HASH PRESENTE
{
    "status": "OK",
    "data": {
        "exists": true,
        "id": 93843
    }
}

// HASH NON PRESENTE
{
    "status": "OK",
    "data": {
        "exists": false
    }
}
```

{% 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://docs.public-api.timesafe.io/api/hash.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.
