Response Format

Responses are encoded into a generalized JSON structure with three basic properties: a response code, messages describing any errors that occurred during processing and a custom data object.

{"response":{"code":"SUCCESS","messages":[],"data":null,}}

The generalized JSON response is returned by every service with three properties:

Value Description HTTP Code
SUCCESS If the service request was processed normally 200
VALIDATION_ERROR If something specific was wrong with the request parameters provided. One or more will describe the particular invalid parameter. 400
AUTHENTICATION_ERROR If the provided credentials were not valid. 401
AUTHORIZATION_ERROR Legacy error code from API 401
RESOURCE_LOCKED The requested file is currently being processed by another operation. The file will be unlocked after the operation completes. See Upload for more details. 423
MAX_OPERATIONS_LIMIT_EXCEEDED Too many simultaneous API requests per project or file. 429
GENERAL_ERROR If an unexpected error occurred during the service request processing. 500
MAINTENANCE_MODE_ERROR If Smartling has entered maintenance mode, all API services will return this error. After exiting maintenance mode all services should return to normal. 503


Examples:

{"response":{"data":null,"code":"VALIDATION_ERROR","messages":["apiKey parameter is required","apiVersion parameter is required"]}}
{"response":{"data":{"wordCount":1629,"stringCount":503,"overWritten":false},"code":"SUCCESS","messages":[]}}