# com.innovaphone.phonelookup (App API)

This API provides an interface for cross-app phone lookups.

Write documentation

## API model

### Service info

The API doesn't define any service info.

### Provider model

The API doesn't define a provider model.

## API messages

All messages are JSON objects that have a mandatory attribute "mt" that specifies the message type.

### Requests

Lookup
  Starts a search for a given phone number.
  prefixIntl
    International Prefix
  prefixNtl
    National Prefix
  prefixExt
    External Prefix
  area
    Area Code
  country
    Country Code
  lookup
    The number to be searched
  Example: `{ mt: "Lookup", prefixIntl: "000", prefixNtl: "00", prefixExt:"0", area: "7031", country: "49", lookup: "0004970311234567" }`

### Responses

LookupInfo
  Zero or more LookupInfo are returned for each Lookup request
  dn
    Display name
  link
    App-Item-Link (if the originating app can display item details)
  contact
    Directory entry that matches the criteria. An entry contains the following optional members:
    sn, givenname, company, displayname
    telephonenumber (ARRAY), mobile (ARRAY), homephone (ARRAY), extension (ARRAY), facsimiletelephonenumber (ARRAY)
    sip (ARRAY), email (ARRAY)
    title, position, url, department, description, info, roomnumber
    city, street, postalcode, state, country
    privatecity, privatestreet, privatepostalcode, privatestate, privatecountry
  photourl
    URL to image data. Could be HTTP/HTTPS url or inline data (data:image/png;base64…).
  adjust
    Indicates that provided phone numbers might not contain the external line prefix and might need to be adjusted by the phone/softphone app before dialing.
  Example:

          {
              mt: "LookupInfo",
              dn: "Jake Blues",
              link:"someapp?id=4",
              contact: {
                  telephonenumber: ["0004970311234567"],
                  givenname: "Jake",
                  sn: "Blues",
                  company: "Blues Brothers",
                  sip: ["jbl@example.com"],
                  email: ["john.blues@example.com"]
              },
              photourl: "http://1.2.3.4/jbl/avatar.png",
              adjust: true
          }

LookupResult
  One single LookupResult is returned for each Lookup request (after all LookupInfo)
  Example: `{ mt: "LookupResult" }`