API Reference
API Reference for the OkHi JavaScript browser library
Was this helpful?
API Reference for the OkHi JavaScript browser library
Was this helpful?
DOM Element where the OkCollect component is mounted
See below
props
Api key string
User's first name (Optional)
User's last name (Optional)
User's phone number
Callback to be called with UserAddress once an address has been created/selected
Callback to be called with Error object
Controls whether features for capturing the user's gate photo on streetview are enabled (Optional)
Controls whether features for capturing detailed user address data(building, apartment etc.) are enabled (Optional)
styleSettings
(Optional) See below
See below
Controls the component light/dark theming (Optional. Defaults to false)
If set to true users will only be able to create new addresses, not select from pre-existing addresses (Optional. Defaults to false)
(optional) See below
props <>
API_KEY <> Api key string
userFirstName <> User's first name (Optional)
userLastName <> User's last name (Optional)
userPhoneNumber <> User's phone number
onAddressSelected <() => void> Callback to be called with UserAddress once an address has been created/selected
onError <() => void> Callback to be called with Error object
streetviewEnabled <> Controls whether features for capturing the user's gate photo on streetview are enabled (Optional)
toTheDoorEnabled <> Controls whether features for capturing detailed user address data(building, apartment etc.) are enabled (Optional)
styleSettings <>(Optional)
primaryColor <> Controls the primary theme color of UI elements(Usually corresponds to the parent app's primary color or the business' brand color)
highlightColor <> A secondary theme color that contrasts well with the primary color
appSettings <>
name <> The parent app's name
version <> The parent app's version number
isDarkMode <> Controls the component light/dark theming (Optional. Defaults to false)
createOnly <> If set to true users will only be able to create new addresses, not select from pre-existing addresses (Optional. Defaults to false)
requiredFieldsConfig <> (optional)
buildingNameOrNumber <> If set to true requires the user to provide a building name value. The "Building Name or Number" input on the final ToTheDoor screen will be required.(Optional. Defaults to false).
target <>
props <>
API_KEY <>
userFirstName <>
userLastName <>
userPhoneNumber <>
onAddressSelected <() => void>
onError <() => void>
streetviewEnabled <>
toTheDoorEnabled <>
appSettings <>
isDarkMode <>
createOnly <>
requiredFieldsConfig <> (optional)
geo_point: <>
lon: <> longitude of the address
lat: <> latitude of the address
id: <> The id of the address
user_id: <> The user's id in OkHi
url: <> A public link to view the OkHi address
street_name: <> Name of the street
directions: <> (Optional) Directions to the location
property_name: <> (Optional) Name of the building
display_title: <> Full text address
street_view <> (Optional)
geo_point <>
lon: <> longitude of the address
lat: <> latitude of the address
pano_id: <> Streetview pano id
url: <> Streetview url