People Monitoring REST - Implementation guide
Items endpoint will return: -
| Name | type | Description |
|---|---|---|
| RegisterId | URl part | |
| X-api-key | Custom HTTP header | Register API key, or valid ticket from Bisnode permission API |
| Content-Type | HTTP header | Application/JSON |
| action | Query string | Defined query type, this is the only mandatory parameter
|
| after | Query string, optional | If you want to prepare data after date you may use this. By default batch is prepare after last change that was delivered to you, no matter when you prepared batch. This means that by default you will get all changes just once. |
| batchId | Query string, optional | If you PrepareData and GetData as a separate batch as a separate batch you must use batch id returned by operateion in GetData query. |
Notice: VRK will bill every time customer check if there are changes. However, we want to prepare for errors and thus, we want to allow that customer can retrieve data many times without need to pay extra. Thus getting changes have two phases:
PrepareData creates a snapshot of the data.
GetData return lasts row of a snapshot per datasource, if allowed by datasource retention rules. I.e. customer can retrieve vrk changes for on month, and he does not need to pay extra.
PrepareAndGetData is combination of these two. It allows customer to prepare and get changes with one call. This option is created for sake of convenience-
GET people/register-monitor/v2/register/{register_id}/items?action=PrepareAndGetData Content-type: application/json x-api-key: {x-api-key}
Successful request and the API return results in JSON format.
{
"batchId": 2632,
"errors": [],
"rows": [
{
"errors": [],
"referencekey": "RefKey1",
"bisnodeid": "FI2101004055080",
"gedi": "A2YZ88G6C67N",
"vrk": {
"_rowtype": "Change",
"_lastchangedat": "2017-03-29T21:10:43.567Z",
"permanentaddr_addresstype": "domestic",
"firstnames": "Esko",
"lastname": "Esimerkki",
"permanentaddr_streetaddress": "Esimerkkitie 1234",
"permanentaddr_postcode": "12345",
"permanentaddr_postoffice": "ESIMEMERKKINIEMI",
"dateofdeath": null,
"permanentaddr_startdate": "2011-03-26T00:00:00Z",
"permanentaddr_municipalitycode": "263",
"permanentaddr_municipalityname": "Kiuruvesi",
"permanentaddr_countrycode_iso3165_numeric": "246",
"permanentaddr_countryname": "Finland",
"languagegroupcode": "Finnish",
"isunderaged": false
},
"original": {
"customer_datafield2": "CUSTOMER DATAFIELD 2",
"firstname": "Esko",
"lastname": "Esimerkki",
"postcode": "12345",
"streetaddress": "Esimerkkitie 1234"
}
}
]
}
PrepareData aggregate data from data sources. Then it creates a snapshot you can download (GetData). There are few things you should pay attention:
GetData returns a snapshot that you have prepared earlier.
PrepareAndGetData does first PrepareData and then GetData of the prepared batch. Things to take into account when you design the system: