JSON API
Errors
4min
merchants are responsible for ensuring the accuracy of the data they submit this includes checking for leading and trailing spaces included in the submitted data are considered valid and are retained during processing in our backend special characters included in the submitted data are properly escaped to ensure compatibility with json format html formatting in descriptions or short descriptions is correctly escaped to prevent unintended rendering issues the startprice and toprice are calculated only when not explicitly submitted for all variants within a given complex product at klevu com, we utilize conventional http response codes to convey the outcome of api requests responses in the 2xx range signify successful operations responses in the 4xx range denote errors stemming from the provided information, such as missing required parameters or failed requests responses in the 5xx range signify issues with klevu's servers, though these are uncommon { "status" {{http status code}}, "code" "{{error code}}", "message" "{{human readable message}}", "debug" \[ {"id" "{{optional document id}}","message" "{{detailed message that helps to debug the error }}"} ] } understanding the error response parameters description status http status codes 400,401, 405, 413, 415, 500, 502, 503, 504 code the type of error returned please see below reference table below for more information message a brief overview of the error debug a comprehensive breakdown of the error, highlighting the reason for the issue along with specific details regarding the record causing the error error message illustrations status code message debug 400 validation error the request was invalid please check the provided payload for errors \[ {"id" "1233ad","message" "attribute brand is undefined "} ] 400 invalid request the request was invalid please check the provided payload for errors \[ { "message" "the store is currently configured to use xml data indexing apis before you can begin using the new json endpoint, a backend migration is required please submit a support ticket at https //help klevu com/support/tickets/new to request assistance with the backend migration process "} ] 401 authentication error authentication failed please ensure your credentials are valid and try again \[{"message" "the supplied credentials are invalid "} ] 405 method not allowed the request method is not allowed \[ {"message" "please ensure you are using a valid request method for this endpoint the allowed methods are get/post/delete "} ] 413 content too large the batch content in the request exceeds the allowable size limit for processing \[{"message" "the request content is too large the maximum allowed size is 2mb "}] 415 unsupported media type the request content type is not allowed \[ {"message" "the request header content type text/plain is not supported for this endpoint " }] 500/502/ 503/504 server error something went wrong on klevu’s end \[{"message" "something went wrong on klevu’s end please contact klevu support at https //help klevu com/support/tickets/new" }]