Migrated from Redmine #1517 | Author: institutalgovita institutalgovita
Status: Feedback | Priority: High, I’m very impatient | Created: 2026-01-28
Here is a clear, technical description you can post on the SimplyBook forum or send to their support ticket system. It isolates the problem to the API parameter structure.
Subject: JSON-RPC book method: Coupon/Promo Code is not applying to the generated Invoice
Description:
Hello,
I am using the JSON-RPC API to create bookings. I am trying to apply a valid Promo Code (from the Coupons & Gift Cards plugin) to a booking so that the generated invoice reflects the discount.
I successfully validate the code first using validatePromoCode (it returns true). However, when I call the book method, the booking is created and the invoice is generated, but the discount is ignored (the amount remains full price).
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [
5, // eventId
2, // unitId
“2026-01-29”, // date
“16:00:00”, // time
{ // clientData
“name”: “John Doe”,
“email”: “john@example.com”,
“phone”: “1234567890”
},
{ // additional fields
“handle_invoice”: true,
“promo_code”: “24yccaqah”, // <— Attempt 1
“promocode”: “24yccaqah”, // <— Attempt 2
“promotion_code”: “24yccaqah” // <— Attempt 3
},
1, // count
null // batchId
],
“id”: 1
}