Skip to main content

Get

You can use the get customer API to get the customer details.

info

Either partnerCustomerId or bikCustomerId must be provided; both cannot be optional at the same time.

Request parameters

NameTypeRequired/OptionalDescription
partnerCustomerIdstringOptionalCustomer id of the customer
bikCustomerIdstringOptionalBik customer id of the customer
includeAssetsbooleanOptionalAssets will be include in the customer details
includeAddressbooleanOptionalAddresses will be include in the customer details
includeTagsbooleanOptionalTags will be include in the customer details

Request Information

CategoryValue
Http requestPOST
URLhttps://bikapi.bikayi.app/integrations/bikPlatformFunctions-customers/get

Sample request

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-customers/get' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"partnerCustomerId": "abcd-122345",
"includeAssets": true,
"includeAddress": true
}'

JSON response example:

{
"status": 200,
"success": true,
"data": {
"customer": {
"id": 5482636,
"partnerCustomerId": "abcd-122345",
"firstName": "Test",
"lastName": "Last",
"phoneNumber": "+919090909090",
"email": "test.2@bik.ai",
"countryCode": "IND",
"createdAt": "2024-08-09T09:32:55.568Z",
"updatedAt": "2024-08-09T09:33:15.939Z",
"addresses": [
{
"partnerAddressId": "undefined",
"addressId": 142385,
"address1": "hsr layout",
"city": "bangalore",
"country": "India",
"countryCode": "IN",
"state": "karnataka",
"zip": "560102",
"isDefault": false
}
],
"assets": [
{
"id": 4516077,
"createdAt": "2024-08-09T09:32:55.583Z",
"assetName": "EMAIL",
"assetValue": "test.2@bik.ai",
"countryCode": null
},
{
"id": 4516079,
"createdAt": "2024-08-09T09:33:16.284Z",
"assetName": "PHONE_NUMBER",
"assetValue": "+919090909090",
"countryCode": "IND"
}
]
}
}
}

Response parameters

NameTypeDescription
statusnumberResponse status
successbooleanIs successful response or not
dataBikPlatformCustomerCustomer details

BikPlatformCustomer Type

NameTypeDescription
partnerCustomerIdstringCustomer id of the customer
firstNamestringFirst name of the customer
lastNamestringLast name of the customer
phoneNumberstringPhone number of the customer
emailstringEmail of the customer
addressesBikPlatformAddress[]Address of the customer
assetsBikPlatformCustomerAssets[]Assets of the customer

BikPlatformAddress Type

NameTypeDescription
partnerAddressIdstringPartner address id of the customer
addressIdstringAddress id of the customer
address1stringAddress1 of the customer
address2stringAddress2 number of the customer
citystringCity of the customer
countrystringCountry of the customer
countryCodestringCountry code of the customer
statestringState of the customer
stateCodestringState code of the customer
zipstringPincode of the customer
latitudenumberLatitude of the address mention
longitudenumberLongitude of the address mention
timezonestringTimezone of the address
firstNamestringFirst name of the customer
lastNamestringLast name of the customer
phoneNumberstringPhone number of the customer
emailstringEmail of the customer
isDefaultbooleanIs default address of the customer

BikPlatformCustomerAssets Type

Note:

These are secondary emails and secondary phone numbers of the customer.

NameTypeDescription
idstringID of the asset
createdAtstringAsset creation date
assetNamestringAsset name (PHONE_NUMBER or EMAIL)
assetValuestringAsset value (a valid phone number or email)
countryCodestringCountry code

Errors

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

Error response example:

{
"status": 400,
"errors": [
{
"message": "'bikCustomerId' is not allowed. 'partnerCustomerId' is not allowed"
}
]
}