system
1
Migrated from Redmine #204 | Author: Sam Holtby
Status: New | Priority: High, I’m very impatient | Created: 2018-07-27
When calling the book API endpoint I’m getting this error message with the code -32000.
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'plugin_promo_id' cannot be null
This is how I’m setting it:
"promocode": "HEIGHTS100"
This only happens when using an invalid promocode. The error code -32000 doesn’t seem to be on your error handling list - Errors handling - Errors handling - SimplyBook.me.
Also, shouldn’t the error code -32030(Invalid promotion code) be returned?
system
2
Dmytro Bondarev wrote:
Hi! Please provide your request.
system
3
Sam Holtby wrote:
Would this be ok? I’ve added the param in a separate section below for readability
{
"URL": "http:\/\/user-api.simplybook.me\/admin\/",
"http": {
"method": "POST",
"header": "Content-type: application\/json\r\nX-Company-Login: dropless\r\nX-User-Token: dfae23d60243e386ad82f82fcd132fce3f5c802bf952c5768d5251bef0ca7279\r\n",
"content": "{\"method\":\"book\",\"params\":[1,9,\"15\",\"2018-08-30\",\"12:00:00\",\"2018-08-30\",\"13:00:00\",0,{\"promocode\":\"HEIGHTS100\"},1,null,false],\"id\":1}"
}
}
Params:
{
"eventId": 1,
"unitId": 9,
"client_id": "15",
"start_date": "2018-08-30",
"start_time": "12:00:00",
"endDate": "2018-08-30",
"endTime": "13:00:00",
"additionalFields": {
"promocode": "HEIGHTS100"
},
"count": 1,
"batchId": null,
"recurringDate": false
}
system
4
Dmytro Bondarev wrote:
Thank you! We will fix it.