Enterprise API v1

Search | Auto Complete | Unit Complete

Search

Method
POST
Path
https://api.beans.ai/enterprise/v1/search/beans
Headers
Authorization=key:secret
Body
{
  address:[String]                  // Required
  unit:[String]                     // Optional
}
Response
{
  unit: {                           // null when Beans has no result
    text:[String]
    marker: {
      latitude:[Double]
      longitude:[Double]
    }
    floor:[Integer]
    directEntry:[Boolean]
    numberOfBuildings:[Integer]
    numberOfApartments:[Integer]
    gateCode:[String]
    accuracy:[Integer]
  }
  gmap: {                           // Populated unless search is gibberish
    text:[String]
    marker: {
      latitude:[Double]
      longitude:[Double]
    }
    floor:[Integer]                 // Not populated
    directEntry:[Boolean]           // Not populated
    numberOfBuildings:[Integer]     // Not populated
    numberOfApartments:[Integer]    // Not populated
    gateCode:[String]               // Not populated
    accuracy:[Integer]              // Not populated
  }
  entrances: [                      // List ordered by proximity
    {
      text:[String]
      marker: {
        latitude:[Double]
        longitude:[Double]
      }
      floor:[Integer]
      directEntry:[Boolean]         // Not populated
      numberOfBuildings:[Integer]   // Not populated
      numberOfApartments:[Integer]  // Not populated
      gateCode:[String]
      accuracy:[Integer]            // Not populated
    }
    ...
  ]
  elevators: [                      // List ordered by proximity
    {
      text:[String]
      marker: {
        latitude:[Double]
        longitude:[Double]
      }
      floor:[Integer]
      directEntry:[Boolean]         // Not populated
      numberOfBuildings:[Integer]   // Not populated
      numberOfApartments:[Integer]  // Not populated
      gateCode:[String]             // Not populated
      accuracy:[Integer]            // Not populated
    }
  ]
  parkings: [                       // List ordered by proximity
    {
      text: [String]
      marker: {
        latitude:[Double]
        longitude:[Double]
      }
      floor:[Integer]               // Not populated
      directEntry:[Boolean]         // Not populated
      numberOfBuildings:[Integer]   // Not populated
      numberOfApartments:[Integer]  // Not populated
      gateCode:[String]             // Not populated
      accuracy:[Integer]            // Not populated
    }
    ...
  ]
  polygon: {
    points: [                       // Empty if building shape not determined
      {
          latitude:[Double]
          longitude:[Double]
      }
      ...
    ]
  }
  uiData: {                         // Helper fields used by the Beans App
                                    // Some of these fields may be useful to
                                    // enterprises to get a similar UI behavior.
    mapCenter: {
      latitude:[Double]
      longitude:[Double]
    }
    content:[String]
    zoom:[Integer]
    link:[String]
    linkText:[String]
    replaceTextFields:[Boolean]
    replacementAddress:[String]     // Standardized address for result
    replacementApt:[String]
    includeGMaps:[Boolean]
  }
}

Autocomplete

Method
POST
Path
https://api.beans.ai/enterprise/v1/search/auto-complete
Headers
Authorization=key:secret
Body
{
  address:[String]                  // Required
  center: {                         // Required
    latitude:[Double]               // Required
    longitude:[Double]              // Required
  }
  searchRadius:[Double]             // Optional
  maximumHistorySearch:[Integer]    // Optional
                                    // default 0 = no search history
  maximumBeansSearch:[Integer]      // Optional
  maximumSearchResult:[Integer]     // Optional
}
Response
{
  beans: [
    {
      address:[String]               // Display address
      society:[String]               // Society name, if available
      placeId:[String]               // Unique identifier
      found:[Boolean]                // True if available from beans
      unitCount:[Integer]            // Number of units at address
                                     // unit-complete available if > 1
      inHistory:[Boolean]            // True if result from history
    },
    ...
  ]
}

Unitcomplete

Method
POST
Path
https://api.beans.ai/enterprise/v1/search/unit-complete
Headers
Authorization=key:secret
Body
{
  address:[String]                  // Required
  unit:[String]                     // Required
}
Response
{
  beans: [
    {
      unit:[String]                  // Display unit
    },
    ...
  ]
}