GET /devices/device_id

Prev

Step 1 - Request

POST /v1/card-present/devices/451-962-212 HTTP/1.1                         
Host: api.blinkpayment.co.uk                     
Content-Type: application/json
Authorization: Basic ACCESS_TOKEN    # from Blink pos_api_key:pos_api_secret
User-Agent: AcmeApp/1.2.0 (ReactNative; Android 11+; POS2.0+; Build/123)

{}

Field Name

Type

Description

Nullable

Authorization (header)

varchar(512)

Authorization header for authenticating the request made up of pos_api_key and pos_api_secret. (e.g., Basic ZjdkNDcxNjYtMThhYy00????)

NO

Content-type (header)

varchar(50)

application/json

NO

User-Agent (header)

varchar(255)

A brief overview of the app or software, version and comments related to the software stack and minimum client specifications.

e.g. AcmeApp/1.2.0 (ReactNative; iOS 15+; iPhone 12+; Android 11+; Build/12345)

NO

device_id (url)

varchar(35)

e.g. 451-962-212

NO

metadata

json(1024)

Optional field that can be used for debugging, filtering linking to other systems. It contains custom vendor, POS, customer or order details in JSON format. (e.g. {"note": "Refund for overcharge"}, {"salesforce_id": "SF123456"}, {"server": "dev"}, {"partner": "Shopify", "order_id": "98765"})

YES

Step 2 - Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "serial_number": "451-962-212",
    "terminal_id": "T650M-451-962-212-MOHSIN",
    "state": "DISCONNECTED",
    "last_connected_at": "2025-03-26T13:06:25.052Z",
    "last_active_at": "2025-03-26T13:13:53.295Z",
    "last_connected_pos": "POS-25",
    "device_software_version": "5.339.8"
}

Field Name

Type

Description

serial_number

varchar(15)

Format 451-962-212

terminal_id

varchar(35)

Usually model and serial number. (e.g., T650m-451-962-212)

state

varchar(15)

CONNECTED or DISCONNECTED

last_connected_at

datetime

ISO 8601 datetime string (e.g., 2025-02-02T14:43:59+01:00)

last_active_at

datetime

ISO 8601 datetime string (e.g., 2025-02-02T14:43:59+01:00)

last_connected_pos_location

varchar(16)

This is the pos_location used in the last request.

device_software_version

varchar(15)

Format 5.339.8

Errors

400 Bad Request

Missing authorization header

HTTP/1.1 400 Bad Request  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "Authorisation": "The Authorization header is required and must be provided in the format: Basic <encoded_api_key:secret_key>."
    }
}

401 Unauthorized

Acquirer token not found

HTTP/1.1 401 Unauthorized  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "acquirer_token": "The acquirers token was not found in our system. Please contact the support team."
    }
}

Invalid acquirer Token

HTTP/1.1 401 Unauthorized  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "acquirer_token": "The acquirers token provided is invalid in our system. Please contact the support team."
    }
}

Invalid authorization header

HTTP/1.1 401 Unauthorized  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "Authorisation": "The provided Authorization header is invalid. Ensure it follows the correct format: Basic <encoded api_key:secret_key>."
    }
}

403 Forbidden

API key or secret key is invalid

HTTP/1.1 403 Forbidden  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "Authorisation": "The provided api_key or secret_key is invalid. Please ensure the credentials are correct and try again."
    }
}

422 Unprocessable Entity

Invalid device_id

HTTP/1.1 422 Unprocessable Entity  
Content-Type: application/json
{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "device_id": "The device_id must be a valid string with a maximum length of 35 characters."
    }
}

500 Internal Server Error

Generic error

HTTP/1.1 500 Internal Server Error  
Content-Type: application/json  

{
    "result": "FAILURE",
    "message": "Devices request failed",
    "errors": {
        "We're experiencing an issue with our server, but rest assured our team is already working to resolve it. Please try again later, and we apologize for the inconvenience."
    }
}