- **[Address structure](https://developers.zignsec.com/references/legacy#addressmodel)**: Address structure format is used in many queries and responses.
- **[Identity structure](https://developers.zignsec.com/references/legacy#identitymodel)**: Our main ID data holder found in the responses from all of our eIDs products.
## Address
| | |
|---|---|
|PersonStatus|Normally blank, but can be set to ex Protected, Deceased, Immigrated, De-registered, where the rest of the fields will be blank.|
|FirstName||
|LastName||
|DateOfBirth|A string in the format YYYY-MM-DD. Only if delivered from an underlying search provider.|
|Gender|Sets the gender of searched person. `Female` or `Male`|
|PersonalNumber|Only if delivered from an underlying search provider.|
|Address|Most often the street name and number.|
|Address2|Most often empty. An extra address line to be used for example for c/o addresses.|
|PostalCode|This is the zip code. Most often a numeric string.|
|Location|Most often empty. This is an extra city locality field. Probably used in the United Kingdom.|
|City|Is often paired with the PostalCode.|
|CountryCode|Is always present. The two-letter ISO country code. Identifies the country of the address.|
|_DataSource|Meta field. For traceability this field shows the name of the external data service, where the information originated from.|
|_MatchLevel|Meta field. On search results. descriptive string that is set when the address are returned from a SearchPerson call. Sections are delimited with \|. This is a the degree of matching to the search query. Can be either HIGH, MEDIUM or LOW together with a percentage score. All rating score limits can be changed after specific customer requirements. Followed by subscore description.|
|_SortIndexAtSource|Meta field. Only for Search Results. Most often the search results at the underlying data provider are sorted in order of relevance. This is a field to keep that information.|
## Identity
| | |
|---|---|
|CountryCode|Always present. Indicates the country the identification is performed in.|
|FirstName|Always present.|
|LastName|Always present.|
|DateOfBirth|Always present. In the format YYYY-MM-DD|
|PersonalNumber|Availability depends on the underlying identity provider in the respective country. In Denmark (NemID) and Norway (BankID) it is normally not delivered.|
|IdProviderName|IDP data. ZignSec´s name of the underlying identity provider, for example NemID, BankIDSE, BankIDNO or BankLogin.|
|IdentificationDate|IDP data. A datetime for when the identification took place.|
|IdProviderRequestId|IDP data. A provider specific unique identifier for the transaction, if available. (for traceability)|
|IdProviderPersonId|IDP data. A provider specific unique identifier for the person identified, if available. (for traceability) Here is for example the Danish PID put, a technical CPR substitute that it not as integrity restricted as the CPR number in the NemID service.|
|IdProviderAuthenticity|IDP data. A values showing the authenticity of the Identity details. Returning the values: HIGH, MEDIUM, LOW and NOT_SET. Not always used.|
## JavaScript Events with postMessage
When our browser-based eID workflows are run in an HTML `iframe`, it is good to set up an event listener on the parent window, to get a JS-event notification when the login workflow is completed either with a success or an error.
See [MDN Mozilla Developer Network – Window.postMessage()](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
The event.data contains an object as below, where `command` will always be set to ‘zignsec_postback’.
### Setup Eventlistener
HTML and Javascript example:
```html
<div id="event_response">Javascript Event Response: NOEVENT</div>
<br>
<div class="row">
<script type="text/javascript">
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event)
{
var response = event.data;
document.getElementById('event_response').innerText = "Javascript Event Response: " + response;
}
</script>
</div>
```
### Event Data Returned on Cancelled Login
Json example:
```json
{
"command":"zignsec_postback",
"errorcode":"USER_CANCEL",
"error":"Action cancelled",
"token":"a54330cd-90dc-41f8-bcd5-22d87701d876"
}
```