JSON API
Settings
2 min
the settings api is designed to allow developers to configure default settings for the klevu indexing system before sending data updates this pre configuration step ensures that certain parameters, such as default currency, are set and consistently applied to all subsequent data updates as klevu continues to evolve, more configurable settings will be added to enhance the indexing system's capabilities and enable it to make decisions based on these configurations setting default currency if no default currency is set, our backend service will automatically use the currency found in the first record of the first batch submitted as the default currency to ensure that all product prices are indexed in the default currency of usd by configuring this setting upfront, they can avoid inconsistencies in currency handling across different data updates { "name" "showcasing how to register a custom attribute ", "method" "put", "url" "https //indexing api ksearchnet com/v2/settings", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "xobgdm4j1d4of8rzlyuhq", "language" "curl", "code" "curl location request put 'https //indexing api ksearchnet com/v2/settings' \\\\\n header 'x klevu auth algo hmacsha384' \\\\\n header 'x klevu timestamp 2023 07 10t08 38 00z' \\\\\n header 'x klevu apikey klevu 1592574318858490' \\\\\n header 'content type application/json' \\\\\n header 'authorization bearer yqvmpq63wosb760eakundomei3rlm+efkdg7wexnifewccd6ejqjj5h/w/hdtfpg' \\\\\n data '{\\"defaultcurrency\\" \\"gbp\\"}'", "customlabel" "" } ], "selectedlanguageid" "xobgdm4j1d4of8rzlyuhq" }, "results" { "languages" \[ { "id" "blif1ogwvbqovmu2fclqc", "language" "200", "customlabel" "", "code" "{\n \\"message\\" \\"store settings updated \\"\n}" }, { "id" "mob nxb4ibjs 9a fk9gu", "language" "400", "code" "{\n \\"status\\" 400,\n \\"code\\" \\"validation error\\",\n \\"message\\" \\"the request was invalid please check the provided payload for errors \\",\n \\"debug\\" \[\n {\n \\"message\\" \\"the attribute defaultcurrency has an invalid currency code 'soo' it must be a valid code according to iso 4217 standards \\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "blif1ogwvbqovmu2fclqc" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "name" "x klevu auth algo", "kind" "required", "type" "string", "description" "this is the algorithm used to create the security bearer token ", "children" \[] }, { "name" "x klevu timestamp", "kind" "required", "type" "string", "description" "this should be your current time while generating the request it is used to keep the request secured and discourage request relays ", "children" \[] }, { "name" "x klevu apikey", "kind" "required", "type" "string", "description" "this is the api key of your store please refer to the klevu merchant centre manual to understand where to get this key from ", "children" \[] }, { "name" "content type", "kind" "required", "type" "string", "description" "this needs to be application/json as this request body contains a json ", "children" \[] }, { "name" "authorization", "kind" "required", "type" "string", "description" "this is the generated security token that authenticates the request ", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } }