# QI Tech — CertifiQI › Signature Event

Documentação da QI Tech em texto corrido, para colar em um LLM.
Fonte: https://docs.qitech.com.br
8 página(s).

Índice:
- ZIP Files (/en/documentation/certifiqi/arquivo_zip)
- Cancel a Batch Group (/en/documentation/certifiqi/cancelar_batch_group_de_assinatura)
- GET Batch Group (/en/documentation/certifiqi/consultar_evento)
- GET URL (/en/documentation/certifiqi/consultar_url)
- Create Batch Group (/en/documentation/certifiqi/criar_batch_group)
- Create Batch Group to Notify Fromtis (/en/documentation/certifiqi/criar_batch_group_fromtis)
- Send to signature (/en/documentation/certifiqi/enviar_para_assinatura)
- Webhook (/en/documentation/certifiqi/webhook)

---

# ZIP Files

URL: /en/documentation/certifiqi/arquivo_zip

Every batch group, once completed, generates at least one ZIP file. In some cases, a single event may contain more than one ZIP file, since each file has a **maximum limit of 500 documents**.  

To access the ZIP, use the URL query available in section 4.5.  

### Files per Document Available in the ZIP

**CAdES**:   

- **Original PDF** with an **informative signature page**  
  - Signature file **`.p7s`**.  
- **PAdES**:  
  - **Signed PDF**.

---

# Cancel a Batch Group

URL: /en/documentation/certifiqi/cancelar_batch_group_de_assinatura

This request performs the cancellation of a pending event.

## Request

ENDPOINT /batch_group/batch_group_key/cancel_signature
MÉTODO PUT

### Path Params

| Field | Description |
|---|---|
| `batch_group_key` | 	Unique key identifying the batch group. |

Response Body

```json
{
    "batch_group_key": "uuid",
    "name": "Teste",
    "main_related_party": "ba",
    "number_of_documents": 1,
    "total_value": 0.0,
    "all_files_url": "",
    "send_to_fund_administrator": 0,
    "signature_expiration_date": null,
    "webhook_key": null,
    "client_key": "uuid",
    "requester_key": null,
    "signature_status": "pending",
    "internal_status": "pending",
    "attached_document_number": "58020912000105",
    "current_signature_position": "1",
    "control_number": "Control Number",
    "internal_webhook_key": "uuid",
    "created_at": "2023-05-15 23:54:35",
    "batch_group_type": "icp_signature",
    "requester_identifier": null,
    "send_emails": false,
    "batches": [
        {
            "document_batch_key": "uuid",
            "name": "Termo de Endosso",
            "document_type": "term_of_endorsement",
            "signature_type": "cades",
            "signature_status": "pending",
            "created_at": "2023-05-15 23:54:35",
            "related_parties": [
                {
                    "related_party_key": "uuid",
                    "name": "Empresa Exemplo LTDA",
                    "role": "assignor",
                    "signature_status": "pending",
                    "signature_position": "1",
                    "created_at": "2023-05-15 23:54:35",
                    "auto_signature": 0,
                    "signer_groups": [
                        {
                            "id": 38586,
                            "expiration": null,
                            "minimum_required_signers": 1,
                            "signable_limit": null,
                            "signature_status": "pending",
                            "created_at": "2023-05-15 23:54:35",
                            "signers": [
                                {
                                    "id": 65062,
                                    "signer_control_number": "1",
                                    "signature_timestamp": null,
                                    "signature_status": "pending",
                                    "name": "João",
                                    "is_group_mandatory": true,
                                    "email": "signatario@example.com",
                                    "document_number": "90203438906",
                                    "created_at": "2023-05-15 23:54:35"
                                }
                            ]
                        }
                    ]
                }
            ],
            "documents": [
                {
                    "document_key": "uuid",
                    "control_number": "uuid",
                    "file_size": 1681,
                    "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "name": "documento_exemplo.pdf",
                    "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "status": "pending",
                    "signed_file_url": null,
                    "created_at": "2023-05-15 23:54:35",
                    "signatures": []
                }
            ]
        }
    ],
    "watcher_clients": []
}
```

---

# GET Batch Group

URL: /en/documentation/certifiqi/consultar_evento

This request returns the data of a batch group.

## Request

ENDPOINT /batch_group/batch_group_key
MÉTODO GET

### Path Params

| Campo | Descrição |
|---|---|
| `batch_group_key` | Unique key identifying the batch group. |

## Response Body Params

STATUS 200

Response Body

```json
{
    "batch_group_key": "uuid",
    "name": "Teste",
    "main_related_party": "ba",
    "number_of_documents": 1,
    "total_value": 0.0,
    "all_files_url": "",
    "send_to_fund_administrator": 0,
    "signature_expiration_date": null,
    "webhook_key": "uuid",
    "client_key": "uuid",
    "requester_key": null,
    "signature_status": "pending",
    "internal_status": "pending",
    "attached_document_number": "58020912000105",
    "current_signature_position": "1",
    "internal_webhook_key": "uuid",
    "created_at": "2023-05-15 23:54:35",
    "batch_group_type": "icp_signature",
    "requester_identifier": null,
    "send_emails": false,
    "batches": [
        {
            "document_batch_key": "uuid",
            "name": "Termo de Endosso",
            "document_type": "term_of_endorsement",
            "signature_type": "cades",
            "signature_status": "pending",
            "created_at": "2023-05-15 23:54:35",
            "related_parties": [
                {
                    "related_party_key": "uuid",
                    "name": "Empresa Exemplo LTDA",
                    "role": "assignor",
                    "signature_status": "pending",
                    "signature_position": "1",
                    "created_at": "2023-05-15 23:54:35",
                    "auto_signature": 0,
                    "notify_to": [],
                    "signer_groups": [
                        {
                            "id": 38586,
                            "expiration": null,
                            "minimum_required_signers": 1,
                            "signable_limit": null,
                            "signature_status": "pending",
                            "created_at": "2023-05-15 23:54:35",
                            "signers": [
                                {
                                    "id": 65062,
                                    "signer_control_number": "1",
                                    "signature_timestamp": null,
                                    "signature_status": "pending",
                                    "name": "João",
                                    "is_group_mandatory": true,
                                    "email": "signatario@example.com",
                                    "document_number": "90203438906",
                                    "created_at": "2023-05-15 23:54:35"
                                }
                            ]
                        }
                    ]
                }
            ],
            "documents": [
                {
                    "document_key": "uuid",
                    "control_number": "uuid",
                    "file_size": 1681,
                    "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "name": "documento_exemplo.pdf",
                    "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "status": "pending",
                    "signed_file_url": null,
                    "created_at": "2023-05-15 23:54:35",
                    "signatures": []
                }
            ]
        }
    ],
    "watcher_clients": [],
    "zip_file_keys_list": [
        "uuid",
        "uuid"
    ]
}

```

| Field | Type | Description |
|---|---|---|
| `main_related_party` | string | Name of the main party responsible for signing the event. |
| `name` | string | Name of the event. |
| `batch_group_key` | string | 	Key of the batch group. |
| `signature_status` | string | Status of the signature. |
| `internal_status` | string | Overall status of the event. |
| `total_value` | string | Total value of the event’s documents. |
| `client_key` | string | Client identification key. |
| `send_emails` | boolean | Indicates whether signature emails should be sent for this event. |
| `attached_document_number` | string | Assignor’s CNPJ  |
| `batches` | lista | List of different document types and their respective related parties. |
| `webhook_url` | string | URL to which the webhook will be sent. |
| `webhook_url_list` | lista | List of URLs to which the webhook will be sent. |
| `zip_file_keys_list` | list | Identification key of the ZIP files. |

### Batches Object

| Field             | Type    | Description|
|-------------------|---------|-----------------------------------------------------------------|
| `related_parties`  | list    | List of related parties involved in signing a list of documents.|
| `documents`       | list    | List of documents.|
| `name`            | string  | Name of the batch.|
| `signature_type`  | enum    | Type of signature.|
| `document_type`   | enum    | Type of document. |

### Related Parties Object

| Field              | Type    | Description|
|--------------------|---------|-----------------------------|
| `role`             | enum    | Role played by the signers.|
| `name`             | string  | Name of the related party.|
| `signature_position` | integer | Signature position.|
| `signer_groups`    | list    | List of signer groups.|

### Signer Groups Object

| Field                      | Type    | Description
|----------------------------|---------|---------------------------------------------------------------------------------------------|
| `minimum_required_signers`  | integer | Minimum number of signers required to have signed for the group's signatures to be considered complete. |
| `signers`                  | list    | List of signers that make up the signer group.|

### Signer Object

| Field                  | Type    | Description                                                                                                      |
|------------------------|---------|------------------------------------------------------------------------------------------------------------------|
| `name`                 | string  | Name of the signer.                                                                                              |
| `document_number`      | string  | Signer’s CPF (Brazilian individual tax ID).                                                                     |
| `email`                | string  | Signer's email.                                                                                                  |
| `is_group_mandatory`   | boolean | Indicates if the signer is required to sign for the signer group to be considered complete.                      |
| `signer_control_number`| string  | Free field that can be used for control purposes or external reference.                                          |
| `signature_timestamp`  | date    | Date of the signature.                                                                                           |

### Documents Object

| Field              | Type    | Description                                                                                      |
|--------------------|---------|--------------------------------------------------------------------------------------------------|
| `name`             | string  | Name of the document.                                                                            |
| `control_number`   | string  | Free field that can be used for control purposes or external reference.                          |
| `file_size`        | float   | Size of the document.                                                                            |
| `url`              | string  | Document URL.                                                                                   |
| `document_key`     | string  | Document identification key.                                                                    |
| `original_file_url`| string  | URL of the original document.                                                                   |
| `signed_file_url`  | string  | URL of the document with signing page.                                                         |
| `file_url`         | string  | URL of the signature file.                                                                      |

---

# GET URL

URL: /en/documentation/certifiqi/consultar_url

You can query the links for already created batch groups through the requests below.

# GET Batch Group URLS
### Request

ENDPOINT /batch_group/batch_group_key/url
METHOD GET

### Path Params

| Field             | Description                                              |
|-------------------|----------------------------------------------------------|
| `batch_group_key` | Unique key identifying the batch group.                |

Response Body

```json
{
	"all_files_url": "https://qi.example.com/arquivos/todos_os_arquivos.zip",
	"expiration_datetime": "2024-05-01T01:00:00.000Z",
	"batches": [
		{
			"document_batch_key": "121",
			"documents": [
				{
					"document_key": "222",
					"original_file_url": "https://qi.example.com/arquivos/documento_original.pdf",
					"signed_file_url": "https://qi.example.com/arquivos/documento_assinado.pdf",
					"file_url": "https://qi.example.com/arquivos/documento_assinado_final.pdf"
				}
			]
		}
	]
}
```

### Body Params

| Field                | Type    | Description                                                  |  
|----------------------|---------|--------------------------------------------------------------| 
| `batch_group_key`    | string  | Unique key identifying the batch group.                    |
| `all_files_url`      | string  | URL of the zip file containing the original PDF and signature files. |
| `batches`            | string  | List of different document types.                             |
| `document_batch_key` | string  | Unique key identifying the document batch.                   |
| `documents`          | Array   | List of document objects.                                     |
| `document_key`       | string  | Unique key identifying the document.                          | 
| `original_file_url`  | string  | URL of the original document.                                 |
| `signed_file_url`    | string  | URL of the document with signing page.                        |
| `file_url`           | string  | URL of the p7s file.                                          |
| `expiration_datetime`| string  | Date and time when the URLs will expire.                      |

# Get Document URL

### Request

ENDPOINT /document/document_key/url
MÉTODO GET

### Path Params

| Field          | Description                                  |
|----------------|--------------------------------------------|
| `document_key` | Unique key identifying the document  |

Response Body

```json
{
    "document_key": "222",
    "original_file_url": "https://qi.example.com/arquivos/documento_original.pdf",
    "signed_file_url": "https://qi.example.com/arquivos/documento_assinado.pdf",
    "file_url": "https://qi.example.com/arquivos/documento_assinado_final.pdf",
    "expiration_datetime": "2024-05-01T01:00:00.000Z"
}
```

### Body Params

| Field                | Type    | Description                                                    |  
|----------------------|---------|----------------------------------------------------------------| 
| `document_key`       | string  | Unique key identifying the document.                           | 
| `original_file_url`  | string  | URL of the original document.                                  |
| `signed_file_url`    | string  | URL of the document with signing page.                         |
| `file_url`           | string  | URL of the p7s file.                                           |
| `expiration_datetime`| string  | Date and time when the URLs will expire.                       |

# Query URLs of a ZIP File

### Request

ENDPOINT /certifier/zip_file/zip_file_key/url
METHOD GET

### Path Params

| Field           | Description                                |
|-----------------|--------------------------------------------|
| `zip_file_key`  | Identification key of the ZIP file.        |

Response Body

```json
{
    "zip_file_key": "222",
    "signed_url": "https://qi.example.com/arquivos/documento_assinado.pdf",
    "expiration_datetime": "2024-05-01T01:00:00.000Z"
}
```

---

# Create Batch Group

URL: /en/documentation/certifiqi/criar_batch_group

This endpoint should be used to submit the batch group, which includes the documents and their respective signers.

## Definições

### Request

ENDPOINT /batch_group
MÉTODO POST

Request Body

```json
{
    "main_related_party": "ba",
    "webhook_url": "https://webhook.example.com/certifiqi",
    "send_to_fund_administrator": false,
    "is_asynchronous": false,
    "name": "Teste",
    "total_value": 0,
    "webhook_url_list": [
        "https://qi.example.com/arquivos/todos_os_arquivos.zip",
        "https://qi.example.com/arquivos/documento_original.pdf"
    ],
    "attached_document_number": "58020912000105",
    "send_emails": false,
    "batches": [{
        "signature_type": "cades",
        "document_type": "term_of_endorsement",
        "name": "Termo de Endosso",
        "related_parties":[
    {
            "name": "Empresa Exemplo LTDA",
            "role": "assignor",
            "signature_position":1,
            "signer_groups": [
                    {
                        "minimum_required_signers": 1,
                        "signers":[
                            {
                                "name": "João",
                                "document_number": "90203438906",
                                "email": "signatario@example.com",
                                "is_group_mandatory": true,
                                "signer_control_number": "1"
                            }
                        ]
                    }
                ]
            }
        ],
        "documents": [{
            "name": "documento_exemplo.pdf",
            "control_number": null,
            "url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
            "document_key": "uuid",
            "file_size": 1681
        }]
    }]
}

```

STATUS 200

Response Body

```json

```json
{
    "batch_group_key": "uuid",
    "name": "Teste",
    "main_related_party": "ba",
    "number_of_documents": 1,
    "total_value": 0.0,
    "all_files_url": "",
    "send_to_fund_administrator": 0,
    "signature_expiration_date": null,
    "webhook_key": "uuid",
    "requester_key": null,
    "signature_status": "pending",
    "internal_status": "pending",
    "attached_document_number": "58020912000105",
    "current_signature_position": "1",
    "internal_webhook_key": "uuid",
    "created_at": "2023-05-15 23:54:35",
    "batch_group_type": "icp_signature",
    "requester_identifier": null,
    "send_emails": false,
    "is_asynchronous": false,
    "batches": [
        {
            "document_batch_key": "uuid",
            "name": "Termo de Endosso",
            "document_type": "term_of_endorsement",
            "signature_type": "cades",
            "signature_status": "pending",
            "created_at": "2023-05-15 23:54:35",
            "related_parties": [
                {
                    "related_party_key": "uuid",
                    "name": "Empresa Exemplo LTDA",
                    "role": "assignor",
                    "signature_status": "pending",
                    "signature_position": "1",
                    "created_at": "2023-05-15 23:54:35",
                    "auto_signature": 0,
                    "notify_to": [],
                    "signer_groups": [
                        {
                            "id": 38586,
                            "expiration": null,
                            "minimum_required_signers": 1,
                            "signable_limit": null,
                            "signature_status": "pending",
                            "created_at": "2023-05-15 23:54:35",
                            "signers": [
                                {
                                    "id": 65062,
                                    "signer_control_number": "1",
                                    "signature_timestamp": null,
                                    "signature_status": "pending",
                                    "name": "João",
                                    "is_group_mandatory": true,
                                    "email": "signatario@example.com",
                                    "document_number": "90203438906",
                                    "created_at": "2023-05-15 23:54:35"
                                }
                            ]
                        }
                    ]
                }
            ],
            "documents": [
                {
                    "document_key": "uuid",
                    "control_number": "uuid",
                    "file_size": 1681,
                    "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "name": "documento_exemplo.pdf",
                    "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
                    "status": "pending",
                    "signed_file_url": null,
                    "created_at": "2023-05-15 23:54:35",
                    "signatures": []
                }
            ]
        }
    ],
    "watcher_clients": []
}

```
</div>
</details>

## Request Body Params

| Field                      | Type     | Description           | Required |
|-----------------------|----------|----------------------------------|----------|
| `main_related_party`        | string   | Name of the main party responsible for signing the event.  | YES      |
| `name`                     | string   | Name of the batch group.  | YES      |
| `total_value`              | string   | Total value of the documents in the event. | YES      |
| `send_emails`  | boolean  | Indicates whether signature emails should be sent for this event. If **FALSE**, no emails will be sent at any stage of the process. | YES |
| `attached_document_number` | string   | Assignor’s CNPJ, used when the document is related to a specific assignor.| NO |
| `batches`                  | list     | List of different document types and their respective related parties. | YES|
| `webhook_url`              | string   | URL to which the notification webhook will be sent. | NO |
| `webhook_url_list`         | list     | List of URLs to which the notification webhooks will be sent. | NO |
| `is_asynchronous`          | boolean  | Indicates if the event includes a document generated asynchronously. | NO |
| `send_to_fund_administrador` | boolean | After signing, the event should notify via SOAP an administrator using the Fromtis software.| NO |

:::info
- The fields **webhook_url** or **webhook_url_list** should be sent only if there is interest in receiving webhooks. Also, only one of these options should be provided per request.
- The field **is_asynchronous** must be set to **True** when the event contains a document created asynchronously.
:::

### Objeto Batches 

| Field             | Type    | Description                                                    | Required |
|-------------------|---------|----------------------------------------------------------------|----------|
| `related_parties`  | list    | List of related parties involved in signing a list of documents.| YES      |
| `documents`       | list    | List of documents.                                              | YES      |
| `name`            | string  | Name of the batch.                                              | YES      |
| `signature_type`  | enum    | Type of signature.                                              | YES      |
| `document_type`   | enum    | Type of document.                                               | YES      |

<details>
  <summary>Enumerators for signature types (signature_type)</summary>

**cades**: Cades  
**pades**: Pades  

</details>

<details>
  <summary>Enumerators for document types (document_type)</summary>

**endorsement**: Endorsement  
**other**: Other
**contract**: Contract  
**term_of_assignment**: Term of ssignment  
**term_of_endorsement**: Term of endorsement  
**promissory_note**: Promissory note  
**rural_term_of_assignment**: Rural term of assignment  
**term_of_fomentation**: Term of fomentation
**cpr**: CPR  
**cprf**: CPRF  
**trade_bill**: Trade bill
**subscription_note**: Subscription note  
**adhesion_term**: Adhesion term  
**limited_liability_term**: Limited liability term  
**account_request_document**: Account request document  
**ccb_post_sac_cdi**: CCB POST-SAC CDI  
**ccb_post_sac_ipca**: CCB Post-SAC IPCA  
**ccb_post_sac_igpm**: CCB Post-SAC IGPM  
**ccb_post_price_cdi**: CCB Post-Price CDI  
**ccb_post_price_ipca**: CCB Post-Price IPCA  
**ccb_post_price_igpm**: CCB Post-Price IGPM  
**ccb_post_price_days_cdi**: CCB Post-Price Days CDI  
**ccb_post_price_days_ipca**: CCB Post-Price Days IPCA  
**ccb_post_price__days_igpm**: CCB Post-Price Days IGPM  
**ncom_pre_sac**: Nota Comercial Pre-Sac  
**ncom_pre_price**: Nota Comercial Pre Price  
**ncom_pre_sac_days**: Nota Comercial Pre-Price Days  
**ncom_post_sac_cdi**: Nota Comercial Post-SAC CDI  
**ncom_post_sac_ipca**: Nota Comercial Post-SAC IPCA  
**ncom_post_sac_igpm**: Nota Comercial Post-SAC IGPM  
**ncom_post_price_cdi**: Nota Comercial Post-Price CDI  
**ncom_post_price_ipca**: Nota Comercial Post-Price IPCA  
**ncom_post_price_igpm**: Nota Comercial Post-Price IGPM  
**ncom_post_price_days_cdi**: Nota Comercial Post-Price Days CDI  
**ncom_post_price_days_ipca**: Nota Comercial Post-Price Days IPCA  
**ncom_post_price__days_igpm**: Nota Comercial Post-Price Days IGPM  
**ccb_cdi_perc**: CCB CDI Perc  
**ccb_cdi_plus**: CCB CDI+  
**ccb_pre_price**: CCB Pre-Price  
**ccb_pre_sac**: CCB (pre-sac)  
**cce_cdi_perc**: CCE CDI Perc  
**cce_cdi_plus**: CCE CDI+  
**cce_pre_price**: CCE Pre-Price  
**cce_pre_sac**: CCE Pre-Sac  
**cce_post_sac_cdi**: CCE Post-SAC CDI  
**cce_post_sac_ipca**: CCE Post-SAC IPCA  
**cce_post_sac_igpm**: CCE Post-SAC IGPM  
**cce_post_price_cdi**: CCE Post-Price CDI  
**cce_post_price_ipca**: CCE Post-Price IPCA  
**cce_post_price_igpm**: CCE Post-Price IGPM  
**cce_post_price_days_cdi**: CCE Post-Price Days CDI  
**cce_post_price_days_ipca**: CCE Post-Price Days IPCA  
**cce_post_price_daysigpm**: CCE Post-Price Days IGPM  
**cci_cdi_perc**: CCI CDI Perc  
**cci_cdi_plus**: CCI CDI+  
**cci_pre_price**: CCI Pre-Price  
**cci_pre_sac**: CCI Pre-Sac  
**cci_post_sac_cdi**: CCI Post-SAC CDI  
**cci_post_sac_ipca**: CCI Post-SAC IPCA  
**cci_post_sac_igpm**: CCI Post-SAC IGPM  
**cci_post_price_cdi**: CCI Post-Price CDI  
**cci_post_price_ipca**: CCI Post-Price IPCA  
**cci_post_price_igpm**: CCI Post-Price IGPM  
**cci_post_price_days_cdi**: CCI Post-Price Days CDI  
**cci_post_price_days_ipca**: CCI Post-Price Days IPCA  
**cci_post_price_days_igpm**: CCI Post-Price Days IGPM  
**nce_cdi_perc**: NCE CDI Perc  
**nce_cdi_plus**: NCE CDI+  
**nce_pre_price**: NCE Pre-Price  
**nce_pre_sac**: NCE Pre-Sac  
**nce_post_sac**: NCE Post-SAC  
**nce_post_price**: NCE Post-Price  
**nce_post_price_days**: NCE Post-Price Days  

</details>

### Objeto Related Parties

### Related Parties Object

| Field              | Type    | Description                                                                                         | Required |
|--------------------|---------|-----------------------------------------------------------------------------------------------------|----------|
| `role`             | enum    | Role played by the signers.                                                                         | YES      |
| `name`             | string  | Name of the related party.                                                                          | YES      |
| `signature_position`| integer | Signature position; must be provided when there is a signing order among related parties. The order follows an ascending sequence. | NO       |
| `signer_groups`    | list    | List of signer groups.                                                                              | YES      |

<details>
  <summary> Enumerators for Related Party Roles (`role`)</summary>

**assignor**: Assignor  
**manager**: Manager  
**underwriter**: Underwriter  
**issuer**: Issuer  
**intervening_discharger**: Intervening discharger  
**investor**: Investor  
**debtor**: Debtor  
**secretary**: Secretary  
**intervening_consentor**: Intervening consentor  
**surety**: Surety
**guarantor**: Guarantor  
**fund_representative**: Fund representative
**company_representative**: Company representative  
**solidary_debtor**: Solidary debtor  
**attestant**: Attestant  
**bestowal**: Bestowal  
**owner**: Owner  
**attorney**: Attorney  
**associate**: Associate  
**co_issuer**: Co_issuer  
**fiduciary_agent**: Fiduciary agent  
**guest**: Guest  
**spouse**: Spouse  
**intervening_guarantor**: Intervening guarantor  
**fiduciary_debtor**: Fiduciary debtor  
**bonafide_depositary**: Bonafide depositary  
**faithful_depositary**: Faithful depositary  
**president**: President  
**endorser**: Endorser  
**fund_administrator**: Fund administrator  
**cosigner**: Cosigner  
**consulting**: Consulting  
**fund_manager**: Fund Manager
**director**: Director  

</details>

### Signer Groups Object

| Field                      | Type    | Description              | Required |
|----------------------------|---------|----------------------------------------------------|----------|
| `minimum_required_signers` | integer | Minimum number of signers required to consider the group's signatures complete. | YES      |
| `signers`                  | list    | List of signers that make up the signer group.        | YES      |

### Signer Object

| Field              | Type     | Description                                                            | Required |
|------------------------|----------|----------------------------------------------------------|----------|
| `name`                 | string   | Signer's full name.| YES      |
| `document_number`      | string   | Signer's CPF.| YES      |
| `email`                | string   | Signer's email address.| YES      |
| `is_group_mandatory`   | boolean  | Set to **TRUE** to indicate that the signer is required for the group to be considered complete.| YES      |
| `signer_control_number`| string   | Optional free-text field that can be used for control or external reference purposes.| YES      |

### Documents Object

:::info Important  
The `documents` field must be populated using the response from the `/document` request.  
:::

| Field             | Type   | Description | Required |
|-------------------|--------|------------------------------------------------------------------------------------------------------|----------|
| `name`            | string | Document name.           | YES      |
| `control_number`  | string | Free text field that can be used for control or external reference purposes. In the integration with Fromtis involving duplicates, this value must match the one received in the asynchronous document creation endpoint. | YES      |
| `file_size`       | float  | Document size. | YES      |
| `url`             | string | URL of the document. | YES      |
| `document_key`    | string | Unique key identifying the document. | YES      |

## Response Body Params

| Field                | Type    | Description                                                  |
|----------------------|---------|--------------------------------------------------------------|
| `batch_group_key`    | string  | Unique key identifying the batch group.                    |
| `signature_status`   | string  | Signature status.                                            |
| `internal_status`    | string  | General status of the event.                                 |
| `original_file_url`  | string  | URL of the original document.                                |
| `signed_file_url`    | string  | URL of the document with signing page.                       |
| `file_url`           | string  | URL of the signature file.                                   |
| `signature_timestamp`| date    | Date of the signature.                                       |
| `webhook_key`        | string  | Unique key identifying the webhook.                          |

---

# Create Batch Group to Notify Fromtis

URL: /en/documentation/certifiqi/criar_batch_group_fromtis

Certifiqi offers the option to send notifications via SOAP to administrators using the Fromtis software. For the notification to be performed correctly, it is necessary to follow some specific steps. If any of these steps are not completed, the batch groups will remain pending notification because it was not possible to find a lease provided by Fromtis.

The signature notification will be sent after the signing of all required documents is completed.

## Batch Group with Trade Bill

1. Document Submission
   1. Send the CNAB of the duplicates asynchronously according to topic 4.2.3.
   2. Send the assignment agreement in PDF format.
2. Event Creation
   1. Include the field is_asynchronous set to True in the request body.
   2. Include the field send_to_fund_administrator set to True in the request body.
   3. Include the field total_value with the net value of the assignment in the request body.
   4. Include the document type corresponding to the duplicate and its documents in the request body.
   5. Include the document type corresponding to the assignment agreement and its respective document in the request body.

## Batch Group with Other Asset Types

1. Document Submission
   1. Send the term of endorsemet in PDF
2. Event Creation
    1. Include the field send_to_fund_administrator set to True in the request body.
    2. Include the field total_value with the net value of the assignment in the request body.
    3. Include the document type corresponding to the assignment agreement and its respective document in the request body.

---

# Send to signature

URL: /en/documentation/certifiqi/enviar_para_assinatura

## Request

This request sends an email to the signers. The recipient must be specified during the creation of the batch group.

ENDPOINT /batch_group/batch_group_key/send_to_signature
MÉTODO PUT

### Path params

| Campo | Tipo | Descrição |
|---|---|---|
| `batch_group_key`|  string | Unique key identifying the batch group. |

Response Body

```json
{}

```

---

# Webhook

URL: /en/documentation/certifiqi/webhook

All notifications related to the batch group will be sent to the address registered at the event creation. In every webhook call, the payload will include data from batch_group, batches, related_parties, signer_groups, and signer.

The notification will be sent whenever one of the following stages is completed: related parties, start of ZIP file creation, or completion of the batch group.

## Notification of Signed Related Party

In this case, the **signature_status** field of the related party, the signer group, and the signers will have the value **signed**. Meanwhile, the **internal_status** field will have the value **pending**.

### Webhook Examples

Response Body

```json
{
  "batch_group_key": "uuid",
  "name": "Contrato de exemplo",
  "main_related_party": "aaa",
  "number_of_documents": 1,
  "total_value": 0,
  "all_files_url": "",
  "send_to_fund_administrator": 0,
  "signature_expiration_date": null,
  "webhook_key": "uuid",
  "client_key": "uuid",
  "requester_key": null,
  "signature_status": "pending",
  "internal_status": "pending",
  "attached_document_number": "71029579000163",
  "current_signature_position": "1",
  "control_number": null,
  "internal_webhook_key": null,
  "created_at": "2023-05-18 00:02:49",
  "batch_group_type": "icp_signature",
  "requester_identifier": null,
  "send_emails": true,
  "batches": [
    {
      "document_batch_key": "uuid",
      "name": "Outros",
      "document_type": "other",
      "signature_type": "cades",
      "signature_status": "pending",
      "created_at": "2023-05-18 00:02:49",
      "related_parties": [
        {
          "related_party_key": "uuid",
          "name": "Signatário Exemplo",
          "role": "assignor",
          "signature_status": "signed",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "id": 38598,
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "signed",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "id": 65095,
                  "signer_control_number": "1",
                  "signature_timestamp": "2023-05-18 00:06:08",
                  "signature_status": "signed",
                  "name": "Signatário Exemplo",
                  "is_group_mandatory": true,
                  "email": "signatario@example.com",
                  "document_number": "69397891111",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        },
        {
          "related_party_key": "uuid",
          "name": "Turing",
          "role": "guarantor",
          "signature_status": "pending",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "id": 38599,
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "pending",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "id": 65096,
                  "signer_control_number": "1",
                  "signature_timestamp": null,
                  "signature_status": "pending",
                  "name": "Turing",
                  "is_group_mandatory": true,
                  "email": "testemunha@example.com",
                  "document_number": "58014216296",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        }
      ],
      "documents": [
        {
          "document_key": "uuid",
          "control_number": "uuid",
          "file_size": 1669,
          "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
          "name": "documento_exemplo.pdf",
          "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
          "status": "pending",
          "signed_file_url": null,
          "created_at": "2023-05-18 00:02:49",
          "signatures": [
            {
              "signer": {
                "id": 65095,
                "signer_control_number": "1",
                "signature_timestamp": "2023-05-18 00:06:08",
                "signature_status": "signed",
                "name": "Signatário Exemplo",
                "is_group_mandatory": true,
                "email": "signatario@example.com",
                "document_number": "69397891111",
                "created_at": "2023-05-18 00:02:49"
              },
              "signed_hash": "EjBUEGsOkny9SXaZbmLQLy+IRjvTtYnc73V8Hbb02uMktDn3/PJ24Gj7xQMj3jdOuRLVNzi1Fz02QYc2FEUdPxjOPQoycyQmI8ppPFwNsADym79EGRYqHlCGu9CccolZgA8FbgQgQ8FJAboQV9uSAPsS6zui1CHdmy4/3xink33KFpR9k42rI3iZgzi42gkrACJ1hhLPecc4HdTBQS6h+fsMNk/hsdKR3OLlXC+Ri3k8I/fJmNp2BBqILOhSxPeD4RpeyCtDFDbiKKA3pYgQqPqtEdfRdVFWY9uNGcoF1oIzGQg32Fh9o2UCqu58f+VqaElRGuCK6DZQ5nTZp2bbEg==",
              "signature_timestamp": "2023-05-18 00:06:08",
              "signature_status": "signed",
              "role": "assignor",
              "created_at": "2023-05-18 00:06:13"
            }
          ]
        }
      ]
    }
  ],
  "watcher_clients": [],
  "zip_file_keys_list": []
}

```

## Event Completion

To finalize the event, a webhook will first be sent indicating that all related parties have signed. At this moment, the internal_status field will have the value **waiting_zip_files_creation**. The link to the signed documents will already be available.

After the webhook mentioned above, a new webhook will be sent indicating the complete finalization of the event. At this point, the **internal_status** field will have the value **finished**, and the event will be supplemented with the ZIP file, which can be retrieved using the keys contained in **zip_file_keys_list**. The ZIP file contains all documents and the signature file.

To learn how to retrieve the ZIP file, refer to section 4.5. Retrieve URL.

### Webhook Examples Waiting for ZIP Generation

Response Body

```json
{
  "batch_group_key": "uuid",
  "name": "Contrato de exemplo",
  "main_related_party": "aaa",
  "number_of_documents": 1,
  "total_value": 0,
  "all_files_url": null,
  "send_to_fund_administrator": 0,
  "signature_expiration_date": null,
  "webhook_key": "uuid",
  "client_key": "uuid",
  "requester_key": null,
  "signature_status": "signed",
  "internal_status": "waiting_zip_files_creation",
  "attached_document_number": "71029579000163",
  "current_signature_position": "1",
  "control_number": null,
  "internal_webhook_key": null,
  "created_at": "2023-05-18 00:02:49",
  "batch_group_type": "icp_signature",
  "requester_identifier": null,
  "send_emails": true,
  "batches": [
    {
      "document_batch_key": "uuid",
      "name": "Outros",
      "document_type": "other",
      "signature_type": "cades",
      "signature_status": "signed",
      "created_at": "2023-05-18 00:02:49",
      "related_parties": [
        {
          "related_party_key": "uuid",
          "name": "Signatário Exemplo",
          "role": "assignor",
          "signature_status": "signed",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "signed",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "signer_control_number": "1",
                  "signature_timestamp": "2023-05-18 00:06:08",
                  "signature_status": "signed",
                  "name": "Signatário Exemplo",
                  "is_group_mandatory": true,
                  "email": "signatario@example.com",
                  "document_number": "69397891111",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        },
        {
          "related_party_key": "uuid",
          "name": "Turing",
          "role": "guarantor",
          "signature_status": "signed",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "signed",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "signer_control_number": "1",
                  "signature_timestamp": "2023-05-18 00:09:44",
                  "signature_status": "signed",
                  "name": "Turing",
                  "is_group_mandatory": true,
                  "email": "testemunha@example.com",
                  "document_number": "58014216296",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        }
      ],
      "documents": [
        {
          "document_key": "uuid",
          "control_number": "uuid",
          "file_size": 1669,
          "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_assinado.p7s",
          "name": "documento_exemplo.pdf",
          "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
          "status": "signed",
          "signed_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_assinado.pdf",
          "created_at": "2023-05-18 00:02:49",
          "signatures": [
            {
              "signer": {
                "signer_control_number": "1",
                "signature_timestamp": "2023-05-18 00:06:08",
                "signature_status": "signed",
                "name": "Signatário Exemplo",
                "is_group_mandatory": true,
                "email": "signatario@example.com",
                "document_number": "69397891111",
                "created_at": "2023-05-18 00:02:49"
              },
              "signed_hash": "EjBUEGsOkny9SXaZbmLQLy+IRjvTtYnc73V8Hbb02uMktDn3/PJ24Gj7xQMj3jdOuRLVNzi1Fz02QYc2FEUdPxjOPQoycyQmI8ppPFwNsADym79EGRYqHlCGu9CccolZgA8FbgQgQ8FJAboQV9uSAPsS6zui1CHdmy4/3xink33KFpR9k42rI3iZgzi42gkrACJ1hhLPecc4HdTBQS6h+fsMNk/hsdKR3OLlXC+Ri3k8I/fJmNp2BBqILOhSxPeD4RpeyCtDFDbiKKA3pYgQqPqtEdfRdVFWY9uNGcoF1oIzGQg32Fh9o2UCqu58f+VqaElRGuCK6DZQ5nTZp2bbEg==",
              "signature_timestamp": "2023-05-18 00:06:08",
              "signature_status": "signed",
              "role": "assignor",
              "created_at": "2023-05-18 00:06:13"
            },
            {
              "signer": {
                "signer_control_number": "1",
                "signature_timestamp": "2023-05-18 00:09:44",
                "signature_status": "signed",
                "name": "Turing",
                "is_group_mandatory": true,
                "email": "testemunha@example.com",
                "document_number": "58014216296",
                "created_at": "2023-05-18 00:02:49"
              },
              "signed_hash": "z7M0ozYCDGKWjkV4a1U5fK8tl0OcNqJGQXyJmreX16KjvQduv9qFevEc3tWej+1kpXm7jvhUuawSgSA7LJWQ/Flp+TRVyrfOgeBM3Xd+6uJA/c3zA9ASVlaEgwFw8/nD/dXE4EmLVOPhq9Mg3WeIDtq+c93TGhZtvdBpEuGu4q5/wfSTUhYYDPvljbjUvDXEOSTrvYboW1wDJyACCeeYLyPVaqTdOZ9ovXcVOZIpO8+fuIeNKGkuc6m7bXTvE5pD4FSxx5oNPj4N13E4TQN5wcNX+F0svVeVqA+2zrLU2mKGczVsgWO7qte1vct4eREs4dONStPvZ7+JQDSg+OotpQ==",
              "signature_timestamp": "2023-05-18 00:09:44",
              "signature_status": "signed",
              "role": "guarantor",
              "created_at": "2023-05-18 00:09:45"
            }
          ]
        }
      ]
    }
  ],
  "watcher_clients": [],
  "zip_file_keys_list": []
}

```

### Exemplos de Webhook Evento finalizado

Response Body

```json
{
  "batch_group_key": "uuid",
  "name": "Contrato de exemplo",
  "main_related_party": "aaa",
  "number_of_documents": 1,
  "total_value": 0,
  "all_files_url": "https://qi.example.com/arquivos/uuid/uuid.zip",
  "send_to_fund_administrator": 0,
  "signature_expiration_date": null,
  "webhook_key": "uuid",
  "client_key": "uuid",
  "requester_key": null,
  "signature_status": "signed",
  "internal_status": "finished",
  "attached_document_number": "71029579000163",
  "current_signature_position": "1",
  "control_number": null,
  "internal_webhook_key": null,
  "created_at": "2023-05-18 00:02:49",
  "batch_group_type": "icp_signature",
  "requester_identifier": null,
  "send_emails": true,
  "batches": [
    {
      "document_batch_key": "uuid",
      "name": "Outros",
      "document_type": "other",
      "signature_type": "cades",
      "signature_status": "signed",
      "created_at": "2023-05-18 00:02:49",
      "related_parties": [
        {
          "related_party_key": "uuid",
          "name": "Signatário Exemplo",
          "role": "assignor",
          "signature_status": "signed",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "signed",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "signer_control_number": "1",
                  "signature_timestamp": "2023-05-18 00:06:08",
                  "signature_status": "signed",
                  "name": "Signatário Exemplo",
                  "is_group_mandatory": true,
                  "email": "signatario@example.com",
                  "document_number": "69397891111",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        },
        {
          "related_party_key": "uuid",
          "name": "Turing",
          "role": "guarantor",
          "signature_status": "signed",
          "signature_position": "1",
          "created_at": "2023-05-18 00:02:49",
          "auto_signature": 0,
          "notify_to": [],
          "signer_groups": [
            {
              "expiration": null,
              "minimum_required_signers": 1,
              "signable_limit": null,
              "signature_status": "signed",
              "created_at": "2023-05-18 00:02:49",
              "signers": [
                {
                  "signer_control_number": "1",
                  "signature_timestamp": "2023-05-18 00:09:44",
                  "signature_status": "signed",
                  "name": "Turing",
                  "is_group_mandatory": true,
                  "email": "testemunha@example.com",
                  "document_number": "58014216296",
                  "created_at": "2023-05-18 00:02:49"
                }
              ]
            }
          ]
        }
      ],
      "documents": [
        {
          "document_key": "uuid",
          "control_number": "uuid",
          "file_size": 1669,
          "file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_assinado.p7s",
          "name": "documento_exemplo.pdf",
          "original_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_original.pdf",
          "status": "signed",
          "signed_file_url": "https://qi.example.com/arquivos/uuid/documento_exemplo_assinado.pdf",
          "created_at": "2023-05-18 00:02:49",
          "signatures": [
            {
              "signer": {
                "signer_control_number": "1",
                "signature_timestamp": "2023-05-18 00:06:08",
                "signature_status": "signed",
                "name": "Signatário Exemplo",
                "is_group_mandatory": true,
                "email": "signatario@example.com",
                "document_number": "69397891111",
                "created_at": "2023-05-18 00:02:49"
              },
              "signed_hash": "EjBUEGsOkny9SXaZbmLQLy+IRjvTtYnc73V8Hbb02uMktDn3/PJ24Gj7xQMj3jdOuRLVNzi1Fz02QYc2FEUdPxjOPQoycyQmI8ppPFwNsADym79EGRYqHlCGu9CccolZgA8FbgQgQ8FJAboQV9uSAPsS6zui1CHdmy4/3xink33KFpR9k42rI3iZgzi42gkrACJ1hhLPecc4HdTBQS6h+fsMNk/hsdKR3OLlXC+Ri3k8I/fJmNp2BBqILOhSxPeD4RpeyCtDFDbiKKA3pYgQqPqtEdfRdVFWY9uNGcoF1oIzGQg32Fh9o2UCqu58f+VqaElRGuCK6DZQ5nTZp2bbEg==",
              "signature_timestamp": "2023-05-18 00:06:08",
              "signature_status": "signed",
              "role": "assignor",
              "created_at": "2023-05-18 00:06:13"
            },
            {
              "signer": {
                "signer_control_number": "1",
                "signature_timestamp": "2023-05-18 00:09:44",
                "signature_status": "signed",
                "name": "Turing",
                "is_group_mandatory": true,
                "email": "testemunha@example.com",
                "document_number": "58014216296",
                "created_at": "2023-05-18 00:02:49"
              },
              "signed_hash": "z7M0ozYCDGKWjkV4a1U5fK8tl0OcNqJGQXyJmreX16KjvQduv9qFevEc3tWej+1kpXm7jvhUuawSgSA7LJWQ/Flp+TRVyrfOgeBM3Xd+6uJA/c3zA9ASVlaEgwFw8/nD/dXE4EmLVOPhq9Mg3WeIDtq+c93TGhZtvdBpEuGu4q5/wfSTUhYYDPvljbjUvDXEOSTrvYboW1wDJyACCeeYLyPVaqTdOZ9ovXcVOZIpO8+fuIeNKGkuc6m7bXTvE5pD4FSxx5oNPj4N13E4TQN5wcNX+F0svVeVqA+2zrLU2mKGczVsgWO7qte1vct4eREs4dONStPvZ7+JQDSg+OotpQ==",
              "signature_timestamp": "2023-05-18 00:09:44",
              "signature_status": "signed",
              "role": "guarantor",
              "created_at": "2023-05-18 00:09:45"
            }
          ]
        }
      ]
    }
  ],
  "watcher_clients": [],
  "zip_file_keys_list": [
    "uuid",
    "uuid"
  ]
}

```