Intro
This API is meant to validate a postal code into the SEPOMEX data base
Important points
Mandatory Field
codigoPostal field is required to validate the data.
Validations applied
The value for codigoPostal must only contain numbers and should have a length of 5 digits
Test cases
We have included a query parameter in Sandbox to enable you to query the test cases that we created for running tests. To get a response, fill the testCaseId parameter with any of the following cases:
Num | Id | Name | Description |
---|---|---|---|
1 | 663567bb713cf2110a1106de | CP no encontrado | Indicates that there is no information with the postal code provided |
3 | 663567bb713cf2110a1106dd | Respuesta exitosa | Indicates one successful response |
Test your own test case
In case you want to test your own test case created in link, you can send in the testCaseId parameter the identifier of the test case you want to use.
For more information visit our knowledge center to know more about test cases
Possible Errors
The next errors can be returned if there is a problem with the request body or the execution of this service:
"LENGTH_ERROR; should be = 5".
"FORMAT_ERROR; must only contain numbers".
Possible responses
If the postal code does not exist the service will return an empty response
If the postal code is valid it will return the next data:
- "Asentamiento"
- "Ciudad"
- "ClaveDeOficina"
- "CodigoPostal"
- "DelegacionMunicipio"
- "Estado"
- "TipoDeAsentamiento"