Skip to main content

Errors

This page lists the errors each Universal API endpoint can return: the path it comes from, the HTTP code, the errorCode (when there is one) and the message exactly as it arrives in the response.

How to read the tables
  • Each message is transcribed verbatim, including those written in Spanish or containing typos. If you build logic on an error, compare by errorCode (or data.code in Risks) and not by the text.
  • A message containing <campo> means the text changes depending on the field that failed.
  • The Risks endpoints have their own catalog: Risks Error Codes.

Error response formats​

Not every endpoint responds the same way. Identify the format by endpoint.

FormatEndpointsStructure
Business with codePOST /candidate-requests{ "isSuccess": true, "statusCode": 422, "message": "Unprocessable Entity.", "data": { "errorCode": "ERR012", "message": "..." } }
Field validationPOST /candidate-requests{ "statusCode": 422, "errors": [ { "errorCode": "ERR002", "message": "..." } ] }
StandardAuthentication and permissions on every endpoint, POST /signin{ "statusCode": 401, "message": "...", "error": "Unauthorized" }
Risks/risks/legal-records/*{ "isSuccess": false, "statusCode": 404, "message": "...", "data": { "code": "SEARCH_NOT_FOUND", "requestId": "..." } }
Bulk/bulk-loading/*{ "isSuccess": true, "statusCode": 400, "message": "...", "data": { } }
Behaviors worth knowing
  • isSuccess does not indicate success in errors. In the business and Bulk formats it arrives as true even when the request failed. Decide by the HTTP code and by statusCode.
  • POST /candidate-requests: the statusCode in the body is 422, but the HTTP response code is 400 (or 404 when a resource is not found).
  • POST /signin: wrong credentials respond with HTTP 201 and "success": false. It does not return 401.
  • GET /candidate-requests/{uuid}: if the uuid does not exist it responds with HTTP 200 and "statusCode": 404 inside the body.

Authentication and permissions​

They apply to every endpoint that uses x-api-key or Authorization: Bearer. Standard format.

PathHTTPerrorCodemessageCondition
All401—Invalid credentials.No credential was sent, or the API Key or token is not valid (nonexistent, disabled or expired).
All403—Insufficient permissions.The permissions of the role tied to the credential could not be retrieved.
All403—Forbidden resourceThe role is not allowed to use that endpoint.
All (with x-api-key)429—Too many requestsThe per-API-Key request limit was exceeded within the time window. Retry later.
note

Before reaching the service, the gateway may reject the request with its own 401 or 403. Those messages are defined by the gateway and are not part of this catalog.


POST /signin​

Standard format for the 400s. Wrong credentials do not return an HTTP error code.

PathHTTPerrorCodemessageCondition
POST /signin201—El nombre de usuario o la contraseña son incorrectos. (with "success": false)Nonexistent user, inactive user, wrong password, locked or disabled account. The cause is not distinguished.
POST /signin201—Se requiere autenticación de múltiples factores. (with "success": false)The account has a second factor enabled.
POST /signin400—email must be an emailemail missing or badly formatted.
POST /signin400—password should not be empty / password must be a stringpassword missing, empty or not text.
POST /signin400—property <campo> should not existThe body includes a field that does not exist.
POST /signin500—Internal server errorInternal error.

POST /candidate-requests​

Also available as POST /services/candidate-requests (API Key). The type of every field is validated first (field validation format), then the business rules (business with code format).

Field validation​

HTTP 400. The message is inside errors[].

PathHTTPerrorCodemessageCondition
POST /candidate-requests400ERR002Required fields are missin g to perform this query: byNationalIdbyNationalId missing or not a boolean.
POST /candidate-requests400ERR002Required fields are missing to perform this query: <campo>package, taxClassification or clientId missing or not text.
POST /candidate-requests400ERR015The email entered does not match the correct format.email badly formatted.
POST /candidate-requests400ERR000The date on which the consent was accepted is required.consent.consentDate empty.
POST /candidate-requests400ERR000The date on which the terms and conditions were accepted is required.consent.termsAgreementDate empty.
POST /candidate-requests400ERR000consentDate must be in the format dd/MM/yyyy HH:mm:ss (e.g., 01/05/1999 14:30:45)consent.consentDate badly formatted.
POST /candidate-requests400ERR000termsAgreementDate must be in the format dd/MM/yyyy HH:mm:ss (e.g., 01/05/1999 14:30:45)consent.termsAgreementDate badly formatted.
POST /candidate-requests400ERR0001 to 70 charactersstreetAndNumber, delegationOrMunicipality, city or company outside 1 to 70 characters.
POST /candidate-requests400ERR000Only alphanumeric characters are acceptedThe same fields with disallowed characters.
POST /candidate-requests400ERR000The postal code must contain exactly 5 digitspostalCode is not exactly 5 digits.
POST /candidate-requests400ERR000resultNotificationUrl must be a URL addressresultNotificationUrl is not a URL.
POST /candidate-requests400ERR000costCenter must be a number conforming to the specified constraintscostCenter is not numeric.
POST /candidate-requests400ERR000<campo> must be a string / <campo> must be a boolean value / <campo> must be an objectAny other field with a type different from the expected one.
PathHTTPerrorCodemessageCondition
POST /candidate-requests400ERR019businessName is required.businessName is missing.
POST /candidate-requests400ERR019corporateRegime is required.The regime field is missing.
POST /candidate-requests400ERR019registrationCountry must match a valid catalog entry.registrationCountry is not in the wc-countries catalog.
POST /candidate-requests400ERR000Validation errorregime is not in the tax regime catalog.

Business rules: individual (taxClassification: "PF")​

PathHTTPerrorCodemessageCondition
POST /candidate-requests400ERR019taxClassification has an incorrect formattaxClassification other than PF and PM.
POST /candidate-requests400ERR002The national ID does not have the correct format.nationalId does not match the country format. With byNationalId: true.
POST /candidate-requests400ERR016The national ID is required.nationalId is missing. With byNationalId: true.
POST /candidate-requests400ERR007name is required to complete the registration.name is missing. With byNationalId: false.
POST /candidate-requests400ERR010The field last name is required to complete the registration.lastName is missing. With byNationalId: false.
POST /candidate-requests400ERR011The field birthdate does not have the correct format.birthDate missing, in a format other than DD/MM/YYYY, before 1900 or in the future.
POST /candidate-requests400ERR011The sex field is required to complete the registration.sex is missing.
POST /candidate-requests400ERR020The sex field has an incorrect format.sex other than H, M or X.
POST /candidate-requests400ERR012The state field is required to complete the registration.state is missing.
POST /candidate-requests400ERR021The state field has an incorrect format.state is not a valid state code.
POST /candidate-requests400—the following fields are required or have incorrect formats: [name, lastName, secondLastName, birthDate, sex, state]name or lastName contain disallowed characters.
POST /candidate-requests400ERR010The candidate you are trying to register is not of legal age.The candidate is under 18.
POST /candidate-requests400ERR012The gender is invalid.gender other than H or M.

User, client and package​

PathHTTPerrorCodemessageCondition
POST /candidate-requests404ERR017User not found.The user tied to the credential does not exist.
POST /candidate-requests400ERR017Package is required.package is empty.
POST /candidate-requests404ERR007The package <id> with which the registration is being attempted does not exist.The package does not exist.
POST /candidate-requests404ERR008The client <id> with which the registration is being attempted does not exist.The clientId does not exist.
POST /candidate-requests404ERR003This package is not available to you.The package is not assigned to your client.
POST /candidate-requests404—Country not foundThe client does not have the given country configured.
POST /candidate-requests400ERR002This package only allows registration using a National ID.The package does not allow registration by name and byNationalId: false was sent.

Fields required by the package​

PathHTTPerrorCodemessageCondition
POST /candidate-requests400ERR012The <campo> field is required to complete the registration.A field the package requires is missing.
POST /candidate-requests400ERR012The nss field has an invalid format.nss is not 11 digits.
POST /candidate-requests400ERR012The rfc and curp do not match.rfc and nationalId are not consistent.
POST /candidate-requests400ERR012The RFC is required.Package with Credit Report and no rfc.
POST /candidate-requests400ERR012The candidate consent is required to complete the registration.Package with Credit Report that requires consent.
POST /candidate-requests400ERR020The PIN does not match the provided data.The RFC year does not match digits 3 and 4 of consentNIP.
POST /candidate-requests400ERR015The email address is required for this process.The package requires interaction with the candidate and email is missing.
POST /candidate-requests400ERR012The homeAddress are required.Package with Credit Report that requires homeAddress.
POST /candidate-requests400ERR012The workAddress are required.hasWorkExperience is true and workAddress is missing.

Cost center​

These errors arrive in the field validation format with the generic Validation error message (ERR000). The actual cause is in the last column.

PathHTTPerrorCodemessageCause
POST /candidate-requests400ERR000Validation errorcostCenter is mandatory for your client and was not sent.
POST /candidate-requests400ERR000Validation errorcostCenter was sent but your client does not use cost centers.
POST /candidate-requests400ERR000Validation errorYour client has no cost centers configured, or the given center is disabled.
POST /candidate-requests404—Cost center <id> not foundThe cost center does not exist. Standard format.

GET /candidate-requests/{uuid}​

Also available as GET /services/candidate-requests/{uuid} (API Key).

PathHTTPerrorCodemessageCondition
GET /candidate-requests/{uuid}200—candidate request not found (with "statusCode": 404 in the body)The uuid does not exist.

GET /candidate-requests/{uuid}/processes/{processId}​

PathHTTPerrorCodemessageCondition
GET /candidate-requests/{uuid}/processes/{processId}500—Failed to get process details: <detalle>The Process detail could not be retrieved.
note

page and limit are not validated: a non-numeric value does not produce a 400 error.


POST /bulk-loading/upload​

Bulk format. Only available with Authorization: Bearer.

PathHTTPerrorCodemessageCondition
POST /bulk-loading/upload400—Only CSV files are allowedThe file is not a CSV.
POST /bulk-loading/upload400—File not foundThe file form field is missing.
POST /bulk-loading/upload400—Register type not foundregisterType is missing.
POST /bulk-loading/upload400—CSV malformed => <detalle>The CSV cannot be read.
POST /bulk-loading/upload400—File validation failed (with data.details.errors, for example national_id is required)A required column is missing. Only the first record with an error is reported.
POST /bulk-loading/upload401—User is not authorizedThe user's role cannot perform bulk uploads.
POST /bulk-loading/upload404—Client not foundThe user's client does not exist.
POST /bulk-loading/upload413—Standard server messageThe file exceeds 5 MB.
POST /bulk-loading/upload500—Internal Server ErrorInternal error, or registerType other than byName and byNationalId.

GET /bulk-loading/file/{uuid}/status​

PathHTTPerrorCodemessageCondition
GET /bulk-loading/file/{uuid}/status404—UUID not foundThe uuid does not match any upload.
GET /bulk-loading/file/{uuid}/status500—Internal Server ErrorThe link to the error file could not be generated.

Per-record errors in a bulk upload​

These errors are not returned as an HTTP response. They are processed after the file is uploaded and end up in the error CSV file delivered in fileUrl by GET /bulk-loading/file/{uuid}/status, in the reasonFail column. They have no errorCode.

OriginreasonFailCondition
PackagePackage not foundThe package_id does not exist.
PackageCredit report process is not supportedThe package includes Credit Report, which is not available in bulk upload.
PackageEmail is requiredThe package requires interaction with the candidate and the email is missing.
Countrycountry_id is required / country_id is invalidMissing, or not in the country catalog.
DatabirthDate is invalidDate not in DD/MM/YYYY format, or nonexistent.
Datasex must be "M" or "H"Registration by name only.
Datastate is required / state must be in code. Ex: "TS" or "HG"Registration by name only.
DataNational id incorrect syntaxRegistration by identifier only.
DataNSS is invalidnss is not 11 digits.
Datarfc is required / RFC is invalidPackage with SAT blacklists or Credit Report.
DatapersonalReferences are required / personalReferences must be grater than 0Package with Personal References.
DatabtrustProfile is invalid / btrustCategories are required / btrustCategories are invalidPackage with the Btrust Process.
Cost centercostCenter is requiredThe client uses cost centers and it is missing.
Cost centercostCenter is not allowed or requiredcostCenter was sent but the client does not use it.
Cost centerCost center does not exist or is not visibleThe center does not exist or is disabled.
ProcessingUnexpected error processing the candidateInternal error while processing the record.
Candidate registrationCould not save candidate in database, State not found, Could not fetch package and similarFailure during registration after validation.

Risks​

Risks format. The detail of each code, whether it is charged and whether it can be retried is in Risks Error Codes. This table shows which path each one belongs to.

PathHTTPdata.codemessageCondition
POST /risks/legal-records/searches400INVALID_SEARCH_CRITERIAEl criterio de búsqueda no es válido (with data.reasons)Incomplete or invalid search criteria.
POST /risks/legal-records/searches400IDENTITY_NOT_FOUNDLa CURP no corresponde a una persona registradaSearch by nationalId for a well-formed CURP that does not exist.
POST /risks/legal-records/searches503PROVIDER_UNAVAILABLEEl servicio de identidad no está disponible, así que no se pudo resolver la CURP; reintenta en unos momentosSearch by nationalId while the identity service is down.
GET /risks/legal-records/searches/{searchId}404SEARCH_NOT_FOUNDLa búsqueda no existe o no pertenece al clienteThe searchId does not exist or belongs to another client.
GET /risks/legal-records/searches/{searchId}410SEARCH_EXPIREDLa búsqueda expiró; ejecuta una nueva búsquedaMore than 2 hours have passed since the search.
GET /risks/legal-records/searches/{searchId}/records/{uuid}404SEARCH_NOT_FOUNDLa búsqueda no existe o no pertenece al clienteThe searchId does not exist or belongs to another client.
GET /risks/legal-records/searches/{searchId}/records/{uuid}404MATCH_NOT_FOUNDLa coincidencia no pertenece a la búsqueda indicadaThe uuid is not part of that search.
GET /risks/legal-records/searches/{searchId}/records/{uuid}410SEARCH_EXPIREDLa búsqueda expiró; ejecuta una nueva búsquedaThe search expired and the record had not been consulted before.
GET /risks/legal-records/searches/{searchId}/records/{uuid}503PROVIDER_UNAVAILABLELa fuente de antecedentes legales no está disponible; reintenta en unos momentosThe source does not respond. If it carries data.unlockAlreadyCharged: true, the unlock was already charged and retrying does not charge again.
GET /risks/legal-records/searches/{searchId}/records/{uuid}/csv404SEARCH_NOT_FOUND / MATCH_NOT_FOUNDSame as in the detailThe searchId or the uuid do not exist.
GET /risks/legal-records/searches/{searchId}/records/{uuid}/csv409MATCH_NOT_UNLOCKEDLa coincidencia no ha sido desbloqueadaThe CSV was requested for a record whose detail has not been consulted.
GET /risks/legal-records/searches/{searchId}/records/{uuid}/csv503PROVIDER_UNAVAILABLELa fuente de antecedentes legales no está disponible; reintenta en unos momentosThe source does not respond.
All /risks/legal-records/*400—El usuario tiene acceso a varios clientes; indica clientId para atribuir el consumoYour user has several clients and you did not send clientId.
All /risks/legal-records/*403—No cuentas con acceso a este clienteThe clientId sent is not one of your clients.
All /risks/legal-records/*400—<campo> debe tener el formato DD-MM-YYYY, property <campo> should not exist or other validation messagesParameters or body with an invalid format.