Contents

General information

All GET requests in this section are cacheable. Cache update time is 1 minute.

List of contact types (GET)

url = BaseUrl + 'TypesContacts?objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "4",
            "name": "E-Mail",
            "isPhone": false,
            "isEmail": true,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \},
        \{
            "id": "6",
            "name": "ICQ",
            "isPhone": false,
            "isEmail": false,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \},
        \{
            "id": "5",
            "name": "Skype",
            "isPhone": false,
            "isEmail": false,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \},
        \{
            "id": "1",
            "name": "Home phone number",
            "isPhone": true,
            "isEmail": false,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \},
        \{
            "id": "3",
            "name": "Mobile Phone",
            "isPhone": true,
            "isEmail": false,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \},
        \{
            "id": "2",
            "name": "Work phone number",
            "isPhone": true,
            "isEmail": false,
            "isSkype": false,
            "isSocialNetwork": false,
            "mailing": false
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T13:15:34",
    "status": "Ok",
    "requestId": "c98e26da9b9046d3bbb862e02d27bc25"
\}
here:

List of address types (GET)

url = BaseUrl + 'TypesAddresses?objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "1",
            "name": "Home"
        \},
        \{
            "id": "2",
            "name": "Work"
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T13:26:42",
    "status": "Ok",
    "requestId": "2bbbc9286c9b4652bf568afa352737a7"
\}
here:

List of countries (GET)

url = BaseUrl + 'Countries?objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "5",
            "name": "Moldova"
        \},
        \{
            "id": "2",
            "name": "Russia"
        \},
        \{
            "id": "4",
            "name": "Uzbekistan"
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T13:31:13",
    "status": "Ok",
    "requestId": "95297281e928433db96e4bcbba8cd155"
\}
here:

List of cities (GET)

url = BaseUrl + 'Cities?countryId=<country identifier>&objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "10000000000024",
            "name": "Khabarovsk"
        \},
        \{
            "id": "10000000000021",
            "name": "Kishinev"
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T11:09:30",
    "status": "Ok",
    "requestId": "0e535aad04a544d896c77b96563a71fa"
\}
here:

Adding a city (POST)

Request:
url = BaseUrl + 'Cities?countryId=<country identifier>&objectId=<object identifier>'
Request body:
{
"Name": "Taganrog"
}
here:

Response:
{
"data": {
"id": "10000000000034",
"name": "Taganrog"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-12T13:55:04",
"status": "Ok",
"requestId": "de6bfe5b9da44f1cac643c6847f352cf"
}
here:

Editing a city (PUT)

Request:
url = BaseUrl + 'Cities?Id=<city identifier>&objectId=<object identifier>'
Request body:
{
"Name": "Taganrog 2"
}
here:

Response:
{
"data": {
"id": "10000000000034",
"name": "Taganrog 2"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-12T14:03:06",
"status": "Ok",
"requestId": "8a9b08fe305b47a584b5961e26870aff"
}
here:

Deleting a city (DELETE)

url = BaseUrl + 'Cities?Id=<city identifier>&objectId=<object identifier>'
Response:
{
"data": {
"id": "10000000000034"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-12T14:08:24",
"status": "Ok",
"requestId": "2595d7568f024c748291c43bc5ac2a99"
}
here:

List of metro stations (GET)

url = BaseUrl + 'MetroStations?cityId=<city identifier>&objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "1",
            "name": "Aviamotornaya"
        \},
        \{
            "id": "2",
            "name": "Avtozavodskaya"
        \},
        \{
            "id": "3",
            "name": "Akademicheskaya"
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T16:04:23",
    "status": "Ok",
    "requestId": "7d44b0491a0b431295401b9c34b08ff4"
\}
here:

List of streets (GET)

url = BaseUrl + 'Streets?cityId=<city identifier>&objectId=<object identifier>'
Response:
\{
    "data": \[
        \{
            "id": "10000000016642",
            "name": "Voskanova",
            "postCode": "5654"
        \},
        \{
            "id": "10000000016640",
            "name": "settl. Krasniy",
            "postCode": "44"
        \},
        \{
            "id": "10000000016629",
            "name": "Block 328"
            "postCode": "000"
        \}
    \],
    "ver": "1.3.0.32",
    "timestamp": "2020-02-12T16:11:06",
    "status": "Ok",
    "requestId": "76b482c9c0744464b8db587f5bfb07b0"
\}
here:

Adding new street (POST)

Request:
url = BaseUrl + 'Streets?cityId=<city identifier>&objectId=<object identifier>'
Request body:
{
"Name": "Komsomoltsev",
"PostCode": "ХХХ"
}
Response:
{
"data": {
"id": "10000000016643",
"name": "Komsomoltsev",
"postCode": "ХХХ"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-12T16:16:33",
"status": "Ok",
"requestId": "2ca0a37963924dbfa7e618fa9ecc0948"
}
here:

Editing a street (PUT)

Request:
url = BaseUrl + 'Streets?Id=<street identifier>&objectId=<object identifier>'
Request body:
{
"Name": "Lenina",
"PostCode": "ООО"
}
Response:
{
"data": {
"id": "10000000016643",
"name": "Lenina",
"postCode": "ООО"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-12T16:21:14",
"status": "Ok",
"requestId": "f20cc1fbfda44f5db88db47d27be3676"
}
here:

Deleting a street (DELETE)

url = BaseUrl + 'Streets?Id=<street identifier>&objectId=<object identifier>'
Response:
{
"data": {
"id": "10000000016623"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-13T11:09:22",
"status": "Ok",
"requestId": "a0eb04e8994140dd9d8fe56766932b8f"
}
here:

Receiving customer information (GET)

url = BaseUrl + 'Clients?Id=<customer identifier>&objectId=<object identifier>'
Response:
\{
    "data": \{
        "id": "10000000009188",
        "lastname": "Beznogov",
        "firstname": "Sergey",
        "middlename": "Vitalievich",
        "birthday": "1971-10-18T00:00:00",
        "note": "loyal customer"
        "contacts": \[
            \{
                "id": "10000000008064",
                "typeId": "1",
                "typeName": "Home phone number",
                "value": "333"
            \},
            \{
                "id": "10000000008066",
                "typeId": "2",
                "typeName": "Work phone number",
                "value": "+79998887766"
            \}
        \],
        "addresses": \[
            \{
                "id": "10000000003276",
                "typeId": "1",
                "typeName": "Home",
                "countryId": "2",
                "country": "Russia",
                "zip": "111111",
                "region": "",
                "cityId": "10000000000002",
                "city": "Moscow",
                "streetId": "10000000000031",
                "street": "Tekstilschikov 10th",
                "house": "10",
                "building": "",
                "entry": "",
                "floor": "",
                "apartments": "7",
                "entryCode": "",
                "dopInfo": "",
                "lat": "",
                "lng": "",
                "metroStationId": "3",
                "metroStation": "Akademicheskaya",
                "readOnly": false
            \}
        \],
        "accounts": \[
            \{
                "accountNumber": "03.00011.00010593.0001",
                "status": "Active",
                "accountTypeID": 11,
                "accountTypeName": "test debit",
                "accountDebitEnabled": false,
                "accountCreditEnabled": false,
                "dateCreate": "2020-02-13T00:00:00",
                "balance": 0.00,
                "accountCode": null
            \}
        \],
        "cards": \[
            \{
                "cardCode": "112232213",
                "isVirtualCard": false,
                "isConfirmManager": false,
                "status": "Active",
                "dateOffered": "2019-12-25T00:00:00",
                "dateExpired": "2021-12-25T00:00:00",
                "groupID": 3,
                "groupName": "main"
            \}
        \]
    \},
    "ver": "1.3.0.32",
    "timestamp": "2020-02-13T12:04:25",
    "status": "Ok",
    "requestId": "38aaaa7be8da4e9695bce0e7aaed8d2e"
\}
Customer data include several groups of fields:
data — customer data:

contacts — contact data:

addresses — delivery addresses:

accounts — customer accounts data:

cards — customer cards data:

Adding new customer (POST)

Request:
url = BaseUrl + 'Clients?objectId=<object identifier>'
Request body:
\{
 "lastname": "Vasiliev",
 "firstname": "Ivan",
 "middlename": "Petrovich",
 "birthday": "1999-01-01",
 "note": "new customer",
 "contacts": 
 \[\{
 "typeId": "1",
 "value": "987765"
 \},
 \{
 "typeId": "4",
 "value": "v4@com.com"
 \}\],
 "addresses":
 \[\{
 "typeId": "1",
        "countryId": "4",
        "zip": "555",
        "region": "South-West",
        "cityId": "10000000000016",
        "streetId": "10000000016629",
        "house": "10",
        "building": "10",
        "entry": "5",
        "floor": "4",
        "apartments": "3",
        "entryCode": "2",
        "dopInfo": "no elevator"
 \}\]
\}
The response format matches the result returned by the "Clients" GET request.

Editing customer data (PUT)

The request changes only the main customer data. In order to change contacts or addresses, use "/Clients/Contacts", or "/Clients/Addresses" requests, respectively.
Request:
url = BaseUrl + 'Clients?clientId=<customer identifier>&objectId=<object identifier>'
Request body:
{
"lastname": "Ivanov",
"firstname": "Vasiliy",
"middlename": "Petrovich"
}
The response format matches the result returned by the "Clients" GET request.

Deleting customer data (DELETE)

This request is not supported by all CRM versions.
Request:
url = BaseUrl + 'Clients?clientId=<customer identifier>&objectId=<object identifier>'
Response: <Code> {
"data": {
"id": "10000000009263"
},
"ver": "1.3.0.32",
"timestamp": "2020-02-13T13:02:54",
"status": "Ok",
"requestId": "81c2ec2b687843fc943524a9f896ef90"
} </Code>
here:

Adding new customer contact (POST)

Request:
url = BaseUrl + '/Clients/Contacts?clientId=<customer identifier>&objectId=<object identifier>'
Request body:
{
"typeId": "1",
"value": "sample@com.com"
}
The response format matches the result returned by the "Clients" GET request.

Changing customer contact (PUT)

Request:
url = BaseUrl + '/Clients/Contacts?clientId=<customer identifier>&contactId=<contact identifier>&objectId=<object identifier>'
Request body:
{
"value": "test@ru.ru"
}
The response format matches the result returned by the "Clients" GET request.

Customer contact deletion (DELETE)

Request:
url = BaseUrl + '/Clients/Contacts?clientId=<customer identifier>&contactId=<contact identifier>&objectId=<object identifier>'
The response format matches the result returned by the "Clients" GET request.

Adding new customer address (POST)

Request:
url = BaseUrl + '/Clients/Addresses?clientId=<customer identifier>&objectId=<object identifier>'
Request body:
{
"typeId": "1",
"countryId": "4",
"zip": "777",
"region": "Primorye",
"cityId": "10000000000016",
"streetId": "10000000016629",
"house": "11",
"building": "12",
"entry": "5",
"floor": "3",
"apartments": "3",
"entryCode": "2",
"dopInfo": "debt: 1000 RUR"
}
The response format matches the result returned by the "Clients" GET request.

Changing customer address (PUT)

Request:
url = BaseUrl + '/Clients/Addresses?clientId=<customer identifier>&contactId=<address identifier>&objectId=<object identifier>'
Request body:
{
"region": "Riverside",
"house": "20"
}
The response format matches the result returned by the "Clients" GET request.

Customer address deletion (DELETE)

Request:
url = BaseUrl + '/Clients/Addresses?clientId=<customer identifier>&contactId=<address identifier>&objectId=<object identifier>'
The response format matches the result returned by the "Clients" GET request.