[#941] Delete Client in VIP account

Migrated from Redmine #941 | Author: MOZ ZOM
Status: New | Priority: High, I’m very impatient | Created: 2022-10-09


Hi,

I am trying to implement a feature to delete client.
There is a “Delete Client” in the API documentations

The document suggests it is possible to do with following method:

DELETE https://user-api-v2.simplybook.me/admin/clients/1000
Content-Type: application/json
X-Company-Login:
X-Token:
*

I am trying to do the same with Cluster API account:
*
DELETE https://user-api.simplybook.vip/admin/clients/852
Content-Type: application/json
X-Company-Login:
X-User-Token:
*
but then it returns {‘error’: {‘code’: -32600, ‘message’: ‘Invalid Request’, ‘data’: None}, ‘id’: None}

Is this API method exclusive to https://user-api-v2.simplybook.me/?
Perhaps I need to explicitly states the company login in url?

Thank you

Dmytro Bondarev wrote:

Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url

MOZ ZOM wrote:

Dmitry Bondarev wrote:

Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url

I am using ClusterAPI to get company token.
On the api side, I am using JSON-RPC client.
I tried https://user-api-v2.simplybook.vip/admin/clients/{id}
But get 401, message=‘Unauthorized’, url=URL

Is there any documentation on v2?

MOZ ZOM wrote:

MOZ ZOM wrote:

Dmitry Bondarev wrote:

Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url

I am using ClusterAPI to get company token.
On the api side, I am using JSON-RPC client.
I tried https://user-api-v2.simplybook.vip/admin/clients/{id}
But get 401, message=‘Unauthorized’, url=URL

Is there any documentation on v2?

On the current documentation, it suggests that authentication requires

  1. company
  2. login
  3. password

Does this mean I can no longer use the company token acquired via Cluster API to authenticate?
Do I need a separate mechanism to acquire a token?

MOZ ZOM wrote:

Dmitry Bondarev wrote:

Hi, please use https://user-api-v2.simplybook.vip/admin/clients/{id} url

I managed to get it working by add ‘X-Token’ to the header.
Realised that ‘X-User-Token’ and ‘X-Token’ are not interchangable

Thank you.