(Step 1) [GET] Retrieve Devices from a Location
Description
The first step to initiate a Remote Payment is to "List Devices", here you will get a list of the devices that are available. In order to start a Remote Payment, we must first have Locations validated and assigned to a Merchant. If you do not have a validated Location, you can do so through the Sylq App or by contacting our Support.
To discover which Terminals are available to receive a Payment, you only have to do a GET to Devices and our API will return which devices are available, you can follow the following examples.
Authentication
In all your requests you need to add, as a Header
, your Authorization Token-ID:
"Name": "Authorization"
"Value": "Bearer YOUR-TOKEN-ID"
Pagination and Limit
At the smae time, in the Header
, you can specify two Parameters, the "page
" (integer) and "limit
" (integer) in case you want to paginate the results or had a limit of results.
Environments
Staging environment
GET https://staging.sylq.io/remote_api/v1/devices
Production/Live environment
GET https://app.sylq.io/remote_api/v1/devices
Example of Request
As a "Header
" we need to specify the "Authorization
" (Bearer value) and, optional, the "Limit
" (of results) and "Page
" (pagination):
curl -i -H "Accept: application/json" -H "Authorization: Bearer YOUR-TOKEN-ID" -H "Limit: 2" -H "Page: 1" -X GET https://development.sylq.io/remote_api/v1/devices
Examples of returns
Success response (200)
{
"success": true,
"message": "Success",
"data": {
"total_devices": 4,
"total_of_pages": 2,
"current_page": 1,
"devices": [
{
"id": 83,
"name": "iPhone 3GS",
"os_system": "Android",
"sylq_app_version": "754",
"created_at": "2024-02-06T18:09:04.141Z"
},
{
"id": 82,
"name": "OnePlus 6",
"os_system": "Windows 8.1",
"sylq_app_version": "239",
"created_at": "2024-02-06T18:09:04.127Z"
}
]
}
}
Error responses
Unauthorized (401)
This error appears it is because the credential is incorrect or does not exist.
{
"message": "Unauthorized"
}