Harbor Gateway
  1. Lockers
Harbor Gateway
  • Harbor Gateway API
    • Harbor Gateway
    • Health & Status
      • Admin interface
      • Health check
    • Transactions
      • List all transactions
      • Create a transaction
      • Get transaction details
      • Release transaction
      • Open locker by transaction ID
    • Lockers
      • List all lockers
        GET
      • Get locker configuration
        GET
      • Get locker details
        GET
      • Update locker service state
        PATCH
      • Open locker by ID
        POST
      • Open all lockers
        POST
    • Locker Types
      • List all locker types
      • Get locker type details
    • Bank Types
      • List all bank types
      • Get bank type with associations
    • System
      • Receive heartbeat from external device
    • Schemas
      • Locker
      • LockerTypeSummary
      • TransactionResponse
      • LockerType
      • LockController
      • System
      • LockerConfig
      • LogEntry
      • OperationResponse
      • LockerOperationResponse
      • MultiStatusOperationResponse
      • BankType
      • OpenAllLockersResponse
      • BankTypeAssociation
      • Error
      • BankTypeWithAssociations
      • DeviceHeartbeatRequest
  1. Lockers

Update locker service state

PATCH
/lockers/{lockerId}
Update a locker's service state (enable/disable for maintenance, mark broken lock).
Mark out of service:
Disable a locker for maintenance or due to hardware issues. Locker becomes
unavailable for new transactions. Existing transactions are preserved but
may not be openable if hardware has failed.
Set outOfService: true with reasonCode and reason fields.
Return to service:
Re-enable a locker that was previously marked out of service. Locker becomes
available for new transactions if operational and not assigned.
Set outOfService: false. The reasonCode and reason fields are optional
and will be cleared if not provided.
Mark broken lock (GPIO expander bug workaround):
Mark a locker as having a broken lock sensor due to known GPIO expander hardware bug.
When brokenLock: true, the lock will still fire but door sensor failures are ignored
(treated as success). This allows lockers with unreliable sensor feedback to remain operational.
Set brokenLock: true to enable workaround, brokenLock: false to disable.
Note: Lockers with certain types (e.g., screen lockers marked always_oos: true)
cannot be returned to service via this endpoint (returns 409 CONFLICT).

Request

Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Locker service state updated successfully
Body

🟠400
🟠404
🟠409
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request PATCH '/lockers/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "outOfService": true,
    "reasonCode": "LOCK_MALFUNCTION",
    "reason": "Lock solenoid not responding"
}'
Response Response Example
200 - Example 1
{
    "success": true
}
Modified at 2026-02-20 22:56:40
Previous
Get locker details
Next
Open locker by ID
Built with