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:
| Code | Description |
|---|---|
| 0 | No error |
| -1 | Internal error. Contact Scalefast |
| -10 | access_token parameter not found in the request |
| -11 | access_token parameter not valid |
| -20 | request_data parameter not found in the request |
| -21 | A mandatory parameter in the request_data structure was not found. The msg string property indicates the missing parameter |
| -22 | A parameter in the request data structure was invalid. The msg string property indicates the invalid parameter |
| -23 | A parameter must not be present in the request. The msg string property indicates the concerned parameter |
| -24 | A 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"
}
}
