HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


Queries the IDs of all existing coupon blocks in Optimizely Campaign.

Type: long[ ]


sessionIdStringID of the current session
couponSourceStringType of coupon block:
  • static: Contains static coupon codes
    These must be created manually. See CouponCodeWebservice see add or addAll.
  • generated: Coupon codes are automatically generated when sending the mailing and are unique.
  • Return values

    The IDs of all existing coupon blocks

    Code structure

    long[] getAllIds(String sessionId, String couponSource)

    What’s Next