Body Type Groups Translations API Documentation
Introduction
This API allows SEM systems to query the site to get the body type group translations for a given locale
- Make a POST to the https://www.cargurus.com/Cars/api/1.0/bodyTypeGroupTranslations.action URL specifying the parameters described below
- Retrieve and process the response which will be a JSON string representing the SemUrlResponse object also described below.
HTTP Request
| URL |
https://www.cargurus.com/Cars/api/1.0/bodyTypeGroupTranslations.action |
| Method |
POST |
| Parameters |
|
SemUrlRequest Body JSON Fields
| Name |
Description |
Object Type |
| locale |
a java locale string for the required country and language. e.g. es_US. Required/valid |
string |
HTTP Response
The API returns a JSON formatted string representing an SemUrlResponse object described below.
BodyTypeGroupTranslationsResponse Fields
| Name |
Description |
Object Type |
| success |
Whether the request was processed successfully. This flag describes the overall status of the request. If success is false, then the error object described
below will contain the appropriate error code and description. |
boolean (true/false) |
| error |
An ApiError object containing a specific error code and description |
ApiError object |
| keys |
This is a list of key-value pairs containing the body type group name and the translation for the locale |
string |
ApiError Fields
| Name |
Description |
Object Type |
| error_code |
The error code |
integer |
| description |
The error's description |
string |
Examples
Example 1 - (Valid Request)
HTTP Request's 'body' parameter:
{
locale: "en_US"
}
HTTP Response
{
"keys": {
"body_type_groups.sedan.plural": "Sedans",
"body_type_groups.pickup_truck.plural": "Pickup Trucks"
},
"success": true
}
Example 2 - (Invalid Request)
HTTP Request's 'body' parameter:
{
}
HTTP Response
{
"keys": {},
"success": false,
"error": {
"description": "The request body is malformed. Details: Invalid request",
"error_code": 100
}
}