JSON API 🆕
How to use the API
1min
Following is a simple example of how to add a custom attribute to your catalog. This example will help us understand the basics of how to use the API:
PUT
Params
Header Parameters
X-KLEVU-AUTH-ALGO
required
String
This is the algorithm used to create the security bearer token.
X-KLEVU-TIMESTAMP
required
String
This should be your current time while generating the request. It is used to keep the request secured and discourage request relays.
X-KLEVU-APIKEY
required
String
This is the API Key of your store. Please refer to the Klevu Merchant Centre manual to understand where to get this key from.
Content-Type
required
String
This needs to be application/JSON as this request body contains a JSON.
Authorization
required
String
This is the generated security token that authenticates the request.
Let us understand this example in detail:
- HTTP Request: The request body is a JSON object based on the request you want to execute. Use the URL and Method type based on the API definition.
- Authentication: To authenticate the requests, certain headers need to be added to the request, Kindly refer to the Authentication document for details.
- Response: You can expect a valid HTTP 200 status when the request is submitted successfully. For other status and response messages, please refer to the API definition.
- Limits: In general, all APIs have a limit of max 2MB in request size. Post that for other validations or limits for specific APIs, please refer to the API definition.
Updated 31 Oct 2023


Did this page help you?