[#136] problem with request - get an error (using node )

Migrated from Redmine #136 | Author: Johan Glimskog
Status: Closed | Priority: Normal | Created: 2018-03-30


Hi
have an error when i calling the api from node.

Can you assist and help me if I have any errors in my request?
cheers
Johan

Please see below.

{“error”:{“code”:-32000,“message”:“SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘em_common.company_config_value’ doesn’t exist”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}{“error”:{“code”:-32601,“message”:“Method not found”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}
{ adapter: [Function: httpAdapter],
transformRequest: { ‘0’: [Function: transformRequest] },
transformResponse: { ‘0’: [Function: transformResponse] },
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: ‘application/json, text/plain, /’,
‘Content-Type’: ‘application/json;charset=utf-8’,
‘User-Agent’: ‘axios/0.18.0’,
‘Content-Length’: 308 },
method: ‘post’,
url: ‘https://user-api.simplybook.me/admin’,
data: ‘{“jsonrpc”:“2.0”,“method”:“getBookings”,“params”:[{“booking_type”:“is_confirmed”}],“id”:1,“headers”:{“Content-Type”:“application/json; charset=UTF-8”,“Accept”:“application/json”,“Content-Length”:90,“x-company-login”:“miclab”,“x-user-token”:“6161d8a9a26a23ff92f5ef1bb00c346592bfa35d626c5c155617ca3f6288097d”}}’ }

Redmine Admin wrote:

Please use headers exactly like described here API documentation | SimplyBook.me Online Scheduling
It mast be in camelcase: X-Company-Login, X-User-Token