get

Returns the vCards that match the specified criteria.

  1. Restrictions
  2. Request
  3. Response
  4. Examples

Restrictions

The method returns a maximum of 10,000 objects.

Request

Request structure in JSON format:

{
  "method": "get",
  "params": { /* params */
    "SelectionCriteria": {   /* IdsCriteria */
      "Ids": [(long), ... ] /* required */
    },
    "FieldNames": [( "Id" | "Country" | "City" | "Street" | "House" | "Building" | "Apartment" | "CompanyName" | "ExtraMessage" | "ContactPerson" | "ContactEmail" | "MetroStationId" | "CampaignId" | "Ogrn" | "WorkTime" | "InstantMessenger" | "Phone" | "PointOnMap" )], /* required */
    "Page": {   /* LimitOffset */
      "Limit": (long),
      "Offset": (long)
    }
  }
}
ParameterTypeDescriptionRequired
Params structure (for JSON) / GetRequest (for SOAP)
SelectionCriteriaIdsCriteria

vCard selection criteria. If omitted, all the advertiser's vCards are returned.

No
FieldNamesarray of VCardFieldEnum

The names of parameters to get.

Yes
PageLimitOffset

Structure that defines the page for paginated selection of data.

No
IdsCriteria structure
Idsarray of long

IDs of vCards to get. Maximum of 10,000 items in the array.

Yes

Response

Note. The response contains only those parameters that were indicated in the FieldName input parameter.

Response structure in JSON format:

{
  "result": {
    "VCards": [{  /* VCardGetItem */
      "Id": (long),
      "CampaignId": (long),
      "Country": (string),
      "City": (string),
      "WorkTime": (string),
      "Phone": {  /* Phone */
        "CountryCode": (string), /* required */
        "CityCode": (string), /* required */
        "PhoneNumber": (string), /* required */
        "Extension": (string)
      },
      "Street": (string), /* nillable */
      "House": (string), /* nillable */
      "Building": (string), /* nillable */
      "Apartment": (string), /* nillable */
      "InstantMessenger": {  /* InstantMessenger */
        "MessengerClient": (string), /* required */
        "MessengerLogin": (string) /* required */
      }, /* nillable */
      "CompanyName": (string), /* nillable */
      "ExtraMessage": (string), /* nillable */
      "ContactEmail": (string), /* nillable */
      "Ogrn": (string), /* nillable */
      "MetroStationId": (long), /* nillable */
      "PointOnMap": {  /*  MapPoint */
        "X": (decimal), /* required */
        "Y": (decimal), /* required */
        "X1": (decimal), /* required */
        "Y1": (decimal), /* required */
        "X2": (decimal), /* required */
        "Y2": (decimal) /* required */
      }, /* nillable */
      "ContactPerson": (string) /* nillable */
    }, ... ],
    "LimitedBy": (long)
  }
}
ParameterTypeDescription
Result structure (for JSON) / GetResponse (for SOAP)
VCardsarray of VCardGetItemvCards.
LimitedBylongSequential number of the last object returned. It is included if there was a limit on the number of objects in the response. See the section Paginated data selection.
VCardGetItem structure
Idlong

vCard ID.

CampaignIdlong

The campaign ID.

Countrystring

Country. A maximum of 50 characters.

Citystring

The city. A maximum of 55 characters.

WorkTimestring

The operating hours or client service hours of the business. Set as a string that specifies the range of days of the week, work hours, and minutes.

Days of the week are defined by the numbers from 0 to 6, where 0 is Monday and 6 is Sunday.

Minutes are set as a multiple of 15: 0, 15, 30 or 45.

String format: "day_from;day_to;hour_from;minute_from;hour_to;minute_to".

For example, the string "0;4;10;0;18;0" sets the following schedule:

0;4 — Monday to Friday

10;0 — from 10:00 am

18;0 — to 6:00 pm

The schedule may consist of several strings in this format, for example: "0;4;10;0;18;0;5;6;11;0;16;0". Here, in addition to the previous example, the schedule also includes:

5;6 — Saturday and Sunday

11;0 — from 11:00 am

16;0 — to 4:00 pm

A 24-hour schedule is set using the string "0;6;00;00;00;00".

Maximum of 255 characters.

PhonePhone

Structure that sets the phone number.

Streetstring, nillable

Street. A maximum of 55 characters.

Housestring, nillable

House number. A maximum of 30 characters.

Buildingstring, nillable

The building or unit number. A maximum of 10 characters.

Apartmentstring, nillable

The apartment or office number. Maximum of 100 characters.

InstantMessengerInstantMessenger, nillable

A structure that sets the contact for instant messaging.

CompanyNamestring, nillable

Name of the organization. Maximum of 255 characters.

ExtraMessagestring, nillable

Additional information on the advertised product or service. Maximum of 200 characters.

ContactEmailstring, nillable

Email address. Maximum of 255 characters.

Ogrnstring, nillable

The OGRN code for a business registered in Russia. Maximum of 255 characters.

MetroStationIdlong, nillable

ID of the metro station.

To get the list of stations, use the Dictionaries.get method.

PointOnMapMapPoint, nillable

Structure that describes the location of the placemark on the map. If not set, the map is marked at the address that was specified for the client.

ContactPersonstring, nillable

Contact person. A maximum of 155 characters.

Phone structure
CountryCodestring

The country code for the phone number. Must contain from 1 to 5 characters. Acceptable values:

  • Beginning with the "+" symbol and consisting of digits.
  • The value “8” combined with the city code “800”.

For example, "+7" for Russia.

CityCodestring

The area code or city code for the phone number. From 1 to 5 digits. Must not be 0.

PhoneNumberstring

The contact phone number. From 5 to 9 digits. When combined with the country code and city code, it is from 8 to 17 digits.

Extensionstring

The phone extension, if an office PBX system is used. From 1 to 6 digits.

InstantMessenger structure
MessengerClientstring

The type of instant messaging system — icq, jabber, skype or mail_agent.

MessengerLoginstring

The username (ID) in the instant messaging system. Maximum of 255 characters.

MapPoint structure
Xdecimal

Longitude of the point. From -180 to 180.

Ydecimal

Latitude of the point. From -90 to 90.

X1decimal

Longitude of the lower-left corner of the region on the map. From -180 to 180.

Y1decimal

Latitude of the lower-left corner of the region on the map. From -90 to 90.

X2decimal

Longitude of the upper-right corner of the region on the map. From -180 to 180.

Y2decimal

Latitude of the upper-right corner of the region on the map. From -90 to 90.

Examples

Request example
{
  "method": "get",
  "params": {
    "SelectionCriteria" : {
      "Ids" : [ 13070327]
    },
    "FieldNames" : [
      "Country",
      "City",
      "Phone"
    ]
  }
}
Response example
{
  "result" : {
    "VCards" : [
      {
        "Phone" : {
          "CityCode" : "812",
          "Extension" : "89",
          "PhoneNumber" : "123-45-67",
          "CountryCode" : "+7"
        },
        "Country" : "Russia",
        "City" : "Moscow"
      }
    ]
  }
}