Authentication
The Convertopia API uses API keys to authenticate requests. You can view and manage your API
keys in the Convertopia Dashboard.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret
API keys in publicly accessible areas.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic
auth username value. You do not need to provide a password.
One of the steps involved in this process is to perform Base64 encoding on a specific string:
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
The assignment of the Client Key, Client Secret, and Public Site ID should be done
through
the convertopia dashboard.
(e.g., for a cross-origin request), use
"Authorization:Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)"
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests
without authentication will also fail.
Product Search Extended
The Product Search endpoint allows you to integrate Convertopia's
product search
functionality into your website. It provides an extended search capability
to retrieve
relevant product information based on a given search term
Endpoint:
{baseURL}/product-search/extended
|
Endpoint Usage:
To use the Product Search endpoint, you need to make a POST request to the
specified
URL with the required parameters and headers
Sample cURL Request:
curl --location '{baseURL}/product-search/extended'
\
--header 'Authorization:
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
--header 'Content-Type: application/json' \
--data '{
"searchTerm": "bags"
}'
|
Note: Make sure to replace placeholders in the cURL request with actual values before
making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia API.
Request Headers:
Authorization: Basic authentication header containing the API key.
Replace
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
with your actual API key.
"searchTerm" (string):The term you want to search for within the merchant store. It
can be a keyword, phrase, or any other relevant text that describes the desired information
or products.
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing information about the searched
products.
This response will include product IDs which are obtained from the merchant store.
[
65
96
195
538
693
797
1881
2062
]
Product Search Simple
The Product Search endpoint allows you to integrate Convertopia's
product search
functionality into your website. It provides a simple search capability to
retrieve
product information based on a given search term.
Endpoint:
{baseURL}/product-search/simple
|
Endpoint Usage:
To use the Product Search endpoint , you need to make a POST request to the
specified
URL with the required parameters and headers.
Sample cURL Request:
curl --location '{baseURL}/product-search/simple' \
--header 'Authorization:Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
--header 'Content-Type: application/json' \
--data '{
"searchTerm": "bag"
}'
|
Note: Make sure to replace placeholders in the cURL request with actual values before
making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia API.
Request Headers:
Authorization: Basic authentication header containing the plugin API key.
Replace
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
with your actual API key.
"searchTerm" (string):The term you want to search for within the merchant store. It
can be a keyword, phrase, or any other relevant text that describes the desired information
or products.
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing information about the searched
products.
The response will include details such as product names, descriptions, prices, and other
relevant information, which are obtained from the merchant store.
[
{
"id": "string"
"name": "string"
"description": "string"
"sku": "string"
"catalogId":"string"
"price": "Integer"
"isOnline": "Boolean"
"gender": "string"
"availability": "Boolean"
"url":"string",
"imageUrl":"string",
"categoryNames": ["strings"],
"categoryUrls": ["strings"],
"currency": "string",
"shortDescription": "string"
"productId": "string"
"size": "string"
},
]
Job Info
The Job Info endpoint allows you to retrieve information about a specific job. This
endpoint provides
details about the job name, job group ,job details and other relevant information.
Endpoint Usage:
To use the Job Info endpoint, you need to make a GET request to the specified URL with the
required
parameters and headers.
Sample cURL Request:
curl --location --request GET '{baseURL}engine.convertopia.com/job/info' \
--header 'Authorization:Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
--header 'Content-Type: application/json' \
--data '{
"searchTerm": "bags"
}'
|
Note: Make sure to replace placeholders in the cURL request with actual values before
making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia API.
Request Headers:
Authorization: Basic authentication header containing the API key.
Replace
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
with your actual API key.
"searchTerm" (string):The term you want to search for within the merchant store. It
can be a keyword, phrase, or any other relevant text that describes the desired information
or products.
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing information about the specified
job. The
response will include details such as the job ID, status, progress, and any other relevant
information.
[
{
"jobName": "string"
"jobGroup": "string"
"nextFireTime": "Integer"
"startedTime": "Integer"
"siteID": "string"
"fireURL":"string"
"jobDetails": ["strings"]
"isCronJob": "Boolean"
}
]
Job Trigger
The Job Trigger endpoint allows you to initiate a new job for processing. By
triggering a job, you
can request Convertopia to perform a specific task or operation based on the
provided parameters.
This endpoint is used to start a new job in the Convertopia system.
Endpoint Usage:
To trigger a job, you need to make a GET request to the specified URL with the required
parameters
and headers.
Sample cURL Request:
curl --location --request GET
'http://{baseURL}engine.convertopia.com/job/trigger' \
--header 'Authorization:Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
--header 'Content-Type: application/json' \
--data '{
"searchTerm": "bags"
}'
|
Note: Make sure to replace placeholders in the cURL request with actual values before
making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia API.
Request Headers:
Authorization: Basic authentication header containing the API key.
Replace
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
with your actual API key.
"searchTerm" (string):The term you want to search for within the merchant store.
It can be a keyword, phrase, or any other relevant text that describes the desired
information or products.
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing information about the
triggered
job. The
response will include details such as the job status.
Job Schedule Trigger
The Job Schedule Trigger endpoint allows you to schedule the execution of a job at a
specific time or
interval. This endpoint is used to trigger a job based on a predefined schedule. By
scheduling a
job, you can automate recurring tasks or operations in the Convertopia system.
Endpoint:
{baseURL}/job/trigger/scheduler
|
Endpoint Usage:
To schedule the execution of a job, you need to make a GET request to the specified URL with
the
required parameters and headers.
Sample cURL Request:
curl --location
'http://{baseURL}/job/trigger/scheduler?jobId=importProductFeed&jobGroup=Product'
\
--header 'Authorization:Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
|
Note: Make sure to replace placeholders in the cURL request with actual values before
making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia API.
Query Parameters:
jobID:
The identifier of the job you want to schedule. Replace importProductFeed with the
actual job
ID.
jobGroup:
The group to which the job belongs. Replace product with the appropriate job group.
Request Headers:
Authorization: Basic authentication header containing the plugin API key.
Replace
Base64Encoding(ClinetKey:ClientSecert:PublicSiteId)
with your actual API key.
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing information about the
triggered
job. The
response will include details such as the job status.
Autocomplete
There are two types of autocomplete functionality available: API-based and CDN-based.
API's
The Autocomplete Login API endpoint allows you to retrieve autocomplete suggestions
for a search
term. This endpoint is used to provide users with real-time suggestions as they type
in a search
box. It requires a valid access token for authentication.
One of the steps involved in this process is to perform Base64 encoding on a specific
string:
Base64Encoding(ClinetKey:PublicSiteId)
The assignment of the Client Key and Public Site ID should be done through the
dashboard.
Endpoint:
product-search/autocomplete/{accessToken}
|
Endpoint Usage:
To retrieve autocomplete suggestions, you need to make a GET request to the specified URL
with the
required parameters and headers.
Sample cURL Request:
curl --location
'http://{baseURL}/product-search/autocomplete/QWNjZXNzIHRva2Vu'
\
--header 'Content-Type: application/json' \
--data '{"searchTerm": "bag"}',
"{baseURL}": "https://google.com"
|
Note: Make sure to replace placeholders in the cURL request with actual values before making
the API call
cURL Request Parameters:
{baseURL}: The base URL of the Convertopia engine.
{accessToken}: The access token obtained after successful login.
ReplaceQWNjZXNzIHRva2Vu
with the actual accesstoken.
"searchTerm" (string):The term you want to search for within the merchant store. It
can be a keyword, phrase, or any other relevant text that describes the desired information
or products.
Request Headers:
Content-Type: The content type of the request body. Set this header to
application/json.
Response:
The API will respond with a JSON-encoded response containing the tempalte and
redirection.If redirect URL is configured in the Convertopia dashboard, it will return
"redirection true" along with the specified URL instead of the template.
{
"template": "URL" ,
"redirection": true
}
If a redirect URL is not specified in the Convertopia dashboard, it will return
"redirect false" along with the provided template.
{
"template": "html string" ,
"redirection": false
}
CDN's
Autocomplete can be implemented using a CDN
for JSON.
This documentation provides information on how to utilize these CDN services for
Autocomplete functionality.
JS | http://cdn.convertopia.com/static/js/{siteID}/convertopia.js
Image | http://cdn.convertopia.com/static/image/{siteID}/{imageName}
To access the CDN services, you can obtain the necessary details from the Convertopia
dashboard.
Requirements:
Access to the Convertopia dashboard
Steps to Implement Autocomplete
1. Log in to the Convertopia dashboard.
2. Navigate to the Autocomplete > Installation Instructions .
3. Identify the selectorID from the merchant's code that corresponds to the search
field
where you need to implement autocomplete functionality. Please provide the
specific
selectorID for the search field in convertopia dashboard .
4. Locate the result container ID from the merchant's code that corresponds to the
section displaying the autocomplete search results. Additionally, provide the
color
used to highlight the best match within the search results.