Comment on page
Persons and Companies
Use Customer Data Platform to extend Identities.
After enabling Infobip CDP Extension you can start using fields
identity.person
and identity.company
. Orangepill Identity field | Infobip CDP field |
---|---|
person | id |
company | companyId |
id | externalId |
Two-way Identities and Persons syncronization process is executing in 3 steps.
Updating orphan Orangepill Identities with Infobip Persons.
Updating orphan Infobip Persons with Orangepill Identities.
Creating new Orangepill Identities.
Persons Sync results are sent to
user.channel.email
of User which started the process.To start Persons Sync process use endpoint
POST /v1/identities/persons/sync
.Scope | Parameter | Description |
---|---|---|
orangepill | country | Default country for new Identities. If not set realm.country is used. |
orangepill | currency | Default currency for new Identities. If not set realm.currency is used. |
infobip | limit | Number of results. |
infobip | page | Results page number. |
infobip | filter |
cURL
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/persons/sync' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json' \
--data-raw '{
"country": "HR",
"currency": "EUR",
"limit": "100",
"page": 2
}'
in response are queued task details.
Response
{
"name": "EventStarted",
"message": "Person sync is in processing pool.",
"code": 200,
"type": "persons.sync.started",
"data": {
"country": "HR",
"currency": "EUR",
"limit": "100",
"page": 2,
"owner": "6442b885880fc0254ad560e8"
}
}
Use endpoint
GET /v1/identities/persons?parameters
to retrieve list of Infobip CDP persons.Use Infobip Portal to create additional custom attributes and tags for Person profiles.
cURL
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/person' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"country": "US",
"currency": "USD",
"type": "person",
"alias": "PERSON_ALIAS",
"company": 3,
"person": {
"firstName": "Jane",
"lastName": "Smith",
"address": "67 Farringdon Road",
"city": "London",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com",
"tags":
[
"VIP Customers",
"New Customers"
],
"customAttributes":
{
"Contract Expiry": "2018-06-01",
"Company": "Acme",
"ShoppingCartList":
[
{
"productName": "Sneakers",
"productPrice": 25.33,
"productCategory": "Sport Sneakers",
"productImage": "/image1.png"
},
{
"productName": "T-Shirt",
"productPrice": 9.99,
"productCategory": "Casual",
"productImage": "/image2.png"
}
]
},
"contactInformation":
{
"phone":
[
{
"number": "41793026727"
}
],
"email":
[
{
"address": "[email protected]"
}
],
"push":
[
{
"applicationId": "FDCC8516470A3AE97FB8AC218D5D0D3D",
"registrationId": "c5db0c47-465c-4e1c-abf8-7cedc275dd19",
"additionalData":
{
"birthdate": "1988-07-31",
"email": "[email protected]",
"firstName": "Jane",
"gender": "F",
"lastName": "Smith",
"middleName": "Janie"
},
"systemData":
{
"cloudType": "GCM",
"registrationEnabled": true,
"sdkName": "MobileMessaging SDK",
"os": "Android"
}
}
],
"facebook":
[
{
"applicationId": "370329180020364",
"userId": "2094832040560427",
"systemData":
{
"gender": "female",
"lastName": "Smith",
"firstName": "Jane"
}
}
],
"line":
[
{
"applicationId": "1644264921",
"userId": "U045147f1ad961bfe996b72bbf417f3c9",
"systemData":
{
"displayName": "Jane Smith"
}
}
],
"instagram":
[
{
"applicationId": "17841446795352028",
"userId": "12461436693342628",
"systemData":
{
"displayName": "jane.smith"
}
}
],
"twitter":
[
{
"applicationId": "1148203323283877",
"userId": "370329180020364",
"systemData":
{
"displayName": "Jane Smith"
}
}
]
}
},
"data": {
"custom_field1": "custom_value1"
}
}'
in response is new person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"alias": "PERSON_ALIAS",
"company": "3",
"person": {
"firstName": "Jane",
"lastName": "Smith",
"address": "67 Farringdon Road",
"city": "London",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com",
"origin": "API",
"modifiedFrom": "API",
"tags":
[
"VIP Customers",
"New Customers"
],
"customAttributes":
{
"Contract Expiry": "2018-06-01",
"Company": "Acme",
"ShoppingCartList":
[
{
"productName": "Sneakers",
"productPrice": 25.33,
"productCategory": "Sport Sneakers",
"productImage": "/image1.png"
},
{
"productName": "T-Shirt",
"productPrice": 9.99,
"productCategory": "Casual",
"productImage": "/image2.png"
}
]
},
"contactInformation":
{
"phone":
[
{
"number": "41793026727"
}
],
"email":
[
{
"address": "[email protected]"
}
],
"push":
[
{
"applicationId": "FDCC8516470A3AE97FB8AC218D5D0D3D",
"registrationId": "c5db0c47-465c-4e1c-abf8-7cedc275dd19",
"additionalData":
{
"birthdate": "1988-07-31",
"email": "[email protected]",
"firstName": "Jane",
"gender": "F",
"lastName": "Smith",
"middleName": "Janie"
},
"systemData":
{
"cloudType": "GCM",
"registrationEnabled": true,
"sdkName": "MobileMessaging SDK",
"os": "Android"
}
}
],
"facebook":
[
{
"applicationId": "370329180020364",
"userId": "2094832040560427",
"systemData":
{
"gender": "female",
"lastName": "Smith",
"firstName": "Jane"
}
}
],
"line":
[
{
"applicationId": "1644264921",
"userId": "U045147f1ad961bfe996b72bbf417f3c9",
"systemData":
{
"displayName": "Jane Smith"
}
}
],
"instagram":
[
{
"applicationId": "17841446795352028",
"userId": "12461436693342628",
"systemData":
{
"displayName": "jane.smith"
}
}
],
"twitter":
[
{
"applicationId": "1148203323283877",
"userId": "370329180020364",
"systemData":
{
"displayName": "Jane Smith"
}
}
]
}
},
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
You can retrieve Person data either by calling
GET /v1/identities/:id/person
or by populating person field of Identity object using GET /v1/identities/:id?populate=person
.cURL
curl --location --request GET 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd?populate=person' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json' \
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": {
"firstName": "Jane",
"lastName": "Smith",
"address": "67 Farringdon Road",
"city": "London",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com",
},
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
POST /v1/identities/:id/person
to create new Person and assign it to existing identity. cURL
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "Jane",
"lastName": "Smith",
"address": "67 Farringdon Road",
"city": "London",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com"
}'
in response is new person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": {
"firstName": "Jane",
"lastName": "Smith",
"address": "67 Farringdon Road",
"city": "London",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com",
},
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
PATCH /v1/identities/:id/person/:person/assign
to map existing Person from Infobip CDP to existing Orangepill Identity.cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/255/assign' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
PATCH /v1/identities/:id/person/unassign
to unmap Infobip Person of Orangepill Identity.cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/unassign' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": null,
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
PATCH /v1/identities/:id/person
to update Person profile. cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": "129 Bethnel Road",
"city": "Manchester"
}'
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": {
"firstName": "Jane",
"lastName": "Smith",
"address": "129 Bethnel Road",
"city": "Manchester",
"country": "United Kingdom",
"gender": "FEMALE",
"birthDate": "1966-01-15",
"middleName": "Janie",
"profilePicture": "http://profile.com",
},
"data": {
"custom_field1": "custom_value1"
}
"created_at": "1519211809934",
"error": null
}
Use endpoint
DELETE /v1/identities/:id/person
to delete Person profile from Infobip People CDP. cURL
curl --location --request DELETE 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": null,
"data": {
"custom_field1": "custom_value1"
}
"created_at": "1519211809934",
"error": null
}
Use endpoint
GET /v1/identities/companies?parameters
to retrieve list of Infobip CDP companies.Use Infobip Portal to create additional custom attributes and tags for Company profiles.
Use endpoint
POST /v1/identities/company
to create new Company.cURL
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/companies' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Orangepill",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Agent Smith",
"customerStage": "Active",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes":
{
"Contract Expiry": "2025-06-01"
},
"domains":
[
"orangepill.cloud"
]
}'
in response is
Company
.Response
{
"createdAt": "2023-03-04T19:16:41",
"modifiedAt": "2023-03-04T19:16:41",
"id": 1,
"name": "Orangepill",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Agent Smith",
"customerStage": "Active",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes":
{
"Contract Expiry": "2025-06-01"
},
"domains":
[
"orangepill.cloud"
]
}
Use endpoint
PATCH /v1/identities/:id
to assign Company to Orangepill Identity.cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/255/assign' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"company": "3"
}'
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"company": "3",
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
PATCH /v1/identities/:id
with null
value in company
field to unassign Company to Orangepill Identity.cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/unassign' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"company": null
}'
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"company": null,
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
You can retrieve Company data either by calling
GET /v1/identities/:id/company
or by populating company field of Identity object using GET /v1/identities/:id?populate=company
. cURL
curl --location --request GET 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd?populate=company' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json' \
in response is person
Identity
.Response
{
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"company": {
"createdAt": "2023-03-04T19:16:41",
"modifiedAt": "2023-03-04T19:16:41",
"id": 1,
"name": "Orangepill",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Agent Smith",
"customerStage": "Active",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes":
{
"Contract Expiry": "2025-06-01"
},
"domains":
[
"orangepill.cloud"
]
},
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Use endpoint
PATCH /v1/identities/companies/:id
to update Company profile.cURL
curl --location --request PATCH 'https://api.orangepill.cloud/v1/identities/companies' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"customerStage": "Inactive"
}'
in response is updated Company.
Response
{
"createdAt": "2023-03-04T19:16:41",
"modifiedAt": "2023-03-04T19:16:41",
"id": 1,
"name": "Orangepill",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Agent Smith",
"customerStage": "Inactive",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes":
{
"Contract Expiry": "2025-06-01"
},
"domains":
[
"orangepill.cloud"
]
}
Use endpoint
DELETE /v1/identitites/companies/:id
to delete Company profile from Infobip People CDP. cURL
curl --location --request DELETE 'https://api.orangepill.cloud/v1/identities/companies/:id' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
in response is empty array.
Response
[]
Use endpoint
POST /v1/identitites/:id/person/event/:event
to send custom event to Infobip People CDP.cURL
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/event/addToCart' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"properties": {
"itemName": "Generic Shoes",
"itemId": 9473370,
"price": 56.324,
"quantity": 2,
"fromPromoCampaign": true,
"inStockSince": "2019-09-30T16:35:52.3616436+03:00",
"category": "Sneakers"
}
}
}
}'
in response are event details.
Response
{
"definitionId": "addToCart",
"personId": "[email protected]",
"personIdentifierType": "EMAIL",
"occurredTime": "2020-03-30T16:35:52.3617777+03:00",
"properties": {
"itemName": "Generic Shoes",
"itemId": 9473370,
"price": 56.324,
"quantity": 2,
"fromPromoCampaign": true,
"inStockSince": "2019-09-30T16:35:52.3616436+03:00",
"category": "Sneakers"
}
}
Last modified 3mo ago