Blackbell Customers API

Easily automate your workflows by integrating Blackbell CRM to third party softwares.

David Brahka avatar
Written by David Brahka
Updated over a week ago

Blackbell customer API:

  • GET /api/i/visitors/:id - returns data of 1 customer

  • GET /api/i/visitors - returns data of all customers

  • GET /api/i/crm_group_definitions - returns CRM fields groups

  • GET /api/i/crm_group_definitions/:id - returns 1 CRM field group

All API calls require API-KEY request header. To get your API key, navigate to your Settings > Integrations

Get via API: data of 1 customer by ID

You can get data about one of your customer, by ID:

curl 'https://www.blackbellapp.com/api/i/visitors/:id' -H 'api-key: <YOURAPIKEY>'


Example:

curl 'https://www.bbserver2.com/api/i/visitors/13595' -H 'api-key: 1f125461b742cb1d4fea7d4adb1b9ef1'

{
"id": 13595,
"email": "userwithcrmfielddemo@thehotelcloud.com",
"name": "John Doe",
"notification_phone": null,
"notification_email_status": false,
"push_notification_status": false,
"archived": false,
......
......
} %

We will return custom CRM values.

Example

curl 'https://www.bbserver2.com/api/i/visitors/13595' -H 'api-key: 1f125461b742cb1d4fea7d4adb1b9ef1'

{
"id": 13595,
"email": "userwithcrmfielddemo@thehotelcloud.com",
"name": "John Doe",
"notification_phone": null,
"notification_email_status": false,
"push_notification_status": false,
"archived": false,
"stays": [],
"crm_groups": [{
"id": 60,
"crm_group_definition": {
"id": 51,
"position": 1,
"private_for_visitor": false,
"translation_texts": {
"title": "About your level"
}
},
"crm_fields": [{
"id": 296,
"value": "all good! :)",
"amount": 1,
"checked": true,
"crm_field_definition": {
"id": 190,
"position": 1,
"input_type": "text",
"required": false,
"translation_texts": {
"title": "Injuries"
}
},
"crm_field_options": [],
"crm_field_attachments": []
}, {
"id": 297,
"value": null,
"amount": 1,
"checked": true,
"crm_field_definition": {
"id": 191,
"position": 2,
"input_type": "dropdown",
"required": false,
"translation_texts": {
"title": "Tennis Level"
}
},
"crm_field_options": [{
"id": 86,
"value": null,
"amount": 1,
"crm_field_option_definition": {
"id": 146,
"position": 2,
"translation_texts": {
"title": "Advanced"
}
}
}],
"crm_field_attachments": []
}]
}, {
"id": 63,
"crm_group_definition": {
"id": 57,
"position": 2,
"private_for_visitor": false,
"translation_texts": {
"title": "Identity"
}
},
"crm_fields": [{
"id": 302,
"value": null,
"amount": 1,
"checked": true,
"crm_field_definition": {
"id": 203,
"position": 1,
"input_type": "yes_no",
"required": false,
"translation_texts": {
"title": "Vaccine done"
}
},
"crm_field_options": [],
"crm_field_attachments": []
}, {
"id": 303,
"value": "Please contact my wife Jane Doe at +1 839 123 8494 thanks!",
"amount": 1,
"checked": true,
"crm_field_definition": {
"id": 205,
"position": 3,
"input_type": "textarea",
"required": false,
"translation_texts": {
"title": "Who to contact in case accident\u003cbr\u003e"
}
},
"crm_field_options": [],
"crm_field_attachments": []
}]
}],
"cloudinary_attachment_links": [{
"id": 40828,
"crops": {
"small": "c_fill,w_150,h_150/c_scale,h_150,r_max,w_150"
},
"key": "logo",
"position": 1,
"extra": {},
"cloudinary_attachment": {
"id": 118195,
"default_url": "https://res.cloudinary.com/bbserver1/image/upload/v1668163349/permanent/avatar-4dcfdefa60bbdac12f53d748706f6988_zywhaj.jpg",
"full_public_id": "v1668163349/permanent/avatar-4dcfdefa60bbdac12f53d748706f6988_zywhaj",
"attachment_type": "image",
"filename": "avatar-4dcfdefa60bbdac12f53d748706f6988",
"attachment_source": null,
"resource_type": "image",
"pages": null,
"width": 1024,
"height": 1024
}
}]
} %

Get via API: custom CRM groups

You can get the CRM fields groups via API, each group has:

  • name

  • type

  • options

curl 'https://www.blackbellapp.com/api/i/crm_group_definitions' -H 'api-key: <YOURAPIKEY>'

Example:

curl 'https://www.bbserver2.com/api/i/crm_group_definitions' -H 'api-key: 1f125461b742cb1d4fea7d4adb1b9ef1'

[{
"id": 57,
"position": 2,
"private_for_visitor": false,
"translation_texts": {
"title": "Identity"
},
"crm_field_definitions": [{
"id": 203,
"position": 1,
"input_type": "yes_no",
"required": false,
"translation_texts": {
"title": "Vaccine done"
},
"crm_field_option_definitions": []
}, {
"id": 204,
"position": 2,
"input_type": "image",
"required": false,
"translation_texts": {
"title": "ID Card"
},
"crm_field_option_definitions": []
}, {
"id": 205,
"position": 3,
"input_type": "textarea",
"required": false,
"translation_texts": {
"title": "Who to contact in case accident\u003cbr\u003e"
},
"crm_field_option_definitions": []
}]
}, {
"id": 51,
"position": 1,
"private_for_visitor": false,
"translation_texts": {
"title": "About your level"
},
"crm_field_definitions": [{
"id": 190,
"position": 1,
"input_type": "text",
"required": false,
"translation_texts": {
"title": "Injuries"
},
"crm_field_option_definitions": []
}, {
"id": 191,
"position": 2,
"input_type": "dropdown",
"required": false,
"translation_texts": {
"title": "Tennis Level"
},
"crm_field_option_definitions": [{
"id": 145,
"position": 1,
"translation_texts": {
"title": "Beginner"
}
}, {
"id": 146,
"position": 2,
"translation_texts": {
"title": "Advanced"
}
}, {
"id": 147,
"position": 3,
"translation_texts": {
"title": "Expert"
}
}]
}]
}] %

Get via API: 1 custom CRM group

You can get the details ((name, type, options) of one CRM field group via API :

curl 'https://www.blackbellapp.com/api/i/crm_group_definitions/:id' -H 'api-key: <YOURAPIKEY>'

Example:

curl 'https://www.bbserver2.com/api/i/crm_group_definitions/57' -H 'api-key: 1f125461b742cb1d4fea7d4adb1b9ef1'

{
"id": 57,
"position": 2,
"private_for_visitor": false,
"translation_texts": {
"title": "Identity"
},
"crm_field_definitions": [{
"id": 203,
"position": 1,
"input_type": "yes_no",
"required": false,
"translation_texts": {
"title": "Vaccine done"
},
"crm_field_option_definitions": []
}, {
"id": 204,
"position": 2,
"input_type": "image",
"required": false,
"translation_texts": {
"title": "ID Card"
},
"crm_field_option_definitions": []
}, {
"id": 205,
"position": 3,
"input_type": "textarea",
"required": false,
"translation_texts": {
"title": "Who to contact in case accident\u003cbr\u003e"
},
"crm_field_option_definitions": []
}]
} %

Get via API all customers

You can get data about all your customers.

curl 'https://www.blackbellapp.com/api/i/visitors' -H 'api-key: <YOURAPIKEY>'

Example

curl 'https://www.bbserver2.com/api/i/visitors' -H 'api-key: 1f125461b742cb1d4fea7d4adb1b9ef1'

  [
{
"email":"david+push1@thehotelcloud.com",
"name":"David Push 1",
"notification_phone":"+1565555551231231235",
"notification_email_status":false,
"push_notification_status":false,
"archived":true,
"stays":[
{
"status":"reservation",
"reservation_number":"123123",
"room":"101",
"last_name":"123123",
"check_in_at":"2020-03-13T00:00:00Z",
"check_out_at":"2020-03-13T00:00:00Z"
}
]
},
{
"email":"alexey@thehotelcloud.com",
"name":"Alexey Ivanov",
"notification_phone":null,
"notification_email_status":false,
"push_notification_status":false,
"archived":false,
"stays":[
{
"status":"reservation",
"reservation_number":null,
"room":"100",
"last_name":"sadasdas",
"check_in_at":"2018-11-28T00:00:00Z",
"check_out_at":"2018-11-28T00:00:00Z"
},
{
"status":"reservation",
"reservation_number":null,
"room":null,
"last_name":"Ivanov",
"check_in_at":"2020-01-10T14:00:00Z",
"check_out_at":"2020-01-10T14:00:00Z"
}
]
},
{
"email":"david+testimitlabels@thehotelcloud.com",
"name":"Jessica Demo User",
"notification_phone":null,
"notification_email_status":false,
"push_notification_status":false,
"archived":false,
"stays":[
{
"status":"reservation",
"reservation_number":null,
"room":null,
"last_name":"Demo User",
"check_in_at":"2020-03-16T14:00:00Z",
"check_out_at":"2020-03-16T14:00:00Z"
}
]
},
{
"email":"23894ui23jk4m@thehotelcloud.com",
"name":"23894ui23jk4m 23894ui23jk4m",
"notification_phone":null,
"notification_email_status":false,
"push_notification_status":false,
"archived":false,
"stays":[
{
"status":"reservation",
"reservation_number":"2387t23yuh4j23",
"room":"Apartment B1909",
"last_name":"nameinstayXXX23",
"check_in_at":"2020-04-05T22:00:00Z",
"check_out_at":"2020-04-05T22:00:00Z"
}
]
},
{
"email":"sergej@gmail.com",
"name":"Sergej NewAcc",
"notification_phone":null,
"notification_email_status":false,
"push_notification_status":false,
"archived":false,
"stays":[
]
},
{
"email":"davidtestwel1@thehotelcloud.com",
"name":"davidtestwel1 davidtestwel1",
"notification_phone":null,
"notification_email_status":false,
"push_notification_status":false,
"archived":false,
"stays":[
]
}
]";"

Did this answer your question?