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
Name | Type | Required/Optional | Description |
---|---|---|---|
partnerCustomerId | string | Optional | Customer id of the customer |
bikCustomerId | string | Optional | Bik customer id of the customer |
includeAssets | boolean | Optional | Assets will be include in the customer details |
includeAddress | boolean | Optional | Addresses will be include in the customer details |
includeTags | boolean | Optional | Tags will be include in the customer details |
Request Information
Category | Value |
---|---|
Http request | POST |
URL | https://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
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
data | BikPlatformCustomer | Customer details |
BikPlatformCustomer Type
Name | Type | Description |
---|---|---|
partnerCustomerId | string | Customer id of the customer |
firstName | string | First name of the customer |
lastName | string | Last name of the customer |
phoneNumber | string | Phone number of the customer |
email | string | Email of the customer |
addresses | BikPlatformAddress[] | Address of the customer |
assets | BikPlatformCustomerAssets[] | Assets of the customer |
BikPlatformAddress Type
Name | Type | Description |
---|---|---|
partnerAddressId | string | Partner address id of the customer |
addressId | string | Address id of the customer |
address1 | string | Address1 of the customer |
address2 | string | Address2 number of the customer |
city | string | City of the customer |
country | string | Country of the customer |
countryCode | string | Country code of the customer |
state | string | State of the customer |
stateCode | string | State code of the customer |
zip | string | Pincode of the customer |
latitude | number | Latitude of the address mention |
longitude | number | Longitude of the address mention |
timezone | string | Timezone of the address |
firstName | string | First name of the customer |
lastName | string | Last name of the customer |
phoneNumber | string | Phone number of the customer |
email | string | Email of the customer |
isDefault | boolean | Is default address of the customer |
BikPlatformCustomerAssets Type
Note:
These are secondary emails and secondary phone numbers of the customer.
Name | Type | Description |
---|---|---|
id | string | ID of the asset |
createdAt | string | Asset creation date |
assetName | string | Asset name (PHONE_NUMBER or EMAIL ) |
assetValue | string | Asset value (a valid phone number or email) |
countryCode | string | Country code |
Errors
Error Code | Meaning |
---|---|
400 | Invalid payload -- Your request is invalid. |
401 | Unauthorized -- User is not authenticated. |
404 | Not Found -- The specified API could not be found. |
406 | Customer not found -- Failed to get customer. |
500 | Internal 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"
}
]
}