GET /v1.1/accounts 

 

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. 

  

 

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

accounts

List of

Account

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/accounts \
  -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/accounts',
    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/accounts',
    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/accounts');
$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;
}

{
    "accounts": [
        {
            "account_number": "50041665733",
            "iban": "BG77INTF40015004166573",
            "currency": "GBP",
            "name": "My GB Account",
            "is_reserve": false
        },
        {
            "account_number": "50888427791",
            "iban": "BG20INTF40015088842779",
            "currency": "EUR",
            "name": "EUR Account",
            "is_reserve": false
        }
    ],
    "pagination": {
        "page": 1,
        "page_size": 20,
        "total": 2
    }
}