Catalogs
In the examples, {{auto_financing_base_url}} is the Auto Financing base URL for the selected environment.
Postal code information
Section titled “Postal code information”Request information
Section titled “Request information”| HTTP method | URL | Example |
|---|---|---|
| GET | {{auto_financing_base_url}}/api/catalogs/zip-code/{{zip-code}} | https://stg-api.creditas.io/mx/b2b/autofin/api/catalogs/zip-code/09440 |
{{zip-code}} is a five-digit string. For example: “09440”.
Request response status
Section titled “Request response status”The service returns 200 OK with the following response body.
Request response body
Section titled “Request response body”| Field | Type | Description |
|---|---|---|
| zipCode | String | The postal code sent in the request. |
| neighborhoods | String[] | A list of neighborhoods associated with the postal code. Ex: [“El Retoño”,“San Andrés Tetepilco”,“Zacahuitzco”] |
| municipality | String | The municipality associated with the postal code. |
| city | String | The city associated with the postal code. |
| state | Object | The Mexican state associated with the postal code. |
cURL example
Section titled “cURL example”curl --location --request GET '{{auto_financing_base_url}}/api/catalogs/zip-code/{{zip-code}}' \--header 'Authorization: Bearer {{access_token}}'Response example
Section titled “Response example”{ "zipCode": "09440", "neighborhoods": [ "El Retoño", "San Andrés Tetepilco", "Zacahuitzco" ], "municipality": "Iztapalapa", "city": "Ciudad de México", "state": { "id": "CDMX", "name": "Ciudad de México" }}Possible errors
Section titled “Possible errors”Review the possible error responses.
Vehicle catalogs
Section titled “Vehicle catalogs”Use these three endpoints in order to select a vehicle:
Get brands by year
Section titled “Get brands by year”Request information
Section titled “Request information”| HTTP method | URL | Example |
|---|---|---|
| GET | {{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands | https://stg-api.creditas.io/mx/b2b/autofin/api/catalogs/years/2020/brands |
{{year}}: The vehicle model year.
Request response status
Section titled “Request response status”The service returns 200 OK with the following response body.
Request response body
Section titled “Request response body”| Field | Type | Description |
|---|---|---|
| [] | Array of objects | A list of brands available for the specified year. |
| Object.id | String | The brand identifier. |
| Object.name | String | The brand’s commercial name. |
cURL example
Section titled “cURL example”curl --location --request GET '{{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands' \--header 'Authorization: Bearer {{access_token}}'Response example
Section titled “Response example”[ { "id": "910", "name": "Acura" }, { "id": "920", "name": "Alfa Romeo" }, { "id": "950", "name": "Audi" }, { "id": "930", "name": "Baic" }]Get models by year and brand
Section titled “Get models by year and brand”Request information
Section titled “Request information”| HTTP method | URL | Example |
|---|---|---|
| GET | {{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands/{{brandId}}/models | https://stg-api.creditas.io/mx/b2b/autofin/api/catalogs/years/2020/brands/910/models |
{{year}}: The vehicle model year.
{{brandId}}: The brand identifier returned by the brands endpoint
Request response status
Section titled “Request response status”The service returns 200 OK with the following response body.
Request response body
Section titled “Request response body”| Field | Type | Description |
|---|---|---|
| [] | Array of objects | A list of models available for the specified year and brand. |
| Object.id | String | The model identifier. |
| Object.name | String | The model’s commercial name. |
cURL example
Section titled “cURL example”curl --location --request GET '{{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands/{{brandId}}/models' \--header 'Authorization: Bearer {{access_token}}'Response example
Section titled “Response example”[ { "id": "528", "name": "ILX" }, { "id": "801", "name": "MDX" }, { "id": "802", "name": "RDX" }]Get versions by year, brand, and model
Section titled “Get versions by year, brand, and model”Request information
Section titled “Request information”| HTTP method | URL | Example |
|---|---|---|
| GET | {{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands/{{brandId}}/models/{{modelId}}/versions | https://stg-api.creditas.io/mx/b2b/autofin/api/catalogs/years/2020/brands/910/models/528/versions |
{{year}}: The vehicle model year.
{{brandId}}: The brand identifier returned by the brands endpoint
{{modelId}}: The model identifier returned by the models endpoint
Request response status
Section titled “Request response status”The service returns 200 OK with the following response body.
Request response body
Section titled “Request response body”| Field | Type | Description |
|---|---|---|
| [] | Array of objects | A list of versions available for the specified year, brand, and model. |
| Object.id | String | The version identifier. |
| Object.name | String | The version’s commercial name. |
cURL example
Section titled “cURL example”curl --location --request GET '{{auto_financing_base_url}}/api/catalogs/years/{{year}}/brands/{{brandId}}/models/{{modelId}}/versions' \--header 'Authorization: Bearer {{access_token}}'Response example
Section titled “Response example”[ { "id": "2020910802280", "name": "5p Tech L4/2.0/T Aut" }, { "id": "2020910802290", "name": "5p A Spech L4/2.0/T Aut" }]