- Introduction
- Authentication
- List Filtering
- API Reference
- Users
- Methods
- Properties
- GET /users/{id}
- GET /users/
- POST /users/
- PUT /users/{id}
- DELETE /users/{id}
- Locks
- Methods
- Properties
- GET /locks/{id}
- GET /locks
- Lock Activities
- Methods
- Properties
- GET /locks/activities/{activityId}
- GET /locks/activities
- Lock Activity Codes & Descriptions
- Lock Access Actions
- Methods
- Properties
- POST /access/locks
- Lock Configurations
- Methods
- Properties
- GET /v3/configure/locks/organization
- PUT /v3/configure/locks/organization
- Sensors
- Methods
- Properties
- GET /sensors/{id}
- GET /sensors
- Sensor Activities
- Methods
- Properties
- GET /sensors/activities/{activityId}
- GET /sensors/activities
- General Activities
- Methods
- Properties
- GET /general/activities/{activityId}
- GET /general/activities
- Trackables
- Methods
- Properties
- Trackable Type Codes & Descriptions
- GET /trackables/{id}
- POST /trackables
- PUT /trackables/{id}
- DELETE /trackables/{id}
- Locations
- Methods
- Properties
- GET /locations/{id}
- GET /locations
- POST /locations
- PUT /locations/{id}
- DELETE /locations/{id}
- Barcodes
- Methods
- Properties
- GET /barcodes/{id}
- GET /barcodes
- POST /barcodes
- PUT /barcodes
- DELETE /barcodes/{id}
Introduction
Welcome to the BoxLock Control API! You can use our API to access information about your organization, manage locations, locks, barcodes, trackables, access activity logs and a variety of other things.
All of our endpoint examples are written in Shell using curl, which should allow them to be easily generalizable to any programming language you're using to integrate BoxLock into your application.
BoxLock uses API keys to allow access to the API.
Authentication
BoxLock uses API Key to allow access to the API. The API Info for your account is available under Account → Integrations in BoxLock Control. If you need additional API Keys generated or the API Key is not populated, please reach out to your BoxLock Customer Success Representative.
The BoxLock Control API expects the API Key to be included in all API requests to the server. Authorization
as the header key and Bearer {yourApiKey}
as the value.
List Filtering
You can filter most of our data objects by their field properties (ie locks, barcodes, and trackables).
- Supported Operators - eq, gt, gte, lt, lte, ne, between, notBetween, in, notIn, overlap, contains, contained, like
- Paging - limit,offset
- Sorting - sort (sort=updatedAt or sort=-updatedAt)
- the different filtering options are added to a JSON object, and then that object must be URL encoded
- JSON format for the request is
?filter={"id":"eq:12345"}
(for example). You can filter on any field that an object has attributed to it (e.x. filtering by lockId on lockActivities)
Example Requests
GET https://apis.getboxlock.com/v3/lockActivities/?filter=%7B%22id%22%3A%22eq%3A12345%22%7D
API Reference
Users
A user represents a BoxLock Control organization user.
Methods
info
- returns info about a BoxLock Control Userlist
- returns a list of BoxLock Control usersinsert
- create a new user recordupdate
- update a user recorddelete
- delete a user record
Properties
id
- unique identifiername
- the users full nameemail
- the users email addresslocationId
- the id of the location the user is assigned togroup
- the group/role assigned to the user
GET /users/{id}
This endpoint retrieves an individual user.
Example Request
curl -X GET https://apis.getboxlock.com/v3/users{id}
-H “Authorization": Bearer <ApiKey>”
The above command returns JSON structured like this:
{
"id": "int",
"name": "string",
"email": "string",
"locationId": "int",
"group": "string",
"createdAt": "date",
"updatedAt": "date"
}
GET /users/
This endpoint retrieves a list of users for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/users
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"data": [{
"id": "int",
"name": "string",
"email": "string",
"locationId": "int",
"group": "string",
"createdAt": "date",
"updatedAt": "date"
}]
}
POST /users/
This endpoint creates a user for the currently requesting organization.
Properties
name
- first name and last name of the useremail
- email address for the userlocationId
- the location assigned to the user. not required. (Only used for users create in the LocationAdmin group)group
- OrganizationAdmin - Can write, delete, update an object for assigned Org.
- OrganizationManager - Same as OrganizationAdmin but can’t create users.
- OrganizationAnalyst - Can read an object for Org.
- LocationAdmin - Can write, delete, update an object for assigned location.
Example Request
curl -X GET https://apis.getboxlock.com/v3/users
-H "Authorization": "Bearer <ApiKey>"
-d {"name":"John Smith","email":"john.smith@getboxlock.com","locationId":3,"group":"LocationAdmin"}
The above command returns JSON structured like this:
{
"id": "int",
"name": "string",
"email": "string",
"locationId": "int",
"group": "string",
"createdAt": "date",
"updatedAt": "date"
}
PUT /users/{id}
This endpoint updates a user for the currently requesting organization.
Properties
name
- first name and last name of the useremail
- email address for the userlocationId
- the location assigned to the user. not required. (Only used for users create in the LocationAdmin group)group
- OrganizationAdmin - Can write, delete, update an object for assigned Org.
- OrganizationManager - Same as OrganizationAdmin but can’t create users.
- OrganizationAnalyst - Can read an object for Org.
- LocationAdmin - Can write, delete, update an object for assigned location.
Example Request
curl -X PUT https://apis.getboxlock.com/v3/users
-H "Authorization": "Bearer <ApiKey>"
-d {"name":"John Smith"}
The above command returns JSON structured like this:
{
"id": "int",
"name": "string",
"email": "string",
"locationId": "int",
"group": "string",
"createdAt": "date",
"updatedAt": "date"
}
DELETE /users/{id}
This endpoint deletes a user for the currently requesting organization.
Properties
id
- unique identifier
Example Request
curl -X DELETE https://apis.getboxlock.com/v3/users/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
if successful, this request returns a 204 (No content)
Locks
A lock represents the currently requesting organization’s lock.
Methods
info
- returns info about a Locklist
- list of Locks
Properties
id
- unique identifieruserId
- id for the lock ownerlocationId
- the location the lock is assigned toname
- default name for a lockniceName
- user friendly name for a locklockOpen
- lock state 0=closed, 1=open, 2=unknownbatteryLevel
- lock battery level 0-100batteryCharging
- the charging state of the lockdisconnectedAt
- timestamp when the lock disconnected
GET /locks/{id}
This endpoint retrieves a lock for the currently requesting organization.
Properties
id
- unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/locks/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"name": "string",
"locationId": "int",
"niceName": "string",
"lockOpen": "enum",
"batteryLevel": "int",
"batteryCharging": "int",
"disconnectedAt": "date",
"createdAt": "date",
"updatedAt": "date"
}
GET /locks
This endpoint retrieves a list of locks for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/locks
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"items": [{
"id": "int",
"name": "string",
"locationId": "int",
"niceName": "string",
"lockOpen": "enum",
"batteryLevel": "int",
"batteryCharging": "int",
"disconnectedAt": "date",
"createdAt": "date",
"updatedAt": "date"
}],
"page": "int",
"total": "int"
}
Lock Activities
An lock activity represents a log of lock events.
Methods
info
- returns info about a lock activitylist
- returns a list of lock activities
Properties
id
- unique identifieractivityType
- unique activity code (see below for activity code descriptions)userId
- id for the lock ownerorganizationId
- the organization that owns the locklocationId
- the location associated with the activitybarcodeId
- the barcode associated with the activitylockId
- the lock associated with the activitytitle
- activity titledetails
- Additional details about the activitymodeMmc
- Mobile-to mobile convergence when the activity happenedmodeLac
- Mobile Network Code when the activity happenedmodeLac
- Location Area Code when the activity happenedmodeCid
- Base transceiver station identifierlat
- latitude value when the activity happenedlng
- longitude value when the activity happened
GET /locks/activities/{activityId}
This endpoint retrieves a lock activity for the currently requesting organization.
Property
id
- lock unique identifieractivityId
- lock activity unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/locks/activities/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"activityType": "int",
"userId": "int",
"organizationId": "int",
"locationId": "int",
"barcodeId": "int",
"title": "string",
"modeMmc": "int",
"modeMnc": "int",
"modeLac": "int",
"modeCid": "int",
"lat": "float",
"lng": "float",
"createdAt": "date",
"updatedAt": "date"
}
GET /locks/activities
This endpoint retrieves a list of lock activities for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/locks/activities/{id}
-H "Authorization": "Bearer <ApiKey>"
Lock Activity Codes & Descriptions
Package Delivery
User Barcode Scan
Unlock over Bluetooth
Master Barcode Scan
User Added to Account
Battery Issue
Wifi Issue
Lock Issue (Left open, etc)
Unrecognized Package/Barcode Scanned
Own Package Scanned When Not "Out for Delivery"
Own Package Scanned When Already Delivered
Expired Barcode Scanned
Unauthorized Unlock Attempt
Lock Closed
Expired Press Unlock Access
Successful Press Unlock
Status Update
Parsyl Update
Lock Already Connected
Lock Added
Intrusion Attempt Detected
Signature Release
GPS Update
QuantumView Package
UPP Smart Pickup
Lock Access Actions
A lockAccess represents an action that can be taken on a Lock. Currently the only action that is allowed is “Push to Unlock”.
Methods
insert
- returns info about a BoxLock Control user.
Properties
id
- unique identifierlockId
- locks unique identifieraccessType
- always 0duration
- access duration in secondsaccessor
- always 1details
- additional information about the request that will log into the general activity description.
POST /access/locks
This endpoint creates a lockAccess record for the currently requesting organization target lock. (“Push To Open”)
Properties
lockID
- target lock to allow accessaccessType
- type of access needed (0 is “Push to Unlock”)accessor
- the type of accessor (should be 1)duration
- how long the auction in valid fordetails
- general activity details
Example Request
curl -X POST https://apis.getboxlock.com/v3/access/locks
-H "Authorization": "Bearer <ApiKey>"
-d {"lockId": 1111,"accessType":0,"accessor":1,"duration":30}
The above command returns JSON structured like this:
{
"id": "int",
"lockId": "int",
"duration": "int",
"accessType": "int",
"Accessor": "int",
"createdAt": "date",
"updatedAt": "date"
}
Lock Configurations
A lockConfig represents a configuration belonging to the currently requesting organization.
Methods
info
- returns info about an organizations current lockConfigupdate
- update a lockConfig
Properties
connectionTime
- TODOconnectedWhenOpen
- TODOintrusionForce
- TODOintrusionWakeDuration
- TODOintrusionSleepDuration
- TODOparsylSupport
- TODOlightningCodesEnabled
- TODOlightningCodesExpiration
- TODOgpsSupport
- TODOpressToUnlockTime
- TODOsensorCicList
- TODO
GET /v3/configure/locks/organization
This endpoint gets the lockConfig record for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/configure/locks/organization
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"connectionTime": "int",
"connectedWhenOpen": "int",
"intrusionForce": "int",
"intrusionWakeDuration": "int",
"intrusionSleepDuration": "int",
"parsylSupport": "boolean",
"lightningCodesEnabled": "boolean",
"lightningCodesExpiration": "int",
"gpsSupport": "boolean",
"pressToUnlockTime": "int",
"sensorCicList": "string",
}
PUT /v3/configure/locks/organization
This endpoint updates the lockConfig record for the currently requesting organization.
Example Request
curl -X PUT https://apis.getboxlock.com/v3/access/locks
-H "Authorization": "Bearer <ApiKey>"
-d {"connectionTime": 600,"sensorCicList": "AAAAA,BBBB,DDDD,EEEE"}
The above command returns JSON structured like this:
{
"connectionTime": "int",
"connectedWhenOpen": "int",
"intrusionForce": "int",
"intrusionWakeDuration": "int",
"intrusionSleepDuration": "int",
"parsylSupport": "boolean",
"lightningCodesEnabled": "boolean",
"lightningCodesExpiration": "int",
"gpsSupport": "boolean",
"pressToUnlockTime": "int",
"sensorCicList": "string",
}
Sensors
A sensor represents an third-party IoT sensor.
Methods
info
- returns info about a sensorlist
- list of sensors
Properties
id
- unique identifierdeviceId
- device id for iot sensorlocationId
- the location the lock is assigned toniceName
- user friendly name for a lockcic
- the Company Identifier Code that represents the company the sensor belongs torssi
- the signal strength of the sensor
GET /sensors/{id}
This endpoint retrieves a sensor for the currently requesting organization.
Properties
id
- unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/sensors/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"deviceId": "string",
"niceName": "string",
"company": "string",
"cic": "string",
"rssi": "string",
"locationId": "int",
"organizationId": "int",
"createdAt": "date",
"updatedAt": "date"
}
GET /sensors
This endpoint retrieves a list of sensors for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/sensors
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"items": [{
"id": "int",
"deviceId": "string",
"niceName": "string",
"company": "string",
"cic": "string",
"rssi": "string",
"locationId": "int",
"organizationId": "int",
"createdAt": "date",
"updatedAt": "date"
"updatedAt": "date"
}],
"page": "int",
"total": "int"
}
Sensor Activities
A sensor activity represents a logging of third-party IoT sensor events.
Methods
info
- returns info about a sensor activitylist
- returns a list of sensor activities
Properties
id
- unique identifierdeviceId
- the device id of the IoT sensorlockId
- the id of the lock associated with the eventlock
- the lock associated with the eventsensorId
- the id of the sensor associated with the ventsensor
- the sensor associated with the eventorganization
- the organization associated with the eventlocation
- the location associated with the event
GET /sensors/activities/{activityId}
This endpoint retrieves a sensor activity for the currently requesting organization.
Property
id
- sensor unique identifieractivityId
- sensors activity unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/sensors/activities/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"lockId": "int",
"deviceId": "622464f1",
"sensor": Sensor,
"sensorId": "int",
"lock": Lock,
"organization": Organization,
"location": location,
"createdAt": "date",
"updatedAt": "date"
}
GET /sensors/activities
This endpoint retrieves a list of sensor activities for the currently requesting organization.
Properties
id
- sensor unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/sensors/activities/{id}
-H "Authorization": "Bearer <ApiKey>"
General Activities
A general activity represents a log of standard and custom events for an organization.
Methods
info
- returns info about a general activitylist
- returns a list of general activities
Properties
id
- unique identifiergeneralActivityType
- the type of general activityapplication
- the application that triggered the eventapplicationVersion
- the application version that triggered the eventdetails
- a general description of the eventmetadata
- custom event base info (more technical data)location
- location associated with the eventuser
- the user that triggered the event (if there is no user, then it’s a system event)
GET /general/activities/{activityId}
This endpoint retrieves a general activity for the currently requesting organization.
Property
id
- activity unique identifieractivityId
- activity unique identifier
Example Request
curl -X GET https://apis.getboxlock.com/v3/general/activities/{id}
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"generalActivityType": "enum",
"application": "string",
"applicationVersion": "string",
"details": "string",
"metadata": "object",
"location": Location,
"user": User,
"createdAt": "date",
"updatedAt": "date"
}
GET /general/activities
This endpoint retrieves a list of general activities for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/general/activities
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"items": [{
"id": "int",
"generalActivityType": "enum",
"application": "string",
"applicationVersion": "string",
"details": "string",
"metadata": "object",
"location": Location,
"user": User,
"createdAt": "date",
"updatedAt": "date"
}],
"page": "int",
"total": "int"
}
Trackables
A trackable represents any item belonging to the currently requesting organization that can be tracked.
Methods
info
- returns info about a trackableinsert
- create one or more trackablesupdate
- update a trackabledelete
- delete a trackable
Properties
id
- unique identifiername
- nice name for the trackabletype
- trackable type code (see reference below for trackable types)carrierName
- name for the carriertrackingNumber
- tracking identifier provided by the shipperstatus
- the state of a trackable (ex: “Out for Delivery”, “In Transit", or "Delivered")description
- a description for the trackable.userId
- id for the trackable ownerdetails
- any extra details associated with the specific trackableurl
- the tracking url provided by the carriershipperName
- name for the shipperdeliveredAt
- the timestamp for a delivered trackablelocationId
- the location the trackable is assigned toexternalId
- the external id for a trackableshipmentNumber
- the shipment number for a trackablemetadata
- metadata associated with a trackablelocation
- info about the location associated with a trackable
Trackable Type Codes & Descriptions
Default
Parcel
Tool
Part
Vote
Consumable
Kit
Material
Specimen
Other
LOTO
GET /trackables/{id}
This endpoint retrieves a trackable for the currently requesting organization.
Request Parameters
id
- unique identifiertrackingNumber
- tracking number can be used in place of the {id}
Example Request
curl -X GET https://apis.getboxlock.com/v3/trackables/1234
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "string",
"name": "string",
"type": int,
"carrierName": "string",
"trackingNumber": "string",
"status": "string",
"description": "string",
"userId": "string",
"details": {json},
"url": "string",
"shipperName": "string",
"deliveredAt": date,
"organizationId": "string",
"locationId": "string",
"externalId": "string",
"shipmentNumber": "string",
"metadata" : {json},
"createdAt": date,
"updatedAt": date,
"location": Location
}
POST /trackables
This endpoint creates a trackable for the currently requesting organization.
Request Parameters
trackingNumber
- tracking identifier provided by the shipperlocationId
- the assigned location for the trackablecarrierName
- name for the carriershipperName
- name for the shipperurl
- the tracking url provided by the carrierdescription
- a description for the trackable.status
- can be “out_for_delivery”, “in_transit", or "delivered"type
- can be any trackable type
Example Request
curl -X POST https://apis.getboxlock.com/v3/trackables
-H "Authorization": "Bearer <ApiKey>"
-d {"trackingNumber":"374DJNWLKEID","carrierName":"Carrier Name","shipperName":"Shipper Name","url":"https://apis.getboxlock.com/v2/control/trackables","description":"My trackable","status":"out_for_delivery","type":2}
The above command returns JSON structured like this:
{
"id": int,
"userId": int,
"locationID": int,
"trackingNumber": int,
"carrierName": "string",
"shipperName": "string",
"url": "string",
"description": "string",
"status": "string"
"deliveredAt": date,
"createdAt": date,
"updatedAt": date
}
PUT /trackables/{id}
This endpoint updates a trackable for the currently requesting organization.
Request Body
Parameters
url
- the tracking url provided by the carrierdescription
- a description for the trackable.status
- can be “out_for_delivery”, “in_transit", or "delivered"
Example Request
curl -X PUT https://apis.getboxlock.com/v3/trackables/1234
-H "Authorization": "Bearer <ApiKey>"
-d {"url":"http://track.getboxlock.com/barcodes/barcodeVis.php?barcode=D8DJSKKDIE","description":"My trackable","status":"out_for_delivery"}
The above command returns JSON structured like this:
{
"id": int,
"userId": int,
"locationID": int,
"trackingNumber": int,
"carrierName": "string",
"shipperName": "string",
"url": "string",
"description": "string",
"status": "string"
"deliveredAt": date,
"createdAt": date,
"updatedAt": date
}
DELETE /trackables/{id}
This endpoint deletes a trackable for the currently requesting organization.
Request Body
Parameters
id
- unique identifiertrackingNumber
- tracking number can be used in place of the {id}
Example Request
curl -X DELETE https://apis.getboxlock.com/v3/trackables/1234
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
If successful, this request returns a 204 (No Content)
Locations
A location represents a place within an organizations hierarchy.
Methods
info
- returns info about a locationlist
- list of locationsinsert
- create one or more locationsupdate
- update a locationdelete
- delete a location
Properties
id
- unique identifierorganizationId
- identifier for the location's organization ownerlocationType
- location type (default = 0 AND group = 1)address1
- street address for the locationaddress2
- additional address information (ex. Suite, Apt, Unit)state
- the state for the locationcity
- the city for the locationzip
- the zip/postal code for the locationcountry
- the country for the locationcontactName
- the name of the primary contact for the locationcontactPhoneNumber
- the name of the primary contact for the locationstatus
- Indicates whether the location is activegroupItems
- the locations associated with a location of type group.
GET /locations/{id}
This endpoint retrieves a location for the currently requesting organization
Example Request
curl -X GET https://apis.getboxlock.com/v3/locations/1234
-H "Authorization": "Bearer <ApiKey>"
Example Response
{
"id": "int",
"organizationId": "int",
"locationType": "enum",
"address1": "string",
"address2": "string",
"state": "string",
"city": "string",
"zip": "string",
"country": "string",
"contactName": "string",
"contactPhoneNumber": "string",
"status": "int",
"groupItems": [{
"id": "int",
"parentid": "int",
"parent": Location,
"collectionSourceId": "int",
"collectionSourceType": "string",
"source": Location,
"organizationId": "int",
"organization": Organization,
}],
"createdAt": "date",
"updatedAt": "date"
}
GET /locations
This endpoint retrieves a locations for the currently requesting organization.
Example Request
curl -X GET https://apis.getboxlock.com/v3/locations
-H "Authorization": "Bearer <ApiKey>"
Example Response
{
"items": [{
"id": "int",
"organizationId": "int",
"locationType": "enum",
"address1": "string",
"address2": "string",
"state": "string",
"city": "string",
"zip": "string",
"country": "string",
"contactName": "string",
"contactPhoneNumber": "string",
"status": "int",
"groupItems": [{
"id": "int",
"parentid": "int",
"parent": Location,
"collectionSourceId": "int",
"collectionSourceType": "string",
"source": Location,
"organizationId": "int",
"organization": Organization,
}],
}],
"page": "int",
"total": "int"
}
POST /locations
This endpoint creates a location for the currently requesting organization.
Request Body
Parameters
address1
- tracking identifier provided by the shipperaddress2
- additional address information (ex. Suite, apt)state
- the state of the locationcity
- the tracking url provided by the carrierzip
- the zip/postal code for the locationcountry
- the country for the locationcontactName
- primary contacts namecontactPhoneNumber
- primary contact phone number (format ex. +17708515123)status
- can be 0 (inactive) or 1 (active)
Example Request
curl -X POST https://apis.getboxlock.com/v3/locations/1234
-H "Authorization": "Bearer <ApiKey>"
-d {"address1":"124 Fairlane Way","address2":"Suite 127”,”state":"GA","city":"Atlanta","zip":"30309","country":"USA", "contactName": "John Doe", "contactPhoneNumber": "+17708515123"}
The above command returns JSON structured like this:
{
"id": "int",
"locationType": "enum",
"organizationId": "int",
"address1": "string",
"address2": "string",
"state": "string",
"city": "string",
"zip": "string",
"country": "string",
"contactName": "string",
"contactPhoneNumber": "string",
"status": "int",
"createdAt": "date",
"updatedAt": "date"
}
PUT /locations/{id}
This endpoint updates a location for the currently requesting organization.
Request Body
Parameters
address1
- tracking identifier provided by the shipperaddress2
- additional address information (ex. Suite, apt)state
- the state of the locationcity
- the tracking url provided by the carrierzip
- the zip/postal code for the locationcountry
- the country for the locationcontactName
- primary contacts namecontactPhoneNumber
- primary contact phone number (format ex. +17708515123)status
- can be 0 (inactive) or 1 (active)
Example Request
curl -X PUT https://apis.getboxlock.com/location/v2/control/locations/1234
-H "Authorization": "Bearer <ApiKey>"
-d {"address1":"124 Fairlane Way"}
The above command returns JSON structured like this:
{
"id": "int",
"locationType": "enum",
"organizationId": "int",
"address1": "string",
"address2": "string",
"state": "string",
"city": "string",
"zip": "string",
"country": "string",
"contactName": "string",
"contactPhoneNumber": "string",
"status": "int",
"createdAt": "date",
"updatedAt": "date"
}
DELETE /locations/{id}
This endpoint deletes a location for the currently authenticated organization.
Request Body
Parameters
id
- unique identifier
Example Request
curl -X DELETE https://apis.getboxlock.com/v3/locations/1234
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
If successful, this request returns a 204 (No Content)
Barcodes
A barcode represents a code used for access control of a BoxLock user’s lock.
Methods
info
- returns info about a locationlist
- list of locationsinsert
- create a barcode for lock accessupdate
- update a barcodedelete
- delete a barcode
Properties
id
- unique identifieruserID
- identifier for the lock ownerlockID
- the lock to assign the barcode to (can be null)locationID
- the location to assign the barcode to (can be null)barcode
- barcode to be createdaccessType
- set to 1=unlimited use barcode, 2=time-based barcode, 3=use-based barcodeenabled
- the active statusenabledFrom
- applicable only for access_type 2, this is the date the barcode starts to be valid (YYYY-MM-DD)enabledTo
- applicable only for access_type 2, this is the date the barcode is no longer valid (YYYY-MM-DD)useLimit
-uses
- applicable only for access_type 3. This is the number of uses the barcode is valid for.offline
- makes a barcode a lightening code (offline barcode)
GET /barcodes/{id}
This endpoint retrieves info about a barcode the currently authenticated organization has attached to their lock.
Request Parameters
id
- unique identifierbarcode
- barcode can be used in place of the {id}
Example Request
curl -X GET https://apis.getboxlock.com/v3/barcodes/4DKDIE8
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"id": "int",
"userId": "int",
"lockId": "int",
"locationId": "int",
"barcode": "string",
"accessType": "enum",
"enabled": "boolean",
"enabledFrom": "date",
"enabledTo": "date",
"useLimit": "int",
"uses": "int",
"offline": "boolean",
"createdAt": "date",
"updatedAt": "date"
}
GET /barcodes
This endpoint retrieves a list of barcodes the currently authenticated organization has attached to their lock.
Example Request
curl -X GET https://apis.getboxlock.com/v3/barcodes
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
{
"items": [{
"id": "int",
"userId": "int",
"lockId": "int",
"locationId": "int",
"barcode": "string",
"accessType": "enum",
"enabled": "boolean",
"enabledFrom": "date",
"enabledTo": "date",
"useLimit": "int",
"uses": "int",
"offline": "boolean",
"createdAt": "date",
"updatedAt": "date"
}],
"page": "int",
"total": "int"
}
POST /barcodes
This endpoint creates a barcode for the currently authenticated organization has attached to their lock.
Request Body
Parameters
barcode
- barcode to be createdaccessType
- set to 1=unlimited use barcode, 2=time-based barcode, 3=use-based barcode.lockId
- the lock to assign the barcode to (can be null)locationId
- the location to assign the barcode to (can be null)uses
- applicable only for access_type 3. This is the number of uses the barcode is valid for.enabledFrom
- applicable only for access_type 2, this is the date the barcode starts to be valid (YYYY-MM-DD)enabledTo
- applicable only for access_type 2, this is the date the barcode is no longer valid (YYYY-MM-DD)offline
- TODO
Example Request
curl -X POST https://apis.getboxlock.com/barcode/v2/control/barcodes
-H "Authorization": "Bearer <ApiKey>"
-d {"barcode": "DKEIE736", "accessType": 1}
The above command returns JSON structured like this:
{
"id": "int",
"userId": "int",
"lockId": "int",
"locationId": "int",
"barcode": "string",
"accessType": "enum",
"enabled": "boolean",
"enabledFrom": "date",
"enabledTo": "date",
"useLimit": "int",
"uses": int,
"offline": "boolean",
"createdAt": "date",
"updatedAt": "date"
}
PUT /barcodes
This endpoint updates a barcode for the currently authenticated organization.
Request Body
Parameters
barcode
- barcode to be UaccessType
- set to 1=unlimited use barcode, 2=time-based barcode, 3=use-based barcode.lockId
- the lock to assigned the barcode to (can be null)locationId
- the location to assigned the barcode to (can be null)uses
- applicable only for access_type 3. This is the number of uses the barcode is valid for.enabledFrom
- applicable only for access_type 2, this is the date the barcode starts to be valid (YYYY-MM-DD)enabledTo
- applicable only for access_type 2, this is the date the barcode is no longer valid (YYYY-MM-DD)offline
- TODO
Example Request
curl -X PUT https://apis.getboxlock.com/barcode/v2/control/barcodes
-H "Authorization": "Bearer <ApiKey>"
-d {"barcode": "DKEIE736", "accessType": 1}
The above command returns JSON structured like this:
{
"id": "int",
"userId": "int",
"lockId": "int",
"locationId": "int",
"barcode": "string",
"accessType": "enum",
"enabled": "boolean",
"enabledFrom": "date",
"enabledTo": "date",
"useLimit": "int",
"uses": "int",
"createdAt": "date",
"updatedAt": "date"
}
DELETE /barcodes/{id}
This endpoint delete a barcode the currently authenticated organization has attached to their lock.
Request Body
Parameters
id
- unique identifierbarcodes
- barcode can be used in place of the {id}
Example Request
curl -X DELETE https://apis.getboxlock.com/v3/barcodes/4DKDIE8
-H "Authorization": "Bearer <ApiKey>"
The above command returns JSON structured like this:
If successful, this request returns a 204 (No Content)