Skip to main content

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
NameTypeMandatory/OptionalDescription
processoIdStringMandatoryProcess number
  • HEADER PARAMETERS
NameTypeMandatory/OptionalDescription
APIKEYStringMandatoryAPI key
AuthorizationStringMandatoryAccess token
Content-TypeStringMandatory"application/json"
  • REQUEST BODY SCHEMA
NameTypeMandatory/OptionalDescription
typeStringMandatoryIndica o tipo da proposta (300, 301, 302 e 303).
signature.proposalNameStringOptionalIndica o Nome da proposta.
signature.proposalResumeStringMandatoryIndica resumo da proposta em HTML ou texto puro.
signature.signaturesPositions.XStringMandatoryIndica o eixo X da assinatura (pixel).
signature.signaturesPositions.YStringMandatoryIndica eixo Y da assinatura (pixel).
signature.signaturesPositions.PageStringMandatoryIndica a página onde a assinatura irá sair.
imagebase64StringMandatoryImagem 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.