Încărcare meniu
const url = 'https://prod.store-management.glovo.alb.app.onlineservice.io/api/v3/menu/upload';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"store_id":"example","store_environment":"example","partner_name":"example","super_category":{"name":"example","position":1,"image_url":"example","display_super_category":true,"categories":[{"name":"example","position":1,"image_url":"example","sections":[{"name":"example","position":1,"products":[{"id":"example","name":"example","price":"example","imageUrl":"example","extraImageUrls":["example"],"description":"example","available":true,"attribute_groups":[{"id":"example","name":"example","min":1,"max":1,"collapse":true,"attributes":[{"id":"example","name":"example","available":true,"selected_by_default":false,"price":null}],"multiple_selection":true}]}]}]}]},"super_categories":[{"name":"example","position":1,"image_url":"example","display_super_category":true,"categories":[{"name":"example","position":1,"image_url":"example","sections":[{"name":"example","position":1,"products":[{"id":"example","name":"example","price":"example","imageUrl":"example","extraImageUrls":["example"],"description":"example","available":true,"attribute_groups":[{"id":"example","name":"example","min":1,"max":1,"collapse":true,"attributes":[{"id":"example","name":"example","available":true,"selected_by_default":false,"price":null}],"multiple_selection":true}]}]}]}]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://prod.store-management.glovo.alb.app.onlineservice.io/api/v3/menu/upload \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "store_id": "example", "store_environment": "example", "partner_name": "example", "super_category": { "name": "example", "position": 1, "image_url": "example", "display_super_category": true, "categories": [ { "name": "example", "position": 1, "image_url": "example", "sections": [ { "name": "example", "position": 1, "products": [ { "id": "example", "name": "example", "price": "example", "imageUrl": "example", "extraImageUrls": [ "example" ], "description": "example", "available": true, "attribute_groups": [ { "id": "example", "name": "example", "min": 1, "max": 1, "collapse": true, "attributes": [ { "id": "example", "name": "example", "available": true, "selected_by_default": false, "price": null } ], "multiple_selection": true } ] } ] } ] } ] }, "super_categories": [ { "name": "example", "position": 1, "image_url": "example", "display_super_category": true, "categories": [ { "name": "example", "position": 1, "image_url": "example", "sections": [ { "name": "example", "position": 1, "products": [ { "id": "example", "name": "example", "price": "example", "imageUrl": "example", "extraImageUrls": [ "example" ], "description": "example", "available": true, "attribute_groups": [ { "id": "example", "name": "example", "min": 1, "max": 1, "collapse": true, "attributes": [ { "id": "example", "name": "example", "available": true, "selected_by_default": false, "price": null } ], "multiple_selection": true } ] } ] } ] } ] } ] }'Acest endpoint API permite utilizatorilor să încarce sau să actualizeze întregul meniu al unui magazin în Glovo. Procesul este asincron, ceea ce înseamnă că endpoint-ul returnează un transaction_id care poate fi utilizat pentru a urmări progresul procesului de actualizare a meniului folosind endpoint-ul Verify menu upload.
Rețineți că există un număr maxim de cinci actualizări ale meniului permise pe zi pe adresa fiecărui magazin. Dacă acest limită este atinsă, endpoint-ul va returna un cod de stare 429, indicând că s-au făcut prea multe cereri. Pentru actualizări mici ale produselor și atributele, se recomandă utilizarea endpoint-urilor individuale sau bulk.
În cazul în care sistemul Glovo întâmpină o eroare la actualizarea meniului, nu se vor face modificări pentru a evita inconsistentele. the event that the Glovo system encounters an error while updating the menu, no changes will be made to avoid inconsistencies.
Authorizations
Secțiune intitulată „Authorizations”Request Bodyrequired
Secțiune intitulată „Request Bodyrequired”The model for menu update request
object
The unique identifier of the store
The store environment. Use ‘prod’
The name of the partner
O “super-categorie” este cel mai înalt nivel de categorizare din meniul Glovo.
object
The name of the super category
The position of the super category in the menu
The URL of the image associated with the super category. Must use HTTPS schema
Whether or not the super category should be displayed
The list of categories associated with the super category
O categorie este un nivel secundar de organizare în meniul Glovo și este obligatoriu să aveți cel puțin o colecție în meniul dvs. O colecție este formată din secțiuni și trebuie să aibă cel puțin o secțiune pentru a conține alte elemente. Exemple de colecții includ băuturi, burgeri, salate, deserturi și paste.
object
The name of the category
The position of the category in the menu
The URL of the category image. Must use HTTPS schema
The list of sections within the category
Model for a section component of the menu.
object
The name of the section.
The position of the section.
List of products belonging to this section.
Un produs este un element fundamental al meniului Glovo, care reprezintă în mod obișnuit un element fizic disponibil într-un magazin. Cu toate acestea, magazinul are libertatea de a decide ce dorește să ofere ca produse. Fiecare produs este asociat cu o secțiune a meniului.
object
The ID of the product.
The name of the product.
The price of the product.
The URL of the main image of the product. Must use HTTPS schema.
A list of URLs of additional images of the product. Must use HTTPS schema.
The description of the product.
Whether the product is currently available.
Example
trueA list of attribute groups of the product.
Grupurile de atribute permit gruparea personalizărilor similare în grupuri generice, fiecare dintre acestea putând avea un număr minim și maxim de opțiuni pentru client. De exemplu, grupurile de atribute pot fi folosite pentru a categorisi topping-urile, cum ar fi sosuri, inclusiv maioneza, muștar sau sos de roșii, sau băuturi, cum ar fi apă, cola sau lămâie.
object
The ID of the group
The name of the group
The minimum number of attributes that can be selected
The maximum number of attributes that can be selected
Whether the group should be collapsed or expanded by default
The list of attributes for this group
Produsele pot fi personalizate in diverse moduri, cum ar fi adaugarea de maioneza, includerea unei bauturi sau adaugarea de carne extra, iar fiecare dintre aceste personalizari este cunoscuta sub numele de atribut. Produsele nu sunt obligate sa aiba atribute, dar fiecare atribut poate avea un impact diferit asupra pretului. Grupurile de atribute sunt create pentru a grupa atribute similare impreuna.
object
The ID of the attribute
The name of the attribute
Whether the attribute is available
Whether the attribute is selected by default
The price of the attribute
Whether multiple attributes can be selected
The list of super categories of the menu update
O “super-categorie” este cel mai înalt nivel de categorizare din meniul Glovo.
object
The name of the super category
The position of the super category in the menu
The URL of the image associated with the super category. Must use HTTPS schema
Whether or not the super category should be displayed
The list of categories associated with the super category
O categorie este un nivel secundar de organizare în meniul Glovo și este obligatoriu să aveți cel puțin o colecție în meniul dvs. O colecție este formată din secțiuni și trebuie să aibă cel puțin o secțiune pentru a conține alte elemente. Exemple de colecții includ băuturi, burgeri, salate, deserturi și paste.
object
The name of the category
The position of the category in the menu
The URL of the category image. Must use HTTPS schema
The list of sections within the category
Model for a section component of the menu.
object
The name of the section.
The position of the section.
List of products belonging to this section.
Un produs este un element fundamental al meniului Glovo, care reprezintă în mod obișnuit un element fizic disponibil într-un magazin. Cu toate acestea, magazinul are libertatea de a decide ce dorește să ofere ca produse. Fiecare produs este asociat cu o secțiune a meniului.
object
The ID of the product.
The name of the product.
The price of the product.
The URL of the main image of the product. Must use HTTPS schema.
A list of URLs of additional images of the product. Must use HTTPS schema.
The description of the product.
Whether the product is currently available.
Example
trueA list of attribute groups of the product.
Grupurile de atribute permit gruparea personalizărilor similare în grupuri generice, fiecare dintre acestea putând avea un număr minim și maxim de opțiuni pentru client. De exemplu, grupurile de atribute pot fi folosite pentru a categorisi topping-urile, cum ar fi sosuri, inclusiv maioneza, muștar sau sos de roșii, sau băuturi, cum ar fi apă, cola sau lămâie.
object
The ID of the group
The name of the group
The minimum number of attributes that can be selected
The maximum number of attributes that can be selected
Whether the group should be collapsed or expanded by default
The list of attributes for this group
Produsele pot fi personalizate in diverse moduri, cum ar fi adaugarea de maioneza, includerea unei bauturi sau adaugarea de carne extra, iar fiecare dintre aceste personalizari este cunoscuta sub numele de atribut. Produsele nu sunt obligate sa aiba atribute, dar fiecare atribut poate avea un impact diferit asupra pretului. Grupurile de atribute sunt create pentru a grupa atribute similare impreuna.
object
The ID of the attribute
The name of the attribute
Whether the attribute is available
Whether the attribute is selected by default
The price of the attribute
Whether multiple attributes can be selected
Responses
Secțiune intitulată „Responses”Rezultatul verificării de status
object
Examplegenerated
{ "status": "example", "transaction_id": "example", "message": "example", "detail": "example"}Eroare internă
Examplegenerated
example