Toggle Access Point

Open/Close a gate, garage, pedestrian door, elevator etc.

Operate Access Point

POST https://api.parqex.com/oauth/v1/endpoint/toggle

Open or close a single access point for a user.

Headers

NameTypeDescription

Accept

string

Always set to application/json

Content-Type

string

Always set to application/json

Authorization

string

Set to Bearer <ACCESS_TOKEN>

Accept-Charset

string

Always set to utf-8

Accept-Encoding

string

Always set to gzip

Request Body

NameTypeDescription

door_state

string

Requested state of the access point, either "OPEN" or "CLOSED"

door_id

string

UUID of the access point (ex: door, garage etc.) to operate (open/close)

{
    "success": true,
    "timestamp": 123123123123,
    "message":, "200"
}

The /toggle endpoint is used to open or close the specified garage door. In the request, you must specify the UUID of the door plus the requested state (ie. "OPEN" or "CLOSED"). The Controller ultimately decides how to process the TOGGLE request depending on the current known state of the specified door.

An example request may look like this:

POST /api/oauth/v1/endpoints/toggle HTTP/1.1
Host: https://parqex.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <ACCESS_TOKEN>
Accept-Charset: utf-8
Accept-Encoding: gzip

{ "door_id": "cbd3nb34877293484bcccbbd29393", "door_state": "OPEN" }

The body of the request must be valid JSON and both of the fields are required. Thedoor_id field comes from the data of the /sync endpoint. The door_state field should be thought of as a requested state of the door. It has two valid values: OPEN (to request the door to open) and CLOSED (to request the door to close).

Last updated