The API provides results asynchronously. When
financings are registered the matching process
may take a few seconds to complete depending on
the system load and size of your requests. In
order to track when registrations and status
changes have completed, the
GET /activity
end-point can be used
instead of having to poll individual request
IDs.
By polling the /activity
end-point you will receive all the latest
activity in one query, which can then be
followed up by a GET
request to the
/status
or
/financing-validation-requests
for
the specific record which received an update or
result.
The /activity
end-point provides
query parameters to filter the results by time
with a before
and
after
timestamp. Clients are
encouraged to poll this end-point with the
after
query parameter populated
with the timestamp of the last received or
processed event, and the before
parameter omitted. This will limit the results
to events which have not yet been viewed or
processed by your organization so that it does
not matter if your polling periods are
inconsistent or temporarily halted.
The /activity
end-point should
be used for continuous polling to discover when
changes occur to any transaction registered by
the organisation. This can happen outside the
flow initiated by the registering organisation
since another organisation could subsequently
register a duplicate (see the second diagram
below for an example of this).
curl --location --request GET 'https://api.securefinancing.com/v1/activity?after=2021-11-18T11:08:23.003Z&limit=1000&offset=0' \
'Authorization: Bearer token' --header
var request = require("request");
var options = {
method: "GET",
url: "https://api.securefinancing.com/v1/activity?after=2021-11-18T11:08:23.003Z&limit=1000&offset=0",
headers: {
Authorization: "Bearer token",
,
};
}request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
; })
import requests
= "https://api.securefinancing.com/v1/activity?after=2021-11-18T11:08:23.003Z&limit=1000&offset=0"
url
={}
payload= {
headers 'Authorization': 'Bearer token'
}
= requests.request("GET", url, headers=headers, data=payload)
response
print(response.text)
= new OkHttpClient().newBuilder()
OkHttpClient client .build();
Request request = new Request.Builder()
.url("https://api.securefinancing.com/v1/activity?after=2021-11-18T11:08:23.003Z&limit=1000&offset=0")
.method("GET", null)
.addHeader("Authorization", "Bearer token")
.build();
Response response = client.newCall(request).execute();
After submitting your request you should
receive a 200
success response.
200
{ "links": [ { "href": "https://developer.swift.com/api/v1/activity?limit=20,offset=40", "rel": "self", "type": "GET" }, { "href": "https://developer.swift.com/api/v1/activity?limit=20,offset=0", "rel": "first", "type": "GET" }, { "href": "https://developer.swift.com/api/v1/activity?limit=20,offset=60", "rel": "next", "type": "GET" }, { "href": "https://developer.swift.com/api/v1/activity?limit=20,offset=20", "rel": "previous", "type": "GET" }, { "href": "https://developer.swift.com/api/v1/activity?limit=20,offset=80", "rel": "last", "type": "GET" } ], "events": [ { "event_identification": "38b222e2-19d7-417f-b84b-a72da118287f", "event_date_time": "2021-03-29T11:01:43.000Z", "pool_identification": "POOL-1234", "submitter_batch_identification": "BATCH-1234", "batch_identification": "b56cfee7-1a0a-49ba-9260-aeff4fd537c7", "submitter_data_set_identification": "FIN-1234", "data_set_identification": "8ecef726-f12e-40b9-9722-8878a8d33bc5", "request_identifications": [ "9ef2ee9c-a2b7-49bc-a5a9-ef65b4972eab", "0341ef0c-4da5-4fb6-b6fc-db5f0efb42dd" ], "event_details": [ { "service_name": "FING_duplicate_financing_check", "status": "DFIN" }, { "service_name": "DDOC_duplicate_document_check", "registered_document_identification": "b1b44706-4fc6-4fb3-93de-0fb4846e9c84", "status": "EXCT" } ] } ] }