Home

How does the Document Classification work?

Trébol helps you classify the files your customers send you during the onboarding process. For each document, Trébol helps you know the type of document (see document types), the business name, the date of the document, and the number associated with the document. This information helps you accept or reject the documents without a human review from your side.

To classify the documents, you just need to send Trébol the PDF files trough our API. (see how to upload a document)

Here is an example of how you can include a Document Classification as a new Verification payload:

{
	"country": "mx",
	"items": [
		{
			"options": {
				"fileUrl": "someUrl.com/withADownloadableFile",
				"scope": "classification"
			}
		}
	]
}

When you send a Document Classification request, Trébol will assigns a verification request id. As soon as Trébol finishes the classification request (usually less than 1 minute), Trébol sends you a webhook notification with the information of the Document Classification.

Also, to get the data of a Constancia de Situación Fiscal, you can use the Retrieve Verification Endpoint, inside the items array.

How does Trébol reports data from a Document Classification?


The Document Classification Item Object

{
    "item_status": "complete",
    "item_type": "aa_mx",
    "entity_name": "name",
    "document_number": "1234",
    "document_date": "2022-11-11"
}

Attributes


item_status : string

Describes the status of the document classification.
Example: complete.


item_type : string

Classified item type. The possible values are:

  • "aa_mx": Acta de Asamblea.
  • "ac_mx": Acta Constitutiva
  • "csf_mx": Constancia de Situación Fiscal (CSF)
  • "fme_mx": Folio Mercantil Electrónico.
  • "generic": The document classification is pending.
  • "pw_mx": A legal power.

entity_name : string

Name of the entity to whom the document is issued. For a Business Document, such as Acta de Asamblea or Legal Power, the entity_name is the name of the Business. For a Personal Document, such as an INE or a personal CSF, the entity_name is the name of the Person.

Business Document Example: ACME SOFIPO
Personal Document Example: JUANA DIAZ


document_number: string

The document number found on the classified document.

  • For an Acta Constitutiva and Acta de Asamblea, the Acta Number on the Notary.
  • For an INE or passport, the document number.

document_date : string

The printed issue date of the document. Reported with ISO 8601 format (YYYY-MM-DD).
Example: 2022-03-17