בדף הזה מוסבר איך לפתור בעיות שקשורות ל-Promotions sub-API.
צור קידום מכירות
כשמשתמשים בבקשה accounts.promotions.insert כדי להוסיף מבצע, חשוב לוודא שכללתם את כל שדות החובה בגוף הבקשה. חובה למלא את השדות הבאים:
promotion.promotionIdpromotion.contentLanguagepromotion.redemptionChannelpromotion.targetCountrypromotion.attributes.longTitlepromotion.attributes.promotionEffectiveTimePeriod.startTimepromotion.attributes.promotionEffectiveTimePeriod.endTimepromotion.attributes.promotionDestinationspromotion.attributes.couponValueTypepromotion.attributes.offerTypepromotion.attributes.productApplicabilitypromotion.attributes.promotionUrl
תקופת התוקף של המבצע לא תקינה
אם תציינו תאריכי תוקף לא תקינים של מבצע בבקשת accounts.promotions.insert, תוצג הודעת השגיאה הבאה:
Invalid value at 'promotion.attributes.promotion_effective_time_period.start_time'
כדי לפתור את הבעיה, צריך לוודא שהערך שצוין בשדה promotionDisplayTimePeriod.startTime זהה לערך שצוין בשדה promotionEffectiveTimePeriod.startTime או מוקדם ממנו. חשוב גם לוודא שהערך שציינתם בשדה promotionDisplayTimePeriod.endTime זהה לערך שציינתם בשדה promotionEffectiveTimePeriod.endTime או מוקדם ממנו.
הערכים בשדות startTime ו-endTime צריכים להיות בפורמט UTC של RFC3339, כלומר yyyy-mm-ddThh:mm:ssZ. לדוגמה, 2024-08-15T18:20:20Z.
לא צוינה כמות רכישה מינימלית
אם הערך של attributes.couponValueType הוא BUY_M_GET_N_PERCENT_OFF או BUY_M_GET_N_MONEY_OFF, צריך לציין ערך בשדה attributes.minimumPurchaseQuantity בבקשת accounts.promotions.insert.
אם לא תציינו ערך בשדה attributes.minimumPurchaseQuantity בבקשת accounts.promotions.insert, תוצג הודעת השגיאה הבאה:
[minimumPurchaseQuantity] Missing benefit or restriction attributes for its type
כדי לפתור את השגיאה הזו, צריך לוודא שסיפקתם ערך לשדה minimumPurchaseQuantity בבקשה.
לא צוין סכום הנחה
אם הערך בשדה attributes.couponValueType הוא MONEY_OFF, צריך לספק ערך לשדה attributes.moneyOffAmount בבקשת accounts.promotions.insert.
אם לא תציינו ערך בשדה attributes.moneyOffAmount בבקשת accounts.promotions.insert, תוצג הודעת השגיאה הבאה:
[moneyOffAmount] Missing benefit or restriction attributes for its type
כדי לפתור את השגיאה הזו, צריך לוודא שסיפקתם ערך לשדה attributes.moneyOffAmount בבקשה. הסכום צריך להיות במיקרו.
לא צוין תיאור של המתנה
אם הערך בשדה attributes.couponValueType הוא FREE_GIFT, צריך לספק ערך לשדה attributes.freeGiftDescription בבקשת accounts.promotions.insert.
אם לא תציינו ערך בשדה attributes.freeGiftDescription בבקשת accounts.promotions.insert, תוצג לכם הודעת השגיאה הבאה:
[freeGiftDescription] Missing benefit or restriction attributes for its type
כדי לפתור את השגיאה הזו, צריך לוודא שסיפקתם ערך לשדה attributes.freeGiftDescription בבקשה.
אי אפשר להציע משלוח חינם בקידום של מוצרים בחנויות מקומיות
אם הערך של השדה redemptionChannel הוא IN_STORE והערך של השדה attributes.couponValueType הוא FREE_SHIPPING_STANDARD, FREE_SHIPPING_OVERNIGHT או FREE_SHIPPING_TWO_DAY, תוצג הודעת השגיאה הבאה:
[shippingServiceNames] Free shipping types are not supported for local promotions
כדי לפתור את השגיאה, צריך לוודא שהערך בשדה redemptionChannel הוא ONLINE.
לא צוין ערוץ למימוש
אם לא מציינים את הערך של השדה redemptionChannel בבקשת accounts.promotions.insert, מוצגת הודעת השגיאה הבאה:
[redemptionChannel] Required parameter: redemptionChannel
כדי לפתור את השגיאה הזו, צריך לוודא שסיפקתם ערך לשדה redemptionChannel בבקשה.
השדה contentLanguage של המבצע ומקור הנתונים לא זהים
אם הערך בשדה contentLanguage לא זהה לערך בשדה contentLanguage של מקור נתוני המבצעים שבו אתם משתמשים בבקשת accounts.promotions.insert, תוצג הודעת השגיאה הבאה:
[promotion] Could not find the proper data target for the provided feedLabel and contentLanguage
כדי לפתור את השגיאה הזו, צריך לוודא שהערך בשדה contentLanguage זהה לערך בשדה contentLanguage במקור נתוני המבצעים שבו אתם משתמשים.
השגיאה הזו תופיע גם אם הערך של targetCountry לא זהה לערך של השדה targetCountry במקור נתוני המבצעים שבו אתם משתמשים.