# 4. Sign Document

The portal orders that the signature process be executed via the browser.&#x20;

The URL to which the browser is redirected must be extracted from the JSON response from the previous operation i.e. creation of document signature process. Specifically, the redirect URL is extracted from the URL field of the only element currently contained in the tasks.pending array of a recently created signature process (an element whose type is always UserBrowserTask). The execution of the signature process of a document is finished by sending a redirect response to the application/portal browser with which the user requested the signature.

<mark style="color:blue;">`GET`</mark> <https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/ui?signerProcessId=1hfgt77ke36vq7oqhilhgo19ff26u64s>

#### Path Parameters

| Name            | Type   | Description                                                         |
| --------------- | ------ | ------------------------------------------------------------------- |
| signerProcessId | string | Identifier of the signature creation process whose result you want. |

#### Headers

| Name          | Type   | Description     |
| ------------- | ------ | --------------- |
| Authorization | string | Bearer \<token> |

{% tabs %}
{% tab title="302 If the operation is performed successfully, the body contains a JSON object with the following structure
{
"status": {string},
"details": {
"message": {string}
}
}

status (required):
Result of the document signature process:

* "finished": The process finished after all the documents were correctly signed.
* "failed": The process finished but no document was signed owing to an error.
* "failed\_documents": The process finished. Some of the documents were signed, but not all.
* "canceled": The process finished but no document was signed because the process was canceled.

details.message (Optional):
Additional information on the result of the document signature process.

Status of the finalized signature creation process (finished, failed or canceled):

* finished: The process has finalized after having successfully created the signature.
* failed: The process has terminated without being able to create the signature because an error occurred.
* canceled: The process terminated without a signature having been created because it was canceled.
* "failed\_documents": The process finished. Some of the documents were signed, but not all. " %}

```
Location: https://localhost:8080/callback?status=finished&signer_process_id=sp_c4eed0a1f478f72454803695d53c4c52
```

{% endtab %}
{% endtabs %}

> Example:\
> GET /trustedx-resources/esigp/v1/signatures/123-1234567/result HTTP/1.1 \
> Authorization: Bearer mF\_9.B5f-4.1JqM

### Response&#x20;

If the operation is performed successfully, the body contains a JSON object with the following structure

```
{
"status": {string}, "details": { "message": {string}}
}
```

| Property        | Usage    |                                                                                                                                                                                                                                                |
| --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status          | Required | <p>Result of the document signature process:</p><p> </p><ul><li>"finished": The process finished after all the documents were correctly signed.</li><li>"failed": The process finished but no document was signed owing to an error.</li></ul> |
| details.message | Optional | Additional information on the result of the document signature process.                                                                                                                                                                        |


---

# 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.uaepass.ae/feature-guides/signature-integration-guide/digital-signature-multiple-document/signing-guide/untitled/3.-executing-the-document-signature-process.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.
