Common Response
This section describes response codes, error codes, response messages, etc. that are commonly used in the ThinQ Connect APIs.
HTTP Response Code
HTTP Response Codes of ThinQ Connect APIs are defined based on the following HTTP standard response codes.
HTTP Response Code |
Description |
---|---|
2xx |
Succeeded |
4xx |
Error (Invalid request from the client) |
5xx |
Error (Error in the server) |
HTTP Response Codes of ThinQ Connect APIs
ThinQ Connect APIs return the proper HTTP response codes for each request.
HTTP Code |
Text |
Description |
---|---|---|
200 |
OK |
Normal Response |
400 |
Bad Request |
Invalid Request |
401 |
Unauthorized |
No permission |
404 |
Not Found |
The server could not find what was requested. |
500 |
Internal Server Error |
Server error occurred |
501 |
Not Implemented |
It has not been implemented yet |
503 |
Service Unavailable |
The service is unavailable |
Error Code
For parts which cannot be confirmed by the HTTP response code, check the JSON error message. Through the error codes defined by the ThinQ Connect API, detailed causes for the errors can be identified.
Rules
The error codes of the ThinQ Connect API are divided into client errors and server errors.
- Client Error: Used to shows error causes to the client.
- Server Error: Used to check the internal error for Server.
Erro Code |
Description |
|
---|---|---|
1000 |
Client Error |
|
|
11xx |
Parameter |
|
12xx |
Resources |
|
13xx |
Authority |
2000 |
Server Error |
Error Code of ThinQ Connect APIs
Error Code |
Text |
Description |
HTTP Code |
---|---|---|---|
0000 |
Unknown error |
Undefined error (the error to analyze) |
500 |
1000 |
Bad request |
Invalid request |
400 |
1101 |
Missing parameters |
Required input items are missing. |
400 |
1102 |
Unacceptable parameters |
Parameters that are not permitted have been entered. |
400 |
1103 |
Invalid token |
Token grammar is incorrect. |
400 |
1104 |
Invalid message id |
Message ID grammar is incorrect. |
400 |
1201 |
Not registered admin |
There is no registered administrator. |
404 |
1202 |
Not registered user |
There is no registered user. |
404 |
1203 |
Not registered service |
There is no registered service. |
404 |
1204 |
Not subscribed event |
There is no subscribed event. |
404 |
1205 |
Not registered device |
There is no registered device. |
404 |
1206 |
Not subscribed push |
There is no subscribed push. |
404 |
1207 |
Already subscribed push |
There is a subscribed push (an identical push already exists). |
404 |
1208 |
Not registered service by admin |
The service is not managed by an administrator. |
404 |
1209 |
Not registered user in service |
The user does not use the service. |
404 |
1210 |
Not registered device in service |
The device is not allowed by the service. |
404 |
1211 |
Not registered device by user |
The device is not registered by the user. |
404 |
1212 |
Not owned device |
The device is not owned by the user. |
404 |
1213 |
Not registered device |
There is no registered device. |
404 |
1214 |
Not subscribable device |
The device does not allow the event subscription. |
404 |
1216 |
Incorrect Header |
Values in the header are not correct. |
400 |
1217 |
Already device deleted |
The device is deleted. |
400 |
1218 |
Invalid token |
The token is not valid |
400 |
1219 |
Not supported model |
The product model is not supported. |
406 |
1220 |
Not supported feature |
The feature is not supported. (The feature is not allowed for the product model.) |
406 |
1221 |
Not supported product |
The device type is not supported. (The device type is not allowed for the service key.) |
406 |
1222 |
Not connected device |
The device is not connected. |
416 |
1223 |
Invalid status device |
The device status values delivered are invalid. |
416 |
1224 |
Invalid device Id |
The device ID is not allowed. |
404 |
1225 |
Duplicate device Id |
The same device ID exists for another device. |
404 |
1301 |
Invalid service key |
The service key is invalid. |
401 |
1302 |
Not found token |
The token has not been issued. |
401 |
1303 |
Not found user |
User of unissued token. |
401 |
1304 |
Not acceptable terms |
The service terms are not accepted. |
401 |
1305 |
Not allowed api |
The API is not allowed. |
401 |
1306 |
Exceeded API calls |
The number of API calls has been exceeded. |
401 |
1307 |
Not supported country |
The country is not supported. |
401 |
1308 |
No control authority |
Unable to get the device control authority (The ThinQ App has the authority.) |
401 |
1309 |
Not allowed API |
The user does NOT have permission on the API call (handling userFilter). |
401 |
1310 |
Not supported domain |
The unsupported domain is used. |
401 |
1311 |
Bad request format |
The request format is wrong. |
401 |
1312 |
Exceeded number of event subscription |
Exceeds the number of event subscription devices set in the corresponding service key. |
400 |
2000 |
Internal server error |
Internal server error |
500 |
2101 |
Not supported model |
The appliance model is not supported. |
503 |
2201 |
Not provided feature |
The feature is not supported. |
503 |
2202 |
Not supported product |
The product family is not supported. |
503 |
2203 |
Not existent model JSON |
The ModelJSON does not exist. |
503 |
2205 |
Invalid device status |
The device status data is not transmitted normally or the transmitted data is not parsed normally. |
400 |
2207 |
Invalid command error |
The control command is not invalid. (The control command contains undefined resources or properties.) |
400 |
2208 |
Fail device control |
Failed to control the device. |
400 |
2209 |
Device response delay |
The response from the device is being delayed. |
400 |
2210 |
Retry request |
Retry the request. |
400 |
2212 |
Syncing |
Synchronizing the ModelJSON is in progress. (Air solution products) |
412 |
2213 |
Retry after deleting device |
Failed to synchronize the ModelJSON. Retry it after deleting the device. (Air solution products) |
412 |
2214 |
Fail Request |
Failed to request. |
400 |
2301 |
Command not supported in REMOTE OFF |
The device does not support control command. (If the remoteControl is false) |
400 |
2302 |
Command not supported in (STATE) |
In the state, the control command is not supported.
|
400 |
2303 |
Command not supported in ERROR |
The control command cannot be processed because the device is in an error state. |
400 |
2304 |
Command not supported in POWER OFF |
The control command cannot be processed because the device is powered off. |
400 |
2305 |
Command not supported in (MODE) |
In the mode, the control command is not supported.
|
400 |
Response Message
Common Message
The success message format of the ThinQ Connect API is common to all APIs. See the following table.
Name |
Type |
Description |
---|---|---|
messageId |
string |
The X-Message-ID value included in the header is returned so that it can be checked from the outside upon request. |
timestamp |
string |
Refers to the time when the request is received. Follows the ISO 8601 format. |
Example
{ "messageId": "fNvdZ1brTn-wWKUlWGoSVw", "timestamp": "2019-06-25T04:52:18.370732" }
Error Message
When an error occurs, the error message is returned as follows:
Name |
Type |
Description |
|
---|---|---|---|
error |
object |
The object providing the followings: |
|
|
message |
string |
Simple explanation of the error type for the relevant code. |
|
code |
enum |
The error code for checking the cause of the error in detail. |