E Sign service

Electronic signature service makes the process of sign documents online and generate NOM certificates for signed documents.

Web service description

Sign document

This method helps to send documents to the service to be signed on different business processes.

Sign document endpoint

POST ~/api/esign/addSignatory

Parameters

Tag Type Required Description
identifier string yes String to identify the request, it can be a contract number, RFC, or whatever is required as a unique identifier.
name string yes Name of signatory.
firstName string yes Firstname of signatory.
lastName string yes Lastname of signatory.
RFC string yes RFC of signatory.
email string yes Email signatory.
document string yes Document in base64.
showSignature number yes 0 for false, 1 for true depending on whether you want the evidence of the signature (s) to be visible.If 1 but the service don't receive imageSignature then will print the digital signature with the name, date and business name.
imageSignature string no Signature image in base64.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "identifier": "string",
  "name": "string",
  "firstName": "string",
  "lastName": "string",
  "rfc": "string",
  "email": "string",
  "document": "string",
  "showSignature": "number",
  "imageSignature": "string"
}

Response:

Name Type Description
Correct:
status string "Success"
message string Document signed correctly.
Error:
error string "Error code".

JSON Response

{
    status: "success",
    message: "string"
}  

Error

{
  error: "Error code"
}

Add single signatory

POST ~/api/esign/addSingleSignatory

Parameters

Tag Type Required Description
identifier string yes String to identify the request, it can be a contract number, RFC, or whatever is required as a unique identifier.
name string yes Name of signatory.
firstName string yes Firstname of signatory.
lastName string yes Lastname of signatory.
rfc string yes RFC of signatory.
email string yes Email signatory.
document string yes Document in base64.
showSignature number yes 0 for false, 1 for true depending on whether you want the evidence of the signature (s) to be visible.If 1 but the service don't receive imageSignature then will print the digital signature with the name, date and business name.
imageSignature string no Signature image in base64.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "identifier": "string",
  "name": "string",
  "firstName": "string",
  "lastName": "string",
  "rfc": "string",
  "email": "string",
  "document": "string",
  "showSignature": "number",
  "imageSignature": "string"
}

Response:

Name Type Description
Correct:
status string "Success"
message string Document signed correctly.
Error:
error string "Error code".

JSON Response

{
    status: "success",
    message: "string"
}  

Error

{
  error: "Error code"
}

Verify document signed by identifier

Method to obtaining a signed document.

~/api/esign/getDocument

Parameters

Tag Type Required Description
identifier string yes The identify is the identifier with which the document was signed.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "identifier": "string"
}

Response:

Name Type Description
Correct:
image string "Base64 image of the signed document".
message string Document signed correctly.
Error:
error string "Error code"

Correct

{
  image: "Base64 image of the signed document"
}

Error

{
  error: "Error code"
}

Verify document NOM signed using an identifier

Method to obtain the NOM of a signed document.

~/api/esign/getNom

Parameters

Tag Type Required Description
identifier string yes The identifier with which the document was signed.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "identifier": "string"
}

Response:

Name Type Description
Correct:
image string "Base64 NOM of the signed document".
Error:
error string "Error code"

Correct

{
  image: "NOM base64 of the signed document"
}

Error

{
  "error": "Error code"
}

View certificate using an identifier

Method to obtain the information of the certificate or certificates of a signed document.

~/api/esign/getCertificate

Parameters

Tag Type Required Description
identifier string yes The identify is the identifier with which the document was signed

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "identifier": "string"
}

Response:

Name Type Description
Correct:
certificateBase64 string "Base64 certificate".
name string "Name with which the document was signed".
serie string "Serial number given by the system".
Error:
error string "Error code"

Correct

{
  "certificateBase64": "Base64 image of the signed document",
  "name": "Name with which the document was signed",
  "serie": "Serial number given by the system"
}

Error

{
  "error": "Error code"
}

Validate Nom using document image (PDF) Signed in Base64 and NOM in Base64

Method to validate that a document is contained in a NOM record.

~/api/esign/validateNOM

Parameters

Tag Type Required Description
documentBase64 string yes Base64 document obtained from the function /api/esign/getDocument.
nomBase64 string yes Base54 NOM obtained from the function /api/esign/validateNom.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "documentBase64": "string",
  "nomBase64": "string"
}

Response:

Name Type Description
Correct:
status string "Success"
message string "Successful validation, the document is contained in the record".
serie string "Serial number given by the system".
Error:
error string "Error code".

Correct

{
  "status": "success",
  "message": "string
}

Error

{
  "error": "string"
}

Service messages

Code Message Description
Success Document signed correctly. Document signed correctly.
Error Access Denied - Invalid ApiKey Access Denied - Invalid ApiKey.
Code Message Description
010 There was a problem with generating the certificate, consult the support area There was a problem with generating the certificate, consult the support area.
011, 012 There was a problem with the signing of the document, check that it is not locked for editing, see to the support area Message shown when the PDF that is to be signed is blocked for editing.
013 The Document is not yet signed Message shown when the document was not signed.
014 NOM is not yet generated NOM is not yet generated.
016 Document is not a PDF Document is not a PDF.
017 NOMBase64 field not provided Message shown when the sign is not a format Base64.
018 Signature image is not formatted correctly.
020 Identifier already exists If the identifier already exists in the database.
021 Incorrect validation Incorrect validation
024 Document encoding type unknown or incomplete The base64 file could be corrupt.
025 Document or NOM may not be correlated.
099 Identifier does not exist Identifier does not exist.
102 Maximum allowed size 2Mb Maximum allowed size 2Mb.
101 Maximum allowed size 50Mb Maximum allowed size 50Mb.
100 "\"identifier\" must be a string" "\"identifier\" must be a string".
100 "\"identifier\" length must be at least 4 characters long" "\"identifier\" length must be at least 4 characters long".
100 "\"0\" is not allowed to be empty" "\"0\" is not allowed to be empty".
100 "\"0\" must not have leading or trailing whitespace" "\"0\" must not have leading or trailing whitespace".
100 "\"0\" length must be less than or equal to $var characters long "\"0\" length must be less than or equal to $var characters long.
100 "\"documentBase64\" must be a valid base64 string" "\"documentBase64\" must be a valid base64 string".
114 Bad request, does not contain the correct signer ID the identifier does not exist or your company dont have permissions to Access
500 Internal Server Error Internal Server Error.