Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

addAll

Adds multiple coupon codes to a coupon block in Optimizely Campaign.

With each call of this method, you can add up to 1000 codes. This method is only valid for static coupon blocks. The contained coupon codes are not deleted.

Type: boolean[ ]

Parameters

NameTypeValue
sessionIdStringID of the current session
blockIdlongID of the coupon block
codesString[ ]The coupon codes you want to add

Return values

  • true: Coupon code was successfully added
  • false: Coupon code could not be added

Code structure

boolean[] addAll(String sessionId, long blockId, String[] codes)