Legal Background API Documentation

Welcome to the documentation for the Legal Background API. This API allows you to search for legal history records related to legal entities and natural persons.

Overview

The Legal Background API is designed to provide you with the main functionality of searching for legal records and agreements published by various courts and tribunals across the Mexican Republic. This API equips you with the ability to search through an extensive collection of legal documents, allowing you to gain insights into legal histories, agreements, and more.

Search for legal history records related to a legal entity based on their business name.

Endpoint: POST ~/api/LegalBackground/LegalEntitySearch

Headers:

Tag Type Required Description
apikey string yes Customer key.
  • ApiKey (string, required): Customer key for authentication.

Parameters FromForm:

Tag Type Required Description
BusinessName String Yes The name of the business you want to search for.
  • BusinessName (string, required): The name of the business you want to search for.

Request:

curl --location '~/api/LegalBackground/LegalEntitySearch'
--header 'ApiKey: _apiKeyValue_'
--header 'Content-Type: multipart/form-data'
--header 'Accept: application/json'
--form 'BusinessName="Legal Entity Name"'

Response:

200 Success

{
  "match": "string",
  "resultCount": 0,
  "results": [
    {
      "entity": "string",
      "records": [
        {
          "record": "string",
          "plaintiff": "string",
          "defendant": "string",
          "entity": "string",
          "court": "string",
          "type": "string",
          "jurisdiction": "string",
          "date": "string",
          "agreements": [
            {
              "date": "string",
              "text": "string"
            }
          ]
        }
      ]
    }
  ]
}
Response:
Name Type Description
match string Indicates if there were matches in the search
resultCount int Indicates how many results were found
results    
entity string Federal State
records    
record string Legal file
plaintiff string Plaintiff
defendant string Defendant
entity string Federal State
court string Court
type string Type
jurisdiction string Jurisdiction
date string Date "08-01-2512"
agreements
date string Date "08-01-2512"
text string Text of the agreement

204 NotFound

When the information was not found in the source of verification. The legal entity name may not be correct.

{}

400, 500, 501 Bad Request, Internal server Error & Error not Implemented

When the parameters do not have the correct format, internal error in our server or an uncontrolled error occurs.

Name Type Description
errorMessage    
code string Error code
message string Error Message
statusCode int Status Code returned
request    
bussinessName string Name of the legal entity
{
  "errorMessage": {
    "code": "string",
    "message": "string",
    "statusCode": 0
  },
  "request": {
    "businessName": ""
  }
}

401, 404, 405, 504 Unauthorized, Not Found, Method Not Allowed & Timeout

When no authentication, Method not found or not allowed, or Timeouts errors occur.

Name Type Description
errorMessage    
code string Error code
message string Error Message
statusCode int Status Code returned
{
  "code": "string",
  "message": "string",
  "statusCode": 0
}

Search for legal history records related to a natural person based on their name and related details.

Endpoint: POST ~/api/LegalBackground/NaturalPersonSearch

Headers:

Tag Type Required Description
apikey string yes Customer key.
  • ApiKey (string, required): Customer key for authentication.

Parameters FromForm:

Tag Type Required Description
name string Yes The first name of the natural person
lastName string Yes The last name of the natural person
secondLastName string Yes The second last name of the natural person
CURP string Yes The CURP (Unique Population Registry Code) of the natural person
  • Name (string, required): The first name of the natural person.
  • LastName (string, required): The last name of the natural person.
  • SecondLastName (string, Required): The second last name of the natural person.
  • CURP (string, Required): The CURP (Unique Population Registry Code) of the natural person.

Request:

curl --location '~/api/LegalBackground/NaturalPersonSearch'
--header 'ApiKey: _ApiKeyValue_'
--header 'Content-Type: multipart/form-data'
--header 'Accept: application/json'
--form 'Name="_Name_"'
--form 'LastName="_LastName_"'
--form 'SecondLastName="_SecondLastName_"'
--form 'CURP="_CURP_"'

Response:

200 Success

{
  "match": "string",
  "resultCount": 0,
  "results": [
    {
      "entity": "string",
      "records": [
        {
          "record": "string",
          "plaintiff": "string",
          "defendant": "string",
          "entity": "string",
          "court": "string",
          "type": "string",
          "jurisdiction": "string",
          "date": "string",
          "agreements": [
            {
              "date": "string",
              "text": "string"
            }
          ]
        }
      ]
    }
  ]
}
Response:
Name Type Description
match string Indicates if there were matches in the search
resultCount int Indicates how many results were found
results    
entity string Federal State
records    
record string Legal file
plaintiff string Plaintiff
defendant string Defendant
entity string Federal State
court string Court
type string Type
jurisdiction string Jurisdiction
date string Date "08-01-2512"
agreements
date string Date "08-01-2512"
text string Text of the agreement

204 NotFound

When the information was not found in the source of verification. The legal entity name may not be correct.

{}

400, 500, 501 Bad Request, Internal server Error & Error not Implemented

When the parameters do not have the correct format, internal error in our server or an uncontrolled error occurs.

Name Type Description
errorMessage    
code string Error code
message string Error Message
statusCode int Status Code returned
request    
name string The first name of the natural person
lastName string The last name of the natural person
secondLastName string The second last name of the natural person
CURP string The CURP (Unique Population Registry Code) of the natural person
{
  "errorMessage": {
    "code": "string",
    "message": "string",
    "statusCode": 0
  },
  "request": {
    "name": "string",
    "lastName": "string",
    "secondLastName": "string",
    "curp": "string"
  }
}

401, 404, 405, 504 Unauthorized, Not Found, Method Not Allowed & Timeout

When no authentication, Method not found or not allowed, or Timeouts errors occur.

Name Type Description
errorMessage    
code string Error code
message string Error Message
statusCode int Status Code returned
{
  "code": "string",
  "message": "string",
  "statusCode": 0
}

Service messages

Message Code Message Description
LEGAL001 Provider, Authentication error. Invalid or missing authentication credentials (API key).
LEGAL002 Provider, Method not allowed. Requested HTTP method is not allowed for the endpoint.
LEGAL003 Provider, Internal Server Error. Unexpected server-side issue hindering request processing.
LEGAL004 Provider, Incorrect parameter format. Provided parameters do not conform to expected format.
LEGAL005 Provider, TimeOut Error. API request took longer than the allowed time limit.
LEGAL006 Provider, Resource not found. Requested resource does not exist on the server.
LEGAL007 Provider, Error Not Implemented. Requested functionality or feature is not yet implemented.
LEGAL008 Server Connection Error. Issue establishing connection to the server.
LEGAL009 Provider, Incorrect response format. API response does not match expected format.
LEGAL010 No Content. Request successful, but no data to return as response.
LEGAL011 General Error. Generic error during API interactions.
LEGAL012 Invalid request parameter. Provided request parameter is invalid or missing.
LEGAL013 Internal Server Error. Unexpected server-side issue hindering request processing.
LEGAL014 Timeout Error. API request took longer than the allowed time limit.
LEGAL015 Authentication Error. ApiKey Header Not Found Authentication error due to missing ApiKey header.