To start using Persons and Companies profiles you must enable Infobip CDP Extension .
Fields mapping
After enabling Infobip CDP Extension you can start using fields identity.person
and identity.company
.
Orangepill Identity field
Infobip CDP field
Synchronize Orangepill and Infobip CDP
Two-way Identities and Persons syncronization process is executing in 3 steps.
Step 1
Updating orphan Orangepill Identities with Infobip Persons.
Step 2
Updating orphan Infobip Persons with Orangepill Identities.
Step 3
Creating new Orangepill Identities.
To start Persons Sync process use endpoint POST /v1/identities/persons/sync
.
Optional parameters
Scope
Parameter
Description
Default country for new Identities. If not set realm.country
is used.
Default currency for new Identities. If not set realm.currency
is used.
cURL
Copy 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
Copy {
"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"
}
}
List Infobip CDP Persons
Use endpoint GET /v1/identities/persons?parameters
to retrieve list of Infobip CDP persons.
Use Infobip URL parameters to filter results.
Create Person and Identity
Use endpoint POST /v1/identities/person to create new Infobip Person and Orangepill Identity.
cURL
Copy 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": "janewilliams@acme.com"
}
],
"push":
[
{
"applicationId": "FDCC8516470A3AE97FB8AC218D5D0D3D",
"registrationId": "c5db0c47-465c-4e1c-abf8-7cedc275dd19",
"additionalData":
{
"birthdate": "1988-07-31",
"email": "test@test.com",
"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
Copy {
"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": "janewilliams@acme.com"
}
],
"push":
[
{
"applicationId": "FDCC8516470A3AE97FB8AC218D5D0D3D",
"registrationId": "c5db0c47-465c-4e1c-abf8-7cedc275dd19",
"additionalData":
{
"birthdate": "1988-07-31",
"email": "test@test.com",
"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
}
Get Person
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
Copy 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
Copy {
"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
}
Create Person for existing Identity
Use endpoint POST /v1/identities/:id/person
to create new Person and assign it to existing identity.
cURL
Copy 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
Copy {
"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
}
Assign existing Person to existing Identity
Use endpoint PATCH /v1/identities/:id/person/:person/assign
to map existing Person from Infobip CDP to existing Orangepill Identity.
cURL
Copy 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
Copy {
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Unassign Person of Identity
Use endpoint PATCH /v1/identities/:id/person/unassign
to unmap Infobip Person of Orangepill Identity.
cURL
Copy 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
Copy {
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": null,
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Update Person
Use endpoint PATCH /v1/identities/:id/person
to update Person profile.
cURL
Copy 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
Copy {
"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
}
Delete Person
Use endpoint DELETE /v1/identities/:id/person
to delete Person profile from Infobip People CDP.
cURL
Copy 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
Copy {
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": null,
"data": {
"custom_field1": "custom_value1"
}
"created_at": "1519211809934",
"error": null
}
List Infobip CDP Companies
Use endpoint GET /v1/identities/companies?parameters
to retrieve list of Infobip CDP companies.
Use Infobip URL parameters to filter results.
Create Company
Use endpoint POST /v1/identities/company
to create new Company.
cURL
Copy 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
Copy {
"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"
]
}
Assign Company to Identity
Use endpoint PATCH /v1/identities/:id
to assign Company to Orangepill Identity.
cURL
Copy 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
Copy {
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"company": "3",
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Unassign Person of Identity
Use endpoint PATCH /v1/identities/:id
with null
value in company
field to unassign Company to Orangepill Identity.
cURL
Copy 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
Copy {
"id": "634b56217f6a7b0be52dffbd",
"owner": "6be52d34b56217fffbd6a7b0",
"country": "US",
"currency": "USD",
"type": "person",
"person": "255",
"company": null,
"data": {
"custom_field1": "custom_value1"
},
"created_at": "1519211809934",
"error": null
}
Get Company
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
Copy 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
Copy {
"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
}
Update Company
Use endpoint PATCH /v1/identities/companies/:id
to update Company profile.
cURL
Copy 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
Copy {
"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"
]
}
Delete Company
Use endpoint DELETE /v1/identitites/companies/:id
to delete Company profile from Infobip People CDP.
cURL
Copy
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.
Send Custom Person Events
Use endpoint POST /v1/identitites/:id/person/event/:event
to send custom event to Infobip People CDP.
cURL
Copy
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
Copy {
"definitionId": "addToCart",
"personId": "name@example.com",
"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"
}
}