On this page
Errors come in two formats. If no company is found, the API uses the normal response format (status = false) and puts the error inside data. Other errors, such as an invalid URL or API key, return a simple { code, message } object without status or tr_id.
Record not found
The juristic_code is in the correct format, but no company matches it. Returned with HTTP 200 and status: false.
{
"status": false,
"tr_id": "1001e8b8-984b-44c0-bc3b-6548d76beb76",
"data": {
"code": "NOT_FOUND",
"message": "record not found"
}
}Unauthorized
The API key is missing, invalid or expired. The response does not include status or tr_id.
{
"code": "INVALID_TOKEN",
"message": "Token is invalid"
}Status codes
| HTTP | Code | Description |
|---|---|---|
| 200 | — | Success. A matching company was found; status = true and data contains the company data. |
| 200 | NOT_FOUND | No company matches the juristic_code. status = false and data contains {code, message}. |
| 400 | INVALID_PARAMS | A required field is missing or malformed. |
| 401 | INVALID_TOKEN | The API key is missing, invalid or expired. |
| 404 | URL_NOT_FOUND | The URL does not exist. Check the path. |
| 500 | INTERNAL_SERVER_ERROR | Unexpected error on our side. You can retry after a short wait. |
| 502 | BAD_GATEWAY | The service could not return a valid response. You can retry later. |
| 503 | SERVICE_UNAVAILABLE | The service is temporarily unavailable. Retry later; do not treat this as "not found". |
Inactive companies and empty fields
A found company always returns status = true, even if it is no longer active. Check data.status for its operating status, e.g. ล้มละลาย (Bankrupt). Many fields can be null or empty, including name_en, the capital-history labels, change_type, change_amount, latest_business_objective and all contact fields. capital_after can also be 0.
