Troubleshooting
The Knox Deployment Program Reseller API uses the conventional HTTP response codes to indicate the success or failure of a request. A 2XX response code indicates success, a 4XX response code indicates a client-side error due to the request inputs, and a 5XX response code indicates a server-side error. It also includes custom error codes that are specific to Knox Deployment Program. In addition, errors will contain a JSON response body with more information about the error:
HTTP/1.1 200 OK
Content-Type: application/json
{
"totalCount": 0,
"pageNum": 0,
"customers": []
}
Async result: GET /kcs/v1/rp/devices/status
HTTP/1.1 200: OK
Content-Type: application/json
{
"transactionId": "string",
"state": "Complete",
"type": "Delete",
"orderNo": "string",
"devices": [
{
"imei": "string",
"code": 40000004,
"message": "DEVICE_INVALID",
"data": "The specified device is not valid."
}
],
"operationType": "DELETE"
}
HTTP/1.1 400: Bad Request
Content-Type: application/json
{
"errorId": "string",
"code": 40000011,
"message": "CUSTOMER_ID_INVALID",
"data": "The specified customer ID is not valid."
}
HTTP/1.1 401: Unauthorized
Content-Type: application/json
{
"code": 4012250,
"message": "ACCESS_TOKEN_BAD_REQUEST",
"data": "ACCESS_TOKEN_BAD_REQUEST"
}
HTTP/1.1 403: Forbidden
Content-Type: application/json
{
"errorId": "string",
"code": 40300000,
"message": "AUTHORIZATION_FAIL",
"data": "The current user is unauthorized to use this service."
}
HTTP/1.1 404: Not Found
Content-Type: application/json
{
"errorId": "string",
"code": 40400001,
"message": "RESELLER_NOT_FOUND",
"data": "The specified reseller does not exist."
}
HHTTP/1.1 500: Internal Server Error
Content-Type: application/json
{
"errorId": "string",
"code": 50000000,
"message":"INTERNAL_SERVER_ERROR",
"data": "An unknown internal server error has occurred."
}
Error object
The error objects contain the following attributes:
Property | Type | Required | Description |
---|---|---|---|
errorId | String | Yes | A unique error identifier. |
code | String | Yes | The error code number. If it is unique to Knox Deployment Program, it is a more specific indicator of the error than the HTTP response code. |
message | String | Yes | The name of the error code. |
data | String | Yes | A description of the error, intended to help developers to debug the error response. |
Standard HTTP error codes
The following table lists the most common HTTP error responses:
Code | Name | Description |
---|---|---|
200 | Success | The request was successfully received. |
400 | Bad Request | The client has issued an invalid request. Verify your request (ex. check validation errors in your request payload). |
401 | Unauthorized | Authorization for the API is required, but the request has not been authenticated. |
403 | Forbidden | The request has been authenticated but does not have the appropriate permissions, or the requested resource cannot be found. |
404 | Not Found | The requested path or the specified user does not exist. |
500 | Server Error | An error has occurred on the server. Please try again later. |
Knox Deployment Program error codes
Knox Deployment Program specifies several custom error codes which provide more information than the standard HTTP error response codes. The following table lists the standard Knox Deployment Program error codes and their descriptions:
Code | Message | Description |
---|---|---|
40000000 | RESOURCE_INVALID_PARAM | The specified request parameters are not valid. {parameter } |
40000001 | RESOURCE_DUPLICATE_PARAM | Must provide only one of the following request parameters. {parameter } |
40000002 | PAGE_OUT_OF_BOUNDS | The requested page is not valid or is out of bounds. |
40000003 | DEVICE_COUNT_EXCEEDED | The specified list of devices exceeded the maximum count. |
40000004 | DEVICE_INVALID | The specified device is not valid. |
40000005 | DEVICE_DUPLICATE | The specified device already exists. |
40000006 | DEVICE_ID_INVALID | The specified device ID is not valid. |
40000007 | DEVICE_IMEI_INVALID | The specified IMEI is not valid. |
40000008 | DEVICE_MEID_INVALID | The specified MEID is not valid. |
40000009 | DEVICE_SERIAL_INVALID | The specified Serial Number is not valid. |
40000010 | RESELLER_ID_INVALID | The specified reseller ID is not valid. |
40000011 | CUSTOMER_ID_INVALID | The specified customer ID is not valid. |
40000012 | CUSTOMER_RESELLER_ALREADY_ASSOCIATED | The specified customer is already associated with the reseller. |
40000013 | TRANSACTION_ID_INVALID | The specified transaction ID is not valid. |
40000014 | TRANSACTION_ID_DUPLICATE | The specified transaction ID already exists. |
40000044 | RESELLER_CUSTOMER_DEVICE_NOT_FOUND | This device {parameter } does not exist for current customer and reseller. |
40100000 | AUTHORIZATION_FAIL | Authorization for the API is required, but the request has not been authenticated. |
40300000 | AUTHORIZATION_FAIL | The request has been authenticated but does not have the appropriate permissions, or the requested resource cannot be found. |
40400001 | RESELLER_NOT_FOUND | The specified reseller does not exist. |
40400002 | CUSTOMER_NOT_FOUND | The specified customer does not exist. |
40400003 | VENDOR_NOT_FOUND | The specified vendor does not exist. |
40400004 | ASSOCIATION_NOT_FOUND | The specified customer is not associated with current user. |
50000000 | INTERNAL_SERVER_ERROR | An unknown internal server error has occurred. |
Troubleshooting
If your request returns a 400 level error
Check the specific error code and refer to the error codes section of this reference. To further debug, check the response payload and the Activity Log on the Reseller Portal.
If your request returns a 500 level error
Please try the request again at a later time.
On this page
Is this page helpful?