Enterprise API v2

Search

Search

Method
GET
Path
https://api.beans.ai/enterprise/v2/search/beans
Or Equivalent Path
https://api2.beans.ai/enterprise/v2/search/beans
Headers
Authorization=key:secret
Tracking-Id=<client request tracking identifer>
Query Parameters
origin                   // Required, to be given as lat,lng pair
address                  // Required
unit                     // Optional
mode                     // One of Query Modes
Query Modes
DRIVER_DELIVERS     // Finds drivers a parking spot
COSTUMER_OUTSIDE    // Finds drivers a spot to pullover
Response A list of routes, the first route as the primary route, and others if any alternatives exist.
Important:
  • when there were no matches, the field routes could be omitted or an empty list
  • there may be extra fields in any struct not documented here, please ignore them while parsing
{
  routes: [  // this could be omitted or an empty list when there were no match
    {
      fragments: [
        {
          origin: {
            location: {
              latitude:[Double]
              longitude:[Double]
            }
            pointType:[Enum from RoutePointType]
            data:[JSON object]  // see example in Entrance Data below
          }
          destination: {
            location: {
              latitude:[Double]
              longitude:[Double]
            }
            pointType:[Enum from RoutePointType]
            data:[JSON object]  // see example in Entrance Data below
          }
          duration:[Integer]
          type:[Enum from RouteFragmentType]
          path: {
            point: [
              {
                latitude:[Double]
                longitude:[Double]
              },
              ...
            ]
          }
        },
        ...
      ]
      pointsOfInterest: {
        location: {
          latitude:[Double]
          longitude:[Double]
        }
        pointType:[Enum from RoutePointType]
        data:[JSON object]  // see example in Entrance Data below
      }
      duration:[Integer]
      origin: {
        latitude:[Double]
        longitude:[Double]
      }
      destination: {
        address:[String]
        unit:[String]
        location: {
          latitude:[Double]
          longitude:[Double]
        }
      }
    },
    ...
  ]
  queryId:[String]        // generated by beans
  trackingId:[String]     // client tracking id from request
}
RouteFragmentType
UNKNOWN
WALKING
DRIVING
RoutePointType
BACK_ENTRANCE
COMMUNITY_ENTRANCE
DELIVERY_ENTRANCE
ELEVATOR
ELEVATOR_AND_ENTRANCE
EMPLOYEE_ENTRANCE
ENTRANCE
ENTRANCE_INSIDE
LOBBY
MAIN_ENTRANCE
PARKING
PARKING_ENTRANCE
ROUTE
SERVICE_ELEVATOR
SERVICE_ENTRANCE
SIDE_ENTRANCE
STAIR
STAIR_AND_ENTRANCE
STOP_POINT
UNIT
UNKNOWN_ROUTE_POINT_TYPE
WALKING_ENTRANCE
WAY_POINT
Data - when point type is ENTRANCE
{
  entranceData: {
    streetName:[String]
    entranceInstructions: [
      {
        type:Enum from {
          BUZZER
          SECURITY_CODE
          WALK_IN
          KNOCK_ON_DOOR
          CALL_CUSTOMER_LET_IN
          OPEN_PARKING
        }
        note:[String]
      },
      ...
    }
  ]
}
Data - when point type is PARKING
{
  stopPointData: {
    type:Enum from {
      NO_PARKING
      NO_STOP
      PARKING_AVAILABLE
      PARKING_CAR
      PARKING_FREE
      PARKING_GARAGE
      PARKING_METERED
      PARKING_METERED_CAR
      PARKING_METERED_MOTORCYCLE
      PARKING_MOTORCYCLE
      PARKING_PRIVATE
      PARKING_PUBLIC
      PARKING_TRUCK
      RESERVED_PARKING
      STOP_CAR
      STOP_TRUCK
      UNKNOWN_STOP_POINT
    }
    totalSpots:[Integer]
    availableSpots:[Integer]
    allowedDuration:[Integer]
    line: {
      point: [  // this is currently populated on type: PARKING_METERED
        {
          latitude:[Double]
          longitude:[Double]
        },
        ...
    },
    probability:[Double]
}
Data - when point type is UNIT
{
  unitData: {
    unit: [String]
    uiData: {
      buildingShape: {
        point: [
          {
            latitude:[Double]
            longitude:[Double]
          },
          ...
        ]
      }
      mapCenter: {
        latitude:[Double]
        longitude:[Double]
      },
      address:[String]
      unit:[String]
      floor:[Integer]
    }
    isBeans:[Boolean]
    hasGate:[Boolean]
    numberOfUnits:[Integer]
    numberOfBuildings:[Integer]
    hasParking:[Boolean]
  }
}