Pushing and merging identities
This example outlines pushing an identity server side to the Seeka API. This example demonstrates how to create and merge an identity, manage privacy consent state and retrieve a Seeka Profile ID that can be used to resolve the identity in future.
Organisation ID and public key can be retrieved from the Seeka app. The public key is Seeka brand specific.
Considerations for software vendors: The organisation ID and public key provided in your request will linked to the Seeka brand you are sending data on behalf of.
Specifying the request source
Software integrators pushing identities server side should include the src object to describe where the identity originally came from, so the request is classified and attributed correctly.
| Property | Description |
|---|---|
method | The mechanism used to deliver the request. Use http when integrating with the HTTP API. |
loc | URL of the page the identity was captured on, for example the checkout or signup page. |
origin | Must be set to the constant value server when firing server side. This tells Seeka the request was fired from a server rather than a browser, so the request context of your server (IP address, user agent) is not treated as the customer's browser context. |
time | ISO formatted time the identity was captured. If omitted, the time Seeka received the request is used. |
Important: when firing server side, always set
originto the constant valueserver.
Pushing an identity to Seeka
| Token | Required | Description | Example |
|---|---|---|---|
<organisation ID> | Yes | Your organisation ID or the organisation ID of the Seeka organisation you are sending data on behalf of | |
<public key> | Yes | Your public key or the public key of the Seeka brand you are sending data on behalf of | |
<seeka profile ID> | Seeka profile ID retrieved from the browser SDK. See retrieving the SeekaPId. Highly recommended | sk.1.1709215400100.4182463348 | |
<integration version> | Version of your software build or the version of your integration. | 1.0.0 | |
<integration name> | Name of your software or the name of your integration. | ticketsaurus | |
<TCF consent> | TCF v2.2 consent string that will replace the existing consent for the identity. | See privacy SDK for formatting and requirements | |
<source URL> | URL of the page the identity was captured on, for example the checkout or signup page. See Specifying the request source below. | https://tickets.yourticketingplatform.com/event/summer-music-festival | |
<identity time> | ISO formatted time the identity was captured. If omitted, the time Seeka received the request is used. | 2025-02-24T14:15:22Z |
const axios = require('axios');async function sendIdentityToSeeka(data) {try {// Headersconst headers = {"Content-Type": "application/json","X-OrgId": "<organisation ID>","X-Converge-Key": "<public key>","X-Sdk-Client-Version": "<integration version>","X-Sdk-Client-Type": "<integration name>/server"};const response = await axios({url: 'https://router.seeka.services/api/identity',method: 'POST',data: data,headers: headers});if(response.status !== 200) {console.error('Unexpected response code when trying to send identity to Seeka', response.status);}else {console.log('Completed send identity to Seeka');}}catch (error) {console.error('Error when attempting to send identity to Seeka', error);}}// Create identityconst identity = {"id": {"seekaPId": "<seeka profile ID>","email": ["jane.doe@gmail.com"],"phone": ["+61422333444"],"firstName": ["Jane"],"lastName": ["Doe"],"address": [{"addressLine1": "Shop 6","addressLine2": "2500 Gold Coast Hwy","locality": "Mermaid Waters","state": "Queensland","stateCode": "QLD","postcode": "4218","country": "Australia","countryCode": "AU"}],"dob": ["1991-04-24"],"privacy": {"tcfConsentString": "<TCF consent>"}},"src": {"method": "http","loc": "<source URL>","origin": "server","time": "<identity time>"}};// Send identityawait sendIdentityToSeeka(identity);
Response
The API endpoint will return a response containing either the Seeka Profile/Person ID that was provided in the request or a new ID.
If the same details are provided to this endpoint that resolve back to the same identity, the ID returned by the endpoint becomes a part of the identity and ID graph for that identity.
The ID in the response cannot be relied on as a "lookup" for a profile however the ID can always be used to resolve the same identity and be relied on to attach activities to the profile.
{
"result": {
"personId": "sk.1.1629777826314.1255481207"
}
}