CFE validation service

Address service

Address service allows to validate a CFE document and get the structured data of residence and owner of the service contract. Also, the service consults directly in CFE to verify.

Web service description

Validate CFE document and address

This method performs the validation of the CFE document and obtains the information of the contract by OCR (Optical Character Recognition), verifies before the CFE if the contract number presented in the CFE address document.



Tag Type Required Description
imageFile file yes CFE image type .jpg, .jpeg or png.


Tag Type Required Description
apikey string yes Customer key.


  "imageFile": "file"


Name Type Description
valid boolean "Success"
name: string Name of the CFE service contract owner.
addressline1 string Street and number.
addressline2 string Street reference.
addressline3 string Suburb and postal code.
addressline4 string City and state.
payment double Total amount invoiced.
period string Billed period.
serviceNumber String Service contract number.
paymentDeadline string Payment deadline.
geocodeUrl string URL of the geographical location of the address.
lat string Latitude.
lng string Length.
code: integer Error code.
message string "Error message".


  "valid": boolean,
  "data": {
    "name": string,
    "addressline1": string,
    "addressline2": string,
    "addressline3": string,
    "addressline4": string,
    "totalPayment": double,
    "period": string,
    "serviceNumber": string,
    "paymentDeadline": string,
    "geocodeUrl": string,
    "lat": float,
    "lng": float
  "warnings": [
      "code": "string",
      "message": "string"


  "error": "Error code",
  "message": "Error message"

Service messages

Code Message Description
ADS001 Structure of data Indicates whether the request was successful or unsuccessful. If everything goes well, it will show the data correctly.
ADS002 Failed to get data Message to show that no information was found or when the OCR could not be read, or the file has poor quality.
ADS003 The file format is not correct Message displayed when the request contains an incorrect document, when there are files different than .png, .jpg or .pdf or when the document does not correspond to the standard format.
ADS004 Incorrect information. Message displayed when the document received does not corresponds to CFE.
ADS005 The $0$ field is required. Message displayed when a request is received with null parameters or blank spaces.
ADS006 The document is expired Message displayed when the document has expired.
ADS007 File size is larger than expected Message displayed when the document exceeds 5MB.
ADS008 Inconsistent data found Message displayed when the information obtained through the OCR scanning does not correspond to what is in the document.
ADS009 The apiKey is not valid Message displayed when the apiKey is incorrect.
ADS010 Server response failed Message displayed when server response failed.
ADS011 Response time has exceeded Message displayed when response time is exceeded.
ADS012 Error load image Message displayed when the service cannot process the image received.
ADS013 The document can not read Message to show that no information was found or when the OCR could not be read
ADS014 The URL is not valid Message that is displayed when an invalid URL is sent to confirm the existence of the document of CFE
ADS015 Unable to validate document with source Mensaje para mostrar cuando no se puede realizar una comparaciĆ³n del OCR contra los datos en la CFE
ADS016 The address line $0$ doesn't exactly match Message that is displayed when a line obtained by OCR does not match the CFE data
ADS017 Authorization header is not valid Message that is shown when the authorization field does not match with a user - password
ADS018 The document cannot be validated because the payment deadline has an invalid value. Message displayed when the CFE deadline cannot be read correctly