בדף הזה מוסבר איך לפתור בעיות שקשורות לממשק ה-API המשני של Promotions.
צור קידום מכירות
כשמשתמשים בבקשה accounts.promotions.insert
כדי להוסיף קידום מכירות, חשוב לכלול את כל השדות הנדרשים בגוף הבקשה. חובה למלא את השדות הבאים:
promotion.promotionId
promotion.contentLanguage
promotion.redemptionChannel
promotion.targetCountry
promotion.attributes.longTitle
promotion.attributes.promotionEffectiveTimePeriod.startTime
promotion.attributes.promotionEffectiveTimePeriod.endTime
promotion.attributes.promotionDestinations
promotion.attributes.couponValueType
promotion.attributes.offerType
promotion.attributes.productApplicability
promotion.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
של מקור הנתונים של קידומי המכירות שבו אתם משתמשים.