Pregled
Athena XAI nudi mapiranje tri vrste sirovih podataka: podataka o kategorijama, atributima i proizvodima. Kada mapiranje uspe, možete da pokrenete ponovno indeksiranje. Sirova kolekcija služi kao pomoćno skladište za te podatke, a Athena XAI ih kasnije koristi pri indeksiranju.
Da biste uključili pomoćnu kolekciju na sajtu, u Super Admin-u podesite polje „Use Raw data from NoSQL“ na „Yes“.
Redosled izvršavanja je bitan. Prvo mapirajte atribute i kategorije, a zatim proizvode.
API za mapiranje atributa
API za ponovno indeksiranje atributa kreira atribute iz feed-a atributa koji pošaljete u telu zahteva.
| Metoda | Putanja |
|---|---|
POST | /api/v1/mapping/attributes |
POST | /api/v2/mapping/attributes |
Telo zahteva
{
"token" : "{{ website_token }}", //required
"data" : {
"attributes" : [ //required, array of objects
{
"id": "93",
"code": "color",
"options": [
{
"value": "5476",
"label": "Black",
"hex_code": "#000000"
},
{
"value": "5485",
"label": "Red",
"hex_code": "#ff0000"
},
{
"value": "5486",
"label": "White",
"hex_code": "#ffffff"
},
{
"value": "5487",
"label": "Yellow",
"hex_code": "#ffff00"
}
]
}
]
}
}
Uspešan odgovor
{
"status": 200,
"message": "Success"
}
API za mapiranje kategorija
API za ponovno indeksiranje kategorija kreira kategorije iz feed-a kategorija koji pošaljete u telu zahteva. Feed treba da bude u skladu sa uputstvima na stranici Feed kategorija.
| Metoda | Putanja |
|---|---|
POST | /api/v1/mapping/categories |
POST | /api/v2/mapping/categories |
Telo zahteva
{
"token" : "{{ website_token }}", //required
"data" : {
"categories" : [ //required, array of objects
{
"id": "17",
"parent_id": "12",
"parent_name": "Tops",
"level": "4",
"name": "Tanks",
"image": null,
"url": "http://example.local.com/men/tops-men/tanks-men.html",
"path": "Men > Tops > Tanks",
"category_size": 12
},
{
"id": "18",
"parent_id": "13",
"parent_name": "Bottoms",
"level": "4",
"name": "Pants",
"image": "http://example.local.com/bottoms-category-image.html",
"url": "http://example.local.com/men/bottoms-men/pants-men.html",
"path": "Men > Bottoms > Pants",
"category_size": 12
}
]
}
}
Uspešan odgovor
{
"status": 200,
"message": "Success"
}
API za mapiranje proizvoda
API za mapiranje proizvoda čuva sirove podatke u pomoćnim kolekcijama radi kasnijeg indeksiranja. Podržava inkrementalno ažuriranje, pa podatke možete da šaljete u delovima.
Dva parametra označavaju početak i završetak procesa mapiranja: start_reindex i end_reindex.
| Metoda | Putanja |
|---|---|
POST | /api/v1/products/rawData |
POST | /api/v2/products/rawData |
Telo zahteva
{
"token": "{{ website_token }}", //required
"start_reindex": true,
"end_reindex": true,
"data": {
"products": [ //required, array of objects
{
"entity_id": "1",
"attribute_set_id": "15",
"type_id": "simple",
"sku": "24-MB01",
"has_options": "0",
"required_options": "0",
"created_at": "2021-07-26 08:02:14",
"updated_at": "2021-07-26 08:02:14",
"visibility": "4",
"status": "1",
"name": "Joust Duffle Bag",
"image": "http://magento.local.com/media/catalog/product/cache/96b5f3e5d9a5953212deef43723952d6/m/b/mb01-blue-0.jpg",
"small_image": "/m/b/mb01-blue-0.jpg",
"thumbnail": "/m/b/mb01-blue-0.jpg",
"url_key": "joust-duffle-bag",
"price": "32.000000",
"description": "The sporty Joust Duffle Bag can't be beat - not in the gym, not on the luggage carousel, not anywhere. Big enough to haul a basketball or soccer ball and some sneakers with plenty of room to spare, it's ideal for athletes with places to go.Dual top handles.Adjustable shoulder strap.Full-length zipper.>L 29\" x W 13\" x H 11\".",
"store_id": 1,
"total_reviews": 2,
"reviews": 50,
"link": "http://magento.local.com/joust-duffle-bag.html",
"full_image_path": "http://magento.local.com/media/catalog/product/m/b/mb01-blue-0.jpg",
"stock": 1,
"attributes": {
"color": "49,50",
"size": "91",
"materijal_prevlakeee": "46844"
},
"categories": [
"3",
"4"
],
"salable_qty": 100
}
]
}
}
Uspešan odgovor
{
"status": 200,
"message": "Success"
}