Lockers API
SYNQ Lockers API (1.0.0)
Download OpenAPI specification:Download
APIs for handling SYNQ Touchless Lockers.
Get Lockers for a Specific Location
Retrieve details of lockers and their cabinets for a specific location.
path Parameters
location_id required | integer Example: 8 ID of the location to retrieve lockers for. |
query Parameters
secret_token required | string Example: secret_token=devsecret Secret token for authentication. |
Responses
Response samples
- 200
[- {
- "id": 109,
- "api_key": "YWQ3NDc1M2EtYmMyZC00OWVjLWE5MDAtYjBhODNiM2YyY2Iz",
- "created_at": "2021-08-11T00:08:02.000000Z",
- "updated_at": "2023-11-22T00:03:53.000000Z",
- "name": "ddnewname",
- "organization_id": 1,
- "location_id": 8,
- "rear_loading_available": true,
- "version": 2,
- "timer": 15,
- "cabinets": [
- {
- "id": 285,
- "key": 0,
- "created_at": "2021-08-11T00:08:02.000000Z",
- "updated_at": "2024-11-29T22:33:51.000000Z",
- "name": null,
- "locker_id": 109,
- "state": "closed",
- "enabled": true,
- "size": "mini",
- "occupied": 1,
- "released_at": null,
- "thermal_mode": "ambient",
- "rear_load_status": "open",
- "tag": null,
- "cool_off_period": false
}
]
}
]
Create a new order for a locker cabinet
API to create a new order associated with a locker cabinet.
query Parameters
secret_token required | string Secret token for authentication. |
Request Body schema: application/jsonrequired
rearload required | boolean Indicates whether rear loading is required. |
locker_id required | integer Unique identifier for the locker. |
cabinet_id required | integer Unique identifier for the cabinet within the locker. |
order_id required | integer Unique identifier for the order. |
organization_id required | integer Unique identifier for the organization. |
location_id required | integer Unique identifier for the location. |
Responses
Request samples
- Payload
{- "rearload": true,
- "locker_id": 109,
- "cabinet_id": 286,
- "order_id": 46188,
- "organization_id": 1,
- "location_id": 8
}
Response samples
- 201
{- "order_id": 46188,
- "cabinet_id": 286,
- "open_code": "YzQwNWNhZGYtZWJlZS00ZjgzLWE0YjAtMGE4OTBjMzU4MDNl",
- "locker_id": 109,
- "organization_id": 1,
- "location_id": 8,
- "app_owner_id": null,
- "updated_at": "2024-11-29T23:35:05.000000Z",
- "created_at": "2024-11-29T23:35:05.000000Z",
- "id": 127
}
Update the state of a locker cabinet.
Sends a command to update the state of a locker cabinet (Internal request).
path Parameters
cabinet_id required | integer The unique identifier for the locker cabinet. |
query Parameters
secret_token required | string Example: secret_token=devsecret Secret token for authentication. |
Request Body schema: application/jsonrequired
acted_by | integer ID of the user performing the action. |
command required | string Enum: "resize" "set_thermal_mode" "disable" "enable" "open" "close" Command to execute. Accepted values are:
|
size | string or null Size of the locker. Required when |
thermal_mode | string or null Enum: "ambient" "heat" "freeze" "chill" Thermal mode of the locker. Required when |
order_id | string or null The associated order ID if the cabinet is occupied, if applicable. |
reason | string or null Reason for the action if the cabinet is occupied, if applicable. |
rearload | boolean Indicates the action to be performed for the rear door. |
delay | integer The delay (in seconds) for the close. Only applicable for the close command. |
Responses
Request samples
- Payload
{- "acted_by": 1201,
- "command": "close",
- "size": "mini",
- "thermal_mode": "ambient",
- "order_id": null,
- "reason": null,
- "rearload": true,
- "delay": 2
}
Response samples
- 200
{- "id": 285,
- "key": 0,
- "created_at": "2021-08-11T00:08:02.000000Z",
- "updated_at": "2024-11-29T19:27:44.000000Z",
- "name": null,
- "locker_id": 109,
- "state": "closed",
- "enabled": 1,
- "size": "mini",
- "occupied": 0,
- "released_at": null,
- "thermal_mode": "ambient",
- "rear_load_status": "closed",
- "tag": null
}
Mark a cabinet order as completed.
Updates the cabinet order status to completed.
path Parameters
cabinet_id required | integer Example: 286 Unique identifier for the cabinet. |
query Parameters
secret_token required | string Example: secret_token=devsecret Secret token for authentication. |
Request Body schema: application/jsonrequired
completed_by | integer |
completed_device_id | integer |
delay | integer |
Responses
Request samples
- Payload
{- "completed_by": 123,
- "completed_device_id": 1201,
- "delay": 8
}
Response samples
- 200
{- "id": 127,
- "created_at": "2024-11-29T23:35:05.000000Z",
- "updated_at": "2024-11-30T03:54:17.000000Z",
- "order_id": 46188,
- "cabinet_id": 286,
- "open_code": "YzQwNWNhZGYtZWJlZS00ZjgzLWE0YjAtMGE4OTBjMzU4MDNl",
- "completed_at": "2024-11-30T03:54:17.131043Z",
- "locker_id": 109,
- "organization_id": 1,
- "location_id": 8,
- "completed_by": null,
- "canceled_at": null,
- "app_owner_id": null,
- "completed_device_id": 1201,
- "application": null
}
Perform an action on a cabinet for a specific order
Executes a specified command on a cabinet identified by the open_code
.
path Parameters
open_code required | string Example: NTAxYzBlMGMtOTk0MC00Y2EwLWIxMzYtZGE2ZTU2YTQwNDAy The unique open code for the locker order. |
query Parameters
secret_token required | string Example: secret_token=devsecret Secret token for authentication. |
Request Body schema: application/jsonrequired
command required | string Enum: "here" "agree" "disagree" The command to perform on the cabinet. |
Responses
Request samples
- Payload
{- "command": "agree"
}
Response samples
- 200
{- "id": 289,
- "key": 0,
- "created_at": "2021-08-11T00:11:41.000000Z",
- "updated_at": "2024-12-02T00:14:07.000000Z",
- "name": null,
- "locker_id": 111,
- "state": "open",
- "enabled": true,
- "size": "test1",
- "occupied": true,
- "released_at": null,
- "thermal_mode": "ambient",
- "rear_load_status": "closed",
- "tag": null
}
Mark a cabinet order as completed.
Complete the locker order associated with a specific customer using the open_code
.
path Parameters
open_code required | string Example: MzQzMDliYWYtOTU3Mi00YWFiLWEwM2MtZTU0NjgzZDYwMDlm The unique open code for the locker order. |
query Parameters
secret_token required | string Example: secret_token=devsecret Secret token for authentication. |
Request Body schema: application/json
delay | integer The delay in seconds if required. |
Responses
Request samples
- Payload
{- "delay": 8
}
Response samples
- 200
{- "id": 145,
- "created_at": "2024-12-03T19:29:45.000000Z",
- "updated_at": "2024-12-03T20:06:51.000000Z",
- "order_id": 50,
- "cabinet_id": 290,
- "open_code": "MzQzMDliYWYtOTU3Mi00YWFiLWEwM2MtZTU0NjgzZDYwMDlm",
- "completed_at": "2024-12-03T20:06:51.230211Z",
- "locker_id": 111,
- "organization_id": 1,
- "location_id": 8,
- "completed_by": null,
- "canceled_at": null,
- "app_owner_id": null,
- "completed_device_id": null,
- "application": null
}
Update locker cabinet status (only for version 2 locker)
Updates the front and/or rear status of one or more cabinets in a locker.
header Parameters
api-key required | string Example: YWQ3NDc1M2EtYmMyZC00OWVjLWE5MDAtYjBhODNiM2YyY2Iz Locker-specific API key for authentication. |
Request Body schema: application/jsonrequired
required | Array of objects Array of cabinet objects to update. |
object Information about the locker. (optional) | |
object Details about the event. (optional) |
Responses
Request samples
- Payload
{- "cabinets": [
- {
- "key": 0,
- "front_status": "closed",
- "rear_status": "open"
}
], - "locker_info": {
- "ip": "123.123.123.132",
- "firmware": "1.1.2.2.1.1.1"
}, - "event": {
- "type": "active"
}
}
Response samples
- 200
- 401
- 422
- 500
{- "message": "Updated successfully"
}