Guide
Features
Account Management
11min
the php sdk provides means of retrieving information about your klevu account for use within your app via the account services , you can generate an account object containing account information and url endpoints query features enabled on your account update the url used by our indexer to download an xml feed of your catalog \[ shopify and bigcommerce customers only ] retrieving klevu account information the accountlookupservice will query the api ksearchnet com/user account/public/platform/account/details endpoint using your js api key and rest auth key (available via store settings in kmc) and return an account object the account object will provide the following information property description jsapikey your unique public key example "klevu 1234567890" restauthkey your private key, used to authenticate your account example "abcde1234567890" platform the platform or framework your account is regstered to integrate with example "magento" active whether this account is currently active example true companyname the company name entered when signing up to kmc example "klevu" email the primary email address registered for this account example "contact\@klevu com" indexingurl domain used to send data for indexing example "indexing ksearchnet com" searchurl domain used to perform searches on indexed data example "eucs27v2 ksearchnet com" smartcategorymerchandisingurl domain used to perform smart category merchandising queries on indexed data example "cn27v2 ksearchnet com" analyticsurl domain used to send analytics events example "stats ksearchnet com" jsurl domain used to embed klevu hosted javascript asssets example "js klevu com" tiersurl domain used to retrieve features information for a klevu account example "tiers klevu com" validation and exception handling prior to transmitting data, the provided account credentials are validated as not empty and correctly formatted, throwing a validationexception on failure requests returning a 401 status code from klevu throw an accountnotfoundexception request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level response headers, body, and execution time are logged on successful request send at debug level more information and code samples can be found under retrieve klevu account details querying enabled features for account the accountfeaturesservice will query the tiers endpoint and return an accountfeatures object containing flags for features enabled on your klevu account an accountfeatures object can also be attached to account objects, and access via the account getaccountfeatures() method the following feature flags are available flag description smartcategorymerchandising whether the smart category merchandising solution is available on this account smartrecommendations whether the product recommendations solution is available on this account preservelayout whether preserve layout should be available as a frontend layout option for integrations using this account validation and exception handling prior to transmitting data, the provided account credentials are validated as not empty and correctly formatted, throwing a validationexception on failure request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level response headers, body, and execution time are logged on successful request send at debug level requested flags missing from, or unknown flags encountered within, the response are logged at warning level more information and code samples can be found under retrieve klevu account details updating the store feed endpoint note only available for accounts registered to integrate with shopify or bigcommerce stores the url used by klevu's indexing service to download and process catalog feeds in xml format can be modified using the updatestorefeedurlservice url updates will take effect the next time klevu's feed monitor service performs a scheduled sync to update the feed url value for your account, you will need your js api and rest auth keys the platorm for which your account was registered (eg "shopify") the base url associated with your klevu account the full url from which xml feeds can be downloaded validation and exception handling prior to transmitting data, the provided account credentials are validated as not empty and correctly formatted, throwing a validationexception on failure request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level response headers, body, and execution time are logged on successful request send at debug level requested flags missing from, or unknown flags encountered within, the response are logged at warning level more information and code samples can be found under update store feed endpoint (shopify / bigcommerce)