GET /terminals/terminal_id/requests

Prev Next

GET /terminals/{terminal_id}/requests

Returns all requests of a single terminal for a specific date. The default is the current date.

Step 1 - Request

GET /v1/card-present/devices/T650m-451-962-212/requests 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

Content-Type (header)

varchar(50)

application/json

NO

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

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; Android 11+; POS2.0+; Build/123)

NO

device_id (url)

varchar(35)

e.g. T650m-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

{
  "requests": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "request": {
        "method": "POST",
        "url": "https://api.blinkpayment.com/v1/card-present/sales",
        "headers": {...},
        "body": {...},
        "timestamp": "2025-03-13T07:47:42.113Z"
      },
      "response": {
        "code": "200",
        "message": "OK",
        "body": {...}
      }
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "request": {
        "method": "POST",
        "url": "/sales",
        "headers": {...},
        "body": {...},
        "timestamp": "2025-03-13T07:47:42.113Z"
      },
      "response": {
        "code": "200",
        "message": "OK",
        "body": {...}
      }
    }
  ]
}

Field Name

Type

Description

Nullable

requests[]

json

Array of requests. Returns [] if there are no records.

id

varchar(36)

GUID  (e.g., 550e8400-e29b-41d4-a716-446655440000)

NO

request->method

varchar(8)

String (e.g., POST or GET)

NO

request->url

varchar(1024)

String (e.g., https://api.blinkpayment.com/v1/card-present/sales)

NO

request->headers

json

Returns {} if there is data.

NO

request->body

json

Returns {} if there is data.

NO

request->timestamp

datetime

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

NO

response->code

varchar(3)

String (e.g., 200)

NO

response->message

varchar(50)

String (e.g., OK)

NO

response->body

json

Returns {} if there is data.

NO

Errors

400 Bad Request

Missing authorization header

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

{
    "result": "FAILURE",
    "message": "Field validation failed",
    "errors": {
        "Authorization": "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": "Field validation 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": "Field validation 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": "Field validation failed",
    "errors": {
        "Authorization": "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": "Field validation failed",
    "errors": {
        "Authorization": "The provided api_key or secret_key is invalid. Please ensure the credentials are correct and try again."
    }
}

422 Unprocessable Entity

Invalid terminal_id

HTTP/1.1 422 Unprocessable Entity  
Content-Type: application/json
{
    "result": "FAILURE",
    "message": "Field validation failed",
    "errors": {
        "terminal_id": "The terminal_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": "Field validation 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."
    }
}