ZGLOCK / OPEN PLATFORM

Integrate along your path

Four integration paths — standard protocol, SDK, on-premises deployment and direct device connection — bring lock capabilities into an existing system.

  • GET /api/v1/devices
  • POST /api/v1/locks/{id}/unlock
  • MQTT zglock/{id}/event
  • GET /api/v1/events
  • POST /api/v1/leases
  • GET /api/v1/meters/{id}/reading
01 / Integration paths

Choose an integration path

Four paths cover everything from pure interface integration to an on-premises intranet deployment. Choose one to suit the site.

A / STANDARD

Standard protocol integration

HTTP · MQTT

Where it fits

  • Has a backend that can call HTTP interfaces directly
  • Need to subscribe to lock events for real-time automation
  • Prefer to integrate from the interface documentation

Where it doesn't fit

  • Would rather not handle authentication and retries at all

Start from: GET /api/v1/devices

B / SDK

SDK integration

Java · Python · Go

Where it fits

  • The team would rather not write network-layer code
  • Authentication, retries and serialisation are handled by the package
  • Call device and event interfaces directly in your language

Where it doesn't fit

  • The runtime is outside the languages provided

Start from: sdk.devices.list()

C / ON-PREMISE

On-premises deployment

Self-hosted

Where it fits

  • Data must stay on its own servers
  • Intranet only — no public network access
  • Need to connect to an internal account system

Where it doesn't fit

  • Want it working out of the box without running servers

Start from: deployment package + configuration list

D / DIRECT

Direct device connection

Device → Your Server

Where it fits

  • Has its own servers and engineering team
  • Has integrated smart devices and systems before
  • Data must not leave the company's own data centre

Where it doesn't fit

  • Need a ready-made cloud platform and management interface

Start from: device integration protocol + event and model list

02 / Choosing an integration path

03 / Technical documentation

Technical documentation

Use the index on the left; on the right is one line from selection to volume delivery.

  1. 01

    Platform overview

    Read the platform overview and confirm what the locks can do and which interfaces exist.

    Output: capability list
  2. 02

    Choose a path

    Pick one of the four paths to suit the site.

    Output: confirmed integration path
  3. 03

    Create a product

    Create products and device models in DSLock.

    Output: product and devices
  4. 04

    Capability definition

    Define a device's properties, events and services.

    Output: capability definition table
  5. 05

    Download the SDK

    Use a package by language, or integrate with the standard protocol directly.

    Output: SDK package
  6. 06

    Joint testing

    Verify door opening and event reporting in a test environment.

    Output: joint test record
  7. 07

    Volume delivery

    Flashed and activated in batches, then brought under management.

    Output: production batch
04 / Device capabilities

Device capabilities

Every device capability is described by a data type, and interfaces and events share the same definition.

Boolean

Only two states, open and closed — for example a door sensor or a bolt.

Numeric

Something measured in numbers — for example battery level or temperature.

Enum

Switches between a fixed set of values — for example lock status.

Pass-through

Bytes forwarded as-is, for the business side to parse.

Property definition example

# Describe device capabilities with data types
power  bool    # Door sensor: true / false
level  int     # Battery: 0 ~ 100
state  enum    # Status: closed / open
raw    bytes   # Pass-through: raw bytes
05 / API reference

API reference

Common paths at a glance: devices, locks, meters, events and lease terms.

Devices
  • GET /api/v1/devices
  • POST /api/v1/devices
  • GET /api/v1/devices/{id}
  • DELETE /api/v1/devices/{id}
Lock
  • POST /api/v1/locks/{id}/unlock
  • POST /api/v1/locks/{id}/passwords
  • POST /api/v1/locks/{id}/cards
  • GET /api/v1/locks/{id}/battery
  • GET /api/v1/locks/{id}/records
Electricity and water meters
  • GET /api/v1/meters
  • GET /api/v1/meters/{id}/reading
  • GET /api/v1/meters/{id}/usage
  • POST /api/v1/meters/{id}/valve
Events
  • GET /api/v1/events
  • MQTT zglock/{id}/event
Lease term
  • POST /api/v1/leases
  • DELETE /api/v1/leases/{id}
06 / SDK and tools

SDK and tools

Pick a package by language or platform, or integrate with the standard protocol directly.

Language / platform Package name Applicable integration path Status
Java zglock-sdk-java Standard protocol / SDK Available
Python zglock-sdk-python Standard protocol / SDK Available
Go zglock-sdk-go Standard protocol / SDK Available
JavaScript zglock-sdk-js Standard protocol / SDK Available
Embedded C zglock-sdk-embedded Direct device connection Per project
07 / Security and compliance

Security and compliance

The basic security measures from device to data, item by item.

Device authentication

Separate credentials per device

Encryption in transit

Encrypted end to end

Key rotation

Keys rotated on a schedule

Role-based access

Access rights graded by role

Data export

Logs can be exported

Audit trail

Operations and door openings recorded

08 / Support and resources

Support and resources

Documentation, FAQ and contact details, to read as needed.

Connect the site to the system

Tell us the lock models and network conditions, and we propose the matching integration path.

Talk to us