Step 1. Submit the AI Job request
Endpoint: POST - /v1/ecommerce/thank_you_email
Attribute |
Type |
Mandatory |
Description |
content |
String |
Yes |
Product name and its parameters to generate the thank you email. |
language |
String |
No |
Specify the language of the output, defaults to English . |
max_length |
Number |
No |
Specify the maximum length of the email in words, e.g., 100 . |
voice_tone |
String |
No |
Specify the voice tone of the output. It can be adjectives like funny or joyous , or even the name of a famous writer . |
context |
String |
No |
An additional flexible instructions for content processing. |
REQUEST EXAMPLE:
{
"content": "Razer Blade 16 Gaming Laptop: NVIDIA GeForce RTX 4090-13th Gen Intel 24-Core i9 HX CPU",
"language": "English",
"voice_tone": "neutral",
"context": "At the end of the email include an invitation for the customer to visit our store again"
}
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/thank_you_email/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": "8c3af4d1-a8ae-4c52-9656-4f26254b7b71",
"attributes": {
"status": "success",
"type": "ecommerce_thank_you_email",
"result": {
"email": "Dear Customer,\n\nThank you for your recent purchase of the Razer Blade 16 Gaming Laptop: NVIDIA GeForce RTX 4090-13th Gen Intel 24-Core i9 HX CPU. We appreciate your business and are confident that you will enjoy the high performance and advanced features of your new laptop.\n\nWe look forward to serving you again. Please visit our store soon for more exciting products and offers.\n\nBest regards,\n[Your Company Name]"
}
}
}
}