[#367] Additional field not saved to SimplyBookMe

Migrated from Redmine #367 | Author: Lars Ekman
Status: Closed | Priority: High, I’m very impatient | Created: 2019-03-28


I have a SimplyBookMe account with an additional field configured. I have fetched the field hash name using getAdditionalFields.

I then send a request with the following body, providing the additionalFields as an array of objects as the last parameter.

  jsonrpc: '2.0',
  method: 'book',
  params: [2, 11, 308, "2019-04-02", "09:00", "2019-04-02", "11:00", 0, [{ "2ff3898f52ce0577d4ad0755dd2c372b": "My comments here" }]],
  id: uniqueId

This results in the booking being saved, but the comments are not visible when viewing the booking the SimplyBookMe admin calendar page.

Can you provide a working example of exactly how the HTTP request should look like in order to save the value of the additional field?

Dmytro Bondarev wrote:

Please rovide RAW HTTP request and your company login.

Dmytro Bondarev wrote:

provide*

(Short original content)

Lars Ekman wrote:

Dmitry Bondarev wrote:

Please provide RAW HTTP request and your company login.

Here is the raw request:

POST /admin/ HTTP/1.1
Accept: application/json, text/plain, /
Content-Type: application/json;charset=utf-8
X-Company-Login: nobiatest
X-User-Token:
User-Agent: axios/0.18.0
Content-Length: 164
Host: user-api.simplybook.me
Connection: close

{“jsonrpc”:“2.0”,“method”:“book”,“params”:[2,11,“315”,“2019-04-02”,“09:00”,“2019-04-02”,“11:00”,0,[{“2ff3898f52ce0577d4ad0755dd2c372b”:“My comments are here”}]],“id”:4}

Lars Ekman wrote:

(The company login is in the request header)

Lars Ekman wrote:

I have solved this now. If I don’t enclose the additional fields in an array it works, i.e. {“2ff3898f52ce0577d4ad0755dd2c372b”:“My comments are here”} instead of [{“2ff3898f52ce0577d4ad0755dd2c372b”:“My comments are here”}]

Dmytro Bondarev wrote:

Good to hear that.

(Short original content)