POST /v1.1/accounts/statement 

 

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

 

 

Request Body

Attribute

Type

Condition

Description

document_type

String

Mandatory

The type of the MT940. Possible values are:

0 => Multicash

1 => Swift

2 => Structured

date

String

Mandatory

The date for which to generate the statement in format YYYY-MM-DD. Example: 2020-01-11.

account_number

String

Mandatory

The number of the account for which to generate the statement. It is available via the GET /accounts endpoint.

  

 

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

String

Mandatory

The contents of the M940 generated file.

 

 

Examples

curl -X POST \
  https://transactions-api.mypos.com/v1.1/accounts/statement \
  -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 'document_type=1&account_number=50710731642&date=2020-01-11'
import requests

requests.request(
    'POST',
    url='https://transactions-api.mypos.com/v1.1/accounts/statement',
    headers={
        'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
        'Content-Type': 'application/json',
        'API-Key': 'MY_API_KEY',
        'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4'
    },
    data=dict(
        document_type=1,
        account_number='50710731642',
        date='2020-01-11'
    )
)
const request = require("request");
const options = {
    method: 'POST',
    url: 'https://transactions-api.mypos.com/v1.1/accounts/statement',
    headers: {
        'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
        'Content-Type': 'application/json',
        'API-Key': 'MY_API_KEY',
        'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4'
    },
    form: {
        document_type: 1,
        account_number: '50710731642',
        date: '2020-01-11'
    }
};

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

});
<?php

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

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

$request->setPostFields(array(
  'document_type' => 1,
  'account_number' => '50710731642',
  'date' => '2020-01-11'
));

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

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

:20:200111
:25:50710731642
:28:601
:60F:C200309EUR12345,
:62F:C200309EUR12345,
:64:C200309EUR12345,