Skip to main content

Lockers API

SYNQ Lockers API (1.0.0)

Download OpenAPI specification:Download

APIs for handling SYNQ Touchless Lockers.

Locker - Employee/Admin

APIs related to Lockers (Employee/Admin side).

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

Content type
application/json
[
  • {
    }
]

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/json
required
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

Content type
application/json
{
  • "rearload": true,
  • "locker_id": 109,
  • "cabinet_id": 286,
  • "order_id": 46188,
  • "organization_id": 1,
  • "location_id": 8
}

Response samples

Content type
application/json
{
  • "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/json
required
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:

  • resize: Changes the size of the locker. Requires size.
  • set_thermal_mode: Changes the thermal mode. Requires thermal_mode.
  • disable: Disables the locker.
  • enable: Enables the locker.
  • open: Opens the locker.
  • close: Closes the locker.
size
string or null

Size of the locker. Required when command is resize.

thermal_mode
string or null
Enum: "ambient" "heat" "freeze" "chill"

Thermal mode of the locker. Required when command is set_thermal_mode. Possible values are ambient, heat, freeze, chill.

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

Content type
application/json
{
  • "acted_by": 1201,
  • "command": "close",
  • "size": "mini",
  • "thermal_mode": "ambient",
  • "order_id": null,
  • "reason": null,
  • "rearload": true,
  • "delay": 2
}

Response samples

Content type
application/json
{
  • "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/json
required
completed_by
integer
completed_device_id
integer
delay
integer

Responses

Request samples

Content type
application/json
{
  • "completed_by": 123,
  • "completed_device_id": 1201,
  • "delay": 8
}

Response samples

Content type
application/json
{
  • "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
}

Locker - Customers

APIs related to Locker Customers.

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/json
required
command
required
string
Enum: "here" "agree" "disagree"

The command to perform on the cabinet.

Responses

Request samples

Content type
application/json
{
  • "command": "agree"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "delay": 8
}

Response samples

Content type
application/json
{
  • "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
}

Locker - Feedback

APIs for handling feedback from the locker.

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/json
required
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

Content type
application/json
{
  • "cabinets": [
    ],
  • "locker_info": {
    },
  • "event": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Updated successfully"
}