WhooHooo, finally figured out which type of array it was looking for. To apply a coupon automatically at checkout put this in the Discounts field as code.
[{coupon: 'idOfCoupon'}]