Developer Docs
The method allows you to receive detailed information about an existing contact, which is contained in the system, and user fields of the contact.
To get a contact, make a request to this URL:
GET http://one-api.bsg.world/api/contacts/{id} |
Parameter | Required | Type | Description |
id | Yes | integer | ID of the contact to get information on (the contact ID is generated automatically by the BSG system when a contact is added). |
Parameter | Type | Description | ||
id | integer | Contact ID on which the query for information was made. | ||
phone | integer | Contact phone number. | ||
fields | array | Contains the embedded custom fields parameters | ||
id | string | The ID of the data contact field | . | |
value | string | The value specified in the contact field | . | |
created_at | datetime | Contact creation date ― set automatically by the BSG system when a contact is added to the Contact Book. Display format ― Y-m-d H:i:s | ||
groups | array | Contains embedded parameters of the list to which the contact is added | ||
id | string | The ID of the contact list to which the contact is added | . | |
name | string | The name of the list to which the contact is added | . | |
description | string | The name of the list to which the contact is added | . | |
default | bool | Indicates whether the contact list is a default one | . | |
created_at | datetime | Date of creation/editing of the list to which the contact was added. Display Format ― Y-m-d H:i:s | ||
hlr_status | string | Status of verifying the contact’s phone number against the HLR database. Possible values: sent, absent, active, unknown, failed. | ||
hlr_last_check | datetime | Date and time when the contact’s phone number was last verified against the HLR database. Display Format ― Y-m-d H:i:s |
If request is successful, you will receive a response:
{
"data": {
"id": 1,
"phone": 33601148802,
"fields": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"created_at": "2022-04-28 14:21:16",
"groups": [
{
"id": 1,
"name": "string",
"description": "string",
"default": 0,
"created_at": "2022-04-28 14:21:16"
}
],
"hlr_status": "string",
"hlr_last_check": "2022-04-28 14:21:16"
}
}