קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
custombatch היא שיטה נפוצה שמאפשרת לקבץ מספר קריאות ל-API, שנקראות 'רשומות', לבקשת HTTP אחת. כל רשומה מפנה רק לקריאה אחת של שיטת.
כדאי להשתמש בקבוצה בהתאמה אישית אם:
רק התחלתם להשתמש ב-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"]],["עדכון אחרון: 2025-06-19 (שעון 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"]]