GET
/
v2.01
/
{ClientId}
/
events
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $response = $api->Events->GetAll();

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
[
    {
        "ResourceId": "144085929",
        "EventType": "UBO_DECLARATION_CREATED",
        "Date": 1655891453
    },
    {
        "ResourceId": "144086566",
        "EventType": "KYC_CREATED",
        "Date": 1655891893
    }
]  

NoteEvents are returned up to 45 days after they occur. Any request attempting to access an event older than 45 days will result in an HTTP 400 - error.

Query parameters

EventType
string
required
Allowed values: An EventType listed in the event types listThe type of the event.
BeforeDate
Unix timestamp
The date before which the event was created (based on the event’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.
AfterDate
Unix timestamp
The date after which the event was created (based on the event’s CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.

Responses

[
    {
        "ResourceId": "144085929",
        "EventType": "UBO_DECLARATION_CREATED",
        "Date": 1655891453
    },
    {
        "ResourceId": "144086566",
        "EventType": "KYC_CREATED",
        "Date": 1655891893
    }
]  

<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $response = $api->Events->GetAll();

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}