GET /v1/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 |
size |
Number |
Optional |
The number of returned transactions transactions. Possible values are 1÷100. Default value is 20. |
Request body
Attribute |
Type |
Condition |
Description |
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 |
sign |
String |
Optional |
Credit/Debit. Possible values are “C”/”D” |
transaction_types |
Optional |
Transactions of specific type(s) to be returned. Multiple transaction types can be passed by separating them with a "comma". Example: "008,013". |
|
last_transaction_id |
String |
Optional |
Used for pagination. Passing this parameter will fetch the transactions after it. |
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 |
Mandatory |
A list of transaction objects |
Examples
curl -X GET \
https://transactions-api.mypos.com/v1/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' \
-d '{}'
import requests
requests.request(
'GET',
url='https://transactions-api.mypos.com/v1/transactions',
data=dict(),
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/transactions',
body: {},
json: true,
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/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'
));
$request->setBody('{}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
{
"transactions": [
{
"payment_reference": "POSA01519200BVNL",
"operation_type": "001",
"transaction_currency": "EUR",
"transaction_amount": -37.83,
"original_currency": "EUR",
"original_amount": -37.83,
"date": "2019-07-19T17:43:27",
"sign": "D"
},
],
"pagination": {
"page": 1,
"size": 20,
"total": 1
}
}