Errors

You'll most likely receive an error if validation fails, something doesn't exist or something went wrong on our end.
Some reserved error code exists for generic errors. A list of the most important ones are found below:

CodeDescription
0No error
-1Internal error. Contact Scalefast
-10access_token parameter not found in the request
-11access_token parameter not valid
-20request_data parameter not found in the request
-21A mandatory parameter in the request_data structure was not found. The msg string property indicates the missing parameter
-22A parameter in the request data structure was invalid. The msg string property indicates the invalid parameter
-23A parameter must not be present in the request. The msg string property indicates the concerned parameter
-24A parameter is empty. The msg string property indicates the concerned parameter

Example: Get all products sending a parameter that does not exist

curl --request GET \
  --url 'https://api.scalefast.com/products?clientID=CLIENT_ID&access_token=ACCESS_TOKEN&wrong_parameter=WRONG_VALUE' \
  --header 'accept: application/json'
{
    "result": {
        "status": "ERROR",
        "errcode": "-23",
        "msg": "The parameter wrong_parameter must not be present in this request"
    }
}