Skip to main content
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

Array (Events)
array
The list of events created by the platform.
{
    "Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
    "Type": "param_error",
    "Id": "9fb282aa-7c7e-462c-9f5c-df5f8714b39f",
    "Date": 1715350291.0,
    "errors": {
        "AfterDate": "Events older than 45 days can not be searched",
        "BeforeDate": "Events older than 45 days can not be searched"
    }
}
[
    {
        "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);
}  
I