JSON API 🆕
How to use the API
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:
This is the algorithm used to create the security bearer token.
This should be your current time while generating the request. It is used to keep the request secured and discourage request relays.
This is the API Key of your store. Please refer to the Klevu Merchant Centre manual to understand where to get this key from.
This needs to be application/JSON as this request body contains a JSON.
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.