Logs (CSV)
GEThttps://api.ideal-postcodes.co.uk/v1/keys/:key/lookups
Reports lookup information on a key for paid lookups.
This method requires a user_token
, which can be found on your accounts page.
A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
Download Usage History (CSV)
GET /keys/:key/lookups
Returns a CSV download of lookups performed and associated information.
Note that the Content-Type returned will be CSV (text/csv). For a non 200 response, the Content-Type
will revert to JSON with the error code and message embedded.
Data Redaction
Personally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.
By default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.
You may prevent PII collection altogether by setting the interval to 0
days.
Request
Path Parameters
API Key
The API Key to retrieve. Begins ak_
.
Query Parameters
Private User Token
A secret key used for sensitive operations on your account and API Keys.
Your user token can be retrieved and managed from your accounts page.
Typically beings uk_...
Possible values: >= 0
Start Timestamp
A start date/time in the form of a UNIX Timestamp in milliseconds. E.g. 1418556452651
Possible values: >= 0
End Timestamp
An end date/time in the form of a UNIX Timestamp in milliseconds. E.g. 1418556477882
Licensee Key
Uniquely identifies a licensee.
Responses
- 200
- 400
Success
- text/csv
- Schema
- Example (auto)
- Example
Schema
Success
"string"
2015-02-21T16:05:22.991Z,82.85.128.18,SW12AA,https://www.example.com/,Postcode Lookup,
2015-02-21T16:05:38.298Z,82.85.128.18,10 Downing Street London,https://www.example.com/,Address Lookup,CRM
2015-02-21T16:06:49.227Z,82.85.128.18,OX44PP,https://www.example.com/,Postcode Lookup,"Website,Live"
2015-02-21T16:07:02.706Z,82.85.128.18,PL9 9HE,https://www.example.com/,Postcode Lookup,
Bad Request
- application/json
- Schema
- Example (auto)
Schema
400X
type error response code
Bad request error description
errors object[]
{
"code": 0,
"message": "string",
"errors": [
{
"message": "should have required property 'type'",
"path": ".query.type",
"errorCode": "required.openapi.validation"
}
]
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.ideal-postcodes.co.uk/v1/keys/:key/lookups");
request.Headers.Add("Accept", "text/csv");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());