# Document Methods

### Sign hash

{% openapi src="/files/tS7iy6rAuIkGHKwGEjPi" path="/api/Document/Sign/{processId}" method="post" %}
[swagger.json](https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media\&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93)
{% endopenapi %}

### &#x20;Sign hash (JSON request)

{% openapi src="/files/tS7iy6rAuIkGHKwGEjPi" path="/api/Document/Sign/{processId}/json" method="post" %}
[swagger.json](https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media\&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93)
{% endopenapi %}

### Validate document (PDF report)

## Validate document (PDF report)

<mark style="color:green;">`POST`</mark> `/api/Document/Validate/Pdf/{processId}`

This method verifies the uploaded file in accordance with EIDAS guidelines. Verifies certification path and the signature. Generates a PDF report. The contents of file should be sent as a binary octet stream (<https://www.iana.org/assignments/media-types/application/octet-stream>)

#### Path Parameters

| Name                                        | Type    | Description |
| ------------------------------------------- | ------- | ----------- |
| processId<mark style="color:red;">\*</mark> | Integer |             |

#### Request Body

| Name                   | Type                   | Description |
| ---------------------- | ---------------------- | ----------- |
| \<binary-octet-stream> | \<binary-octet-stream> |             |

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

\<Base64 report pdf data>
{% endtab %}

{% tab title="404: Not Found Process not found" %}

{% endtab %}
{% endtabs %}

### Validate document (XML report)

## Validate document (XML report)

<mark style="color:green;">`POST`</mark> `/api/Document/Validate/Pdf/{processId}`

This method verifies the uploaded file in accordance with EIDAS guidelines. Verifies certification path and the signature. Generates a XML report. The contents of file should be sent as a binary octet stream (<https://www.iana.org/assignments/media-types/application/octet-stream>)

#### Path Parameters

| Name                                        | Type    | Description |
| ------------------------------------------- | ------- | ----------- |
| processId<mark style="color:red;">\*</mark> | Integer |             |

#### Request Body

| Name                   | Type                   | Description |
| ---------------------- | ---------------------- | ----------- |
| \<binary-octet-stream> | \<binary-octet-stream> |             |

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

\<XMLreport>
{% endtab %}

{% tab title="404: Not Found Process not found" %}

{% 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.signius.eu/api/seal-api/server-methods/document-methods.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.
