ResumeMessageInsert
This article explains how to attach a proposal to the message flow via the Unico Check REST API.
How to use it?
Make a GET request to the /messages/{processoId}/document
endpoint
With a valid Access token, make a request to the endpoint (POST/messages/{processoId}/document) sending the following parameters:
{
"type": "TIPO_PROPOSTA",
"signature": {
"proposalName": "NOME_PROPOSTA",
"proposalResume": "RESUMO_PROPOSTA",
"signaturesPositions": [
{
"X": 12,
"Y": 12,
"Page": 1
}
]
},
"imagebase64": "IMAGEM_PROPOSTA"
}
Parameters:
- PATH PARAMETERS
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
processoId | String | Mandatory | Process number |
- HEADER PARAMETERS
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
APIKEY | String | Mandatory | API key |
Authorization | String | Mandatory | Access token |
Content-Type | String | Mandatory | "application/json" |
- REQUEST BODY SCHEMA
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
type | String | Mandatory | Indica o tipo da proposta (300, 301, 302 e 303). |
signature.proposalName | String | Optional | Indica o Nome da proposta. |
signature.proposalResume | String | Mandatory | Indica resumo da proposta em HTML ou texto puro. |
signature.signaturesPositions.X | String | Mandatory | Indica o eixo X da assinatura (pixel). |
signature.signaturesPositions.Y | String | Mandatory | Indica eixo Y da assinatura (pixel). |
signature.signaturesPositions.Page | String | Mandatory | Indica a página onde a assinatura irá sair. |
imagebase64 | String | Mandatory | Imagem da proposta. A imagem precisa ser em base64 (png, jpg, jpeg) |
Request example:
{
"type": "300",
"signature": {
"proposalName": "nome da proposta",
"proposalResume": "resumo de proposta",
"signaturesPositions": [
{
"X": 12,
"Y": 12,
"Page": 1
}
]
},
"imagebase64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAgSURBVDhPY/wPBAwUACYoTTYYNWDUABAYNWDgDWBgAABrygQclUTopgAAAABJRU5ErkJggg=="
}
If the request was executed successfully, the return response is a JSON containing the ID of the process created by sending the photo as follows:
{
"id": "6ab1771e-dfab-4e47-8316-2452268e5481"
}
If an error occurs, the return response is a JSON containing the error code and description:
{
"Error": {
"code": "40004",
"description": "Error description"
}
}
For more information on the errors returned, see the list available in the article Response Errors.
Any concerns?
Missing something or still need help? If you are already a customer or partner, you can contact us through the Help Center.