GET /v1.1/transactions 

 

Request headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call.

Authorization

String

Mandatory

The oAuth2 Bearer token

API-Key

String

Mandatory

The Client ID obtained from the myPOS Account

 

 

Query parameters

Attribute

Type

Condition

Description

page

Number

Optional

The page with transactions to be returned. Default is 1.

size

Number

Optional

The number of returned transactions transactions. Possible values are 1÷100. Default value is 20. 

order

Number

Optional

States whether to return the transactions in ascending or descending order. Possible values are 0 – ascending; 1 – descending. Default is "descending".

from_date

String

Optional

Starting date of the transaction list in format ISO8601 date/time standard

Example: 2019-12-01T10:15:00Z

to_date

String  Optional

End date of the transaction list in format ISO8601 date/time standard

Example: 2019-12-02T10:15:00Z

transaction_types

Transaction Type Optional

Transactions of specific type(s) to be returned. Multiple transaction types can be passed by separating them with a "comma". Example: "008,013".

start_trn_id

Number Optional

The “id” of the transaction from which, but not including, the transactions should be returned.

  

 

Response headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call.

Content-Type

String

Mandatory

application/json

 

 

Response body

Attribute

Type

Condition

Description

transactions

List of

Transaction

Mandatory

A list of transaction objects

pagination

Pagination

Mandatory

Information about the paginated results.

 

 

Examples

curl -X GET \
  https://transactions-api.mypos.com/v1.1/transactions \
  -H 'Authorization: Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP' \
  -H 'Content-Type: application/json' \
  -H 'API-Key: MY_API_KEY' \
  -H 'X-Request-ID: 232465ab-66ea-4776-b3f0-f7a123f988e4'
import requests

requests.request(
    'GET',
    url='https://transactions-api.mypos.com/v1.1/transactions',
    headers={
        'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
        'Content-Type': 'application/json',
        'API-Key': 'MY_API_KEY',
        'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4'
    }
)
const request = require("request");
const options = {
    method: 'GET',
    url: 'https://transactions-api.mypos.com/v1.1/transactions',
    headers: {
        'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
        'Content-Type': 'application/json',
        'API-Key': 'MY_API_KEY',
        'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4'
    }
};

request(options, (error, response, body) => {

});
<?php

$request = new HttpRequest();
$request->setUrl('https://transactions-api.mypos.com/v1.1/transactions');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
  'Content-Type' => 'application/json',
  'API-Key' => 'MY_API_KEY',
  'X-Request-ID' => '232465ab-66ea-4776-b3f0-f7a123f988e4'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

{
    "transactions": [
        {
            "id": 995004,
            "payment_reference": "POSA00117272VMGI",
            "transaction_type": "013",
            "transaction_currency": "EUR",
            "transaction_amount": 2.70,
            "original_currency": "EUR",
            "original_amount": 2.70,
            "date": "2019-09-29T07:07:09Z",
            "sign": "C",
            "reference_number": "",
            "terminal_id": "90002915",
            "serial_number": "D2005A334075"
        },
    ],
    "pagination": {
        "page": 1,
        "page_size": 20,
        "total": 1
    }
}