Step 1. Submit the AI Job request
Attribute |
Type |
Mandatory |
Description |
content |
String |
Yes |
Product name and its parameters to generate the categories. |
language |
String |
No |
Specify the language of the output, defaults to English . |
max_quantity |
Number |
No |
Maximum number of product categories to generate. |
voice_tone |
String |
No |
Preferred writing style parameter. It can be adjectives like funny or joyous , or even the name of a famous writer . |
context |
String |
No |
The list of other categories that will be taken into consideration during the mapping process (for example your current e-commerce categories) |
REQUEST EXAMPLE:
{
"content": "Razer Blade 16 Gaming Laptop: NVIDIA GeForce RTX 4090-13th Gen Intel test 24-Core i9 HX CPU - 16\" Dual Mode Mini LED (4K UHD+ 120Hz & FHD+ 240Hz) - 32GB RAM - 2TB SSD - Compact GaN Charger - Windows 11",
"language": "English",
"max_quantity":100,
"voice_tone": "neutral",
"context":"Razer Laptops,Razer Gear"
}
RESPONSE EXAMPLE:
{
"status_url": "https://sharpapi.com/api/v1/content/translate/job/status/5de4887a-0dfd-49b6-8edb-9280e468c210",
"job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
Step 2. Monitor & Fetch AI Job Results
Endpoint: GET - v1/ecommerce/product_categories/job/status/:uuid
An endpoint is used to check on the progress of the requested API job.
RESULT EXAMPLE:
{
"data": {
"type": "api_job_result",
"id": "6d3fec8c-34f8-4071-a5ba-af14910b4d77",
"attributes": {
"status": "success",
"type": "ecommerce_product_categories",
"result": [
{
"name": "Gaming Laptops",
"weight": 10
},
{
"name": "Razer Laptops",
"weight": 10
},
{
"name": "High-Performance Laptops",
"weight": 9.5
},
{
"name": "Laptops",
"weight": 9
},
{
"name": "Razer Gear",
"weight": 8.5
},
{
"name": "Electronics",
"weight": 8
},
{
"name": "Computers & Accessories",
"weight": 7.5
},
{
"name": "PC Gaming",
"weight": 7
},
{
"name": "Portable Computers",
"weight": 6.5
},
{
"name": "Tech Gadgets",
"weight": 6
}
]
}
}
}