Skip to main content

Record user properties

Records or updates user properties to enable personalized experiences and cohort analysis on the BIK dashboard.

Store detailed user attributes to drive data-informed strategies. This endpoint supports bulk operations and validates each property entry individually, returning any invalid entries in the response.

Request parameters

NameTypeRequired/OptionalDescription
userPropertiesUserProperty[]RequiredArray of user property objects. Check the UserProperty type here

Request Information

CategoryValue
Http requestPOST
URLhttps://bikapi.bikayi.app/integrations/bikPlatformFunctions-createOrUpdateUserProperties
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-createOrUpdateUserProperties' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"userProperties": [
{
"phoneNumber": "9090909090",
"email": "mark@bik.ai",
"firstName": "Test",
"lastName": "2"
},
{
"phoneNumber": "9090909010",
"emial": "mark2@bik.ai",
"firstName": "Test2",
"lastName": "4"
}
]
}'

JSON response example:

{
"status": 200,
"data": {
"invalidUserProperties": [
{
"phoneNumber": "9090909010",
"emil": "mark2@bik.ai",
"firstName": "Test2",
"lastName": "4",
"storeId": "p60HYv5wjgQaOrPdqT5NjbpkroD2",
"customerId": "5242031",
"error": "ValidationError: \"emil\" is not allowed"
}
],
"bulkUpsertUPResponse": {
"createCount": 0,
"updateCount": 1,
"docsFailedToUpdate": []
}
}
}

Response parameters

NameTypeDescription
statusbooleanHTTP status code
dataRecordUserPropertiesResponse containing upsert results and any invalid entries

UserProperty Type

NameTypeRequired/OptionalDescription
firstNamestringRequiredUser first name
lastNamestringRequiredUser last name
sourcestringOptionalData source identifier
phoneNumberstringOptionalPhone number
alternatePhoneNumberstringOptionalAlternate phone number
emailstringOptionalEmail address
address1stringOptionalAddress line 1
address2stringOptionalAddress line 2
citystringOptionalCity
statestringOptionalState or province
countrystringOptionalCountry
createdAtDate/stringOptionalCreation timestamp
updatedAtDate/stringOptionalLast update timestamp
emailMarketingConsentbooleanOptionalWhether the user has consented to email marketing
smsMarketingConsentbooleanOptionalWhether the user has consented to SMS marketing
tagsstring[]OptionalTags associated with the user
partnerCustomerIdstringOptionalPartner platform customer ID

RecordUserProperties Type

NameTypeDescription
bulkUpsertUPResponseBulkUpsertUPResponseSummary of the bulk upsert operation
invalidUserPropertiesUserProperty[]Array of user property entries that failed validation

BulkUpsertUPResponse Type

NameTypeDescription
createCountnumberNumber of user properties created
updateCountnumberNumber of user properties updated

Errors

Error CodeMeaning
400Invalid payload -- Your request is invalid.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal Server Error -- We had a problem with our server. Try again later.