Harbor Gateway
  1. Transactions
Harbor Gateway
  • Harbor Gateway API
    • Harbor Gateway
    • Health & Status
      • Admin interface
      • Health check
    • Transactions
      • List all transactions
        GET
      • Create a transaction
        POST
      • Get transaction details
        GET
      • Release transaction
        DELETE
      • Open locker by transaction ID
        POST
    • Lockers
      • List all lockers
      • Get locker configuration
      • Get locker details
      • Update locker service state
      • Open locker by ID
      • Open all lockers
    • 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. Transactions

Create a transaction

POST
/transactions
Finds and assigns an available locker for the provided transactionId. Does not open the locker door - use the open endpoint separately when ready.
This operation is idempotent - if the transactionId is already in use, returns the existing transaction (409 status).
Concurrency: Under high load, multiple simultaneous requests may attempt to assign the same locker. When this occurs, one request succeeds (201) while others receive 503 LOCKER_ASSIGNMENT_CONFLICT. Clients should implement retry logic with exponential backoff (typically 100ms, 200ms, 400ms).

Request

Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
Locker successfully assigned
Body

🟠400
🟠409
🔴500
🔴503
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/transactions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "transactionId": "string",
    "preferredLockerType": "medium",
    "preferredAttributes": [
        "low"
    ],
    "widthInches": 18,
    "heightInches": 24,
    "lengthInches": 12,
    "allowFallback": true,
    "attributesRequired": true,
    "matchingStrategy": "do_not_tip"
}'
Response Response Example
201 - Example 1
{
    "transactionId": "string",
    "lockerId": 0,
    "createdAt": "2019-08-24T14:15:22.123Z"
}
Modified at 2026-02-20 22:56:40
Previous
List all transactions
Next
Get transaction details
Built with