Pregled
Pomoću API-ja za prvi klik u automatskom dopunjavanju poboljšajte brzu pretragu. API se aktivira na prvi klik korisnika i prikazuje popularne pojmove i proizvode.
Možete da ga prilagodite u Athena Dashboard-u. API vraća odeljke prema uslovima prikazivanja koji su tamo podešeni.
Endpoint
| Metoda | Putanja |
|---|---|
POST | /api/v1/autocomplete/first-click |
POST | /api/v2/autocomplete/first-click |
Telo zahteva
{
"q": "Yoga", //required
"token": "{{ website token }}" //required
}
Uspešan odgovor
{
"data": {
"results": {
"product": {
"items": [
{
"id": 694,
"name": "Argus All-Weather Tank",
"highlighted_name": null,
"link": "https://example.com/argus-all-weather-tank.html",
"sku": "MT07",
"product_type_id": "configurable",
"image": "https://example.com/media/catalog/product/main_1.jpg",
"price": {
"regular_price": 22,
"regular_price_with_currency": "$22.00",
"special_price": null,
"special_price_with_currency": null,
"loyalty_price": null,
"loyalty_price_with_currency": null,
"discount_percentage": 0
}
}
],
"title": "Product Matches"
},
"recent_searches": {
"items": [
{
"name": "Dd",
"highlighted_name": null, "section_a": {
"items": [
{
"id": "99999138",
"name": "Women",
"highlighted_name": null,
"link": "https://onboarding-magento.syncitgroup.com/women.html",
"image": "https://example.com/media/wysiwyg/main.jpg"
}
],
"title": "Section A"
},
"link": "https://onboarding-magento.syncitgroup.com/athena/?q=dd"
}
],
"title": "Recent Searches"
},
"section_a": {
"items": [
{
"id": "99999138",
"name": "Women",
"highlighted_name": null,
"link": "https://onboarding-magento.syncitgroup.com/women.html",
"image": "https://example.com/media/wysiwyg/main.jpg"
}
],
"title": "Section A"
},
"popular": {
"items": [
{
"id": 1,
"name": "Et",
"highlighted_name": null,
"link": "https://example.com/athena/?q=et",
"name_urlencoded": "et"
}
],
"title": "Popular Searches"
},
"pdf_documents": {
"items": [],
"title": "Documents"
}
},
"banners": {
"top": [
{
"html": "{{ banner_content }}"
}
]
}
}
}