קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
custombatch היא שיטה נפוצה שמאפשרת לקבץ מספר קריאות ל-API, שנקראות 'רשומות', לבקשת HTTP אחת. כל רשומה מפנה רק להפעלת method אחת.
אצווה בהתאמה אישית היא אפשרות טובה במקרים הבאים:
רק התחלתם להשתמש ב-API ויש לכם הרבה נתוני מוצרים להעלות.
צריך לסנכרן נתונים מקומיים עם השרת על ידי שליחת הרבה עדכונים ומחיקות.
יצירת בקשות באצווה
שליחת בקשות באצווה דומה לשליחת קריאות ל-API במקביל. שימו לב שאין ערובה לכך שסדר הרשומות שמוגדר בבקשה יהיה לפי הסדר שבו הן יבוצעו. מומלץ לא להשתמש בקריאות תלויות-נפרדות בבקשה באצווה אחת (למשל, יצירה ועדכון של אותו משלוח).
באופן דומה, התגובות שמתקבלות לבקשות באצווה עשויות להיות מוחזרות בסדר שונה מזה של הבקשות רשומות. אפשר להשתמש ב-BatchId כדי להתאים בין בקשות לבין תשובות, כי יכול להיות שהתשובות יוחזרו מחוץ לרצף.
אפשר לקבץ בקשות ב-API על ידי קריאה ל-method המתאים custombatch:
כדי למנוע שגיאות כשמעלים קבוצות גדולות, מומלץ להגביל את הגודל של custombatch בקשות ל-1,000 רשומות לכל היותר. ערכי המקסימום הבאים חלים על custombatch בקשות:
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-07-03 (שעון UTC)."],[[["The Merchant API is the new version of the Content API for Shopping and is now in beta."],["Use the `custombatch` method to group several API calls into a single HTTP request for efficiency, especially for initial data uploads and synchronization."],["Batch requests have a limit of 50,000 entries and 32Mb transfer size; exceeding these limits will result in errors."],["There's no guarantee that batched requests will be executed or returned in the order they were defined; use `BatchId` to correlate requests and responses."],["For more details and to learn how the Merchant API can improve your integration, visit the announcement blog post."]]],["The Merchant API beta, a new version of the Content API for Shopping, is introduced. It uses `custombatch`, a method to group multiple API calls into a single HTTP request for efficient data uploading and synchronization. `Custombatch` suits large data transfers but doesn't guarantee execution order. `BatchId` correlates requests and responses. Batches can have top-level or entry-specific errors. There is a recommended limit of 1,000 entries per batch with maximum limits of 50,000 entries, and 32Mb size.\n"]]