Get
Use the Get Customer API to retrieve customer details.
info
Either partnerCustomerId or bikCustomerId must be provided; both cannot be empty at the same time.
Request parameters
| Name | Type | Required/Optional | Description |
|---|---|---|---|
partnerCustomerId | string | Optional | External customer ID |
bikCustomerId | string | Optional | BIK customer ID |
includeAssets | boolean | Optional | Include assets in the response |
includeAddress | boolean | Optional | Include addresses in the response |
includeTags | boolean | Optional | Include tags in the response |
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 | HTTP status code |
success | boolean | Indicates whether the request succeeded |
data | BikPlatformCustomer | Customer record |
BikPlatformCustomer Type
| Name | Type | Description |
|---|---|---|
partnerCustomerId | string | External customer ID |
firstName | string | Customer first name |
lastName | string | Customer last name |
phoneNumber | string | Customer phone number |
email | string | Customer email address |
addresses | BikPlatformAddress[] | Customer addresses |
assets | BikPlatformCustomerAssets[] | Customer assets |
BikPlatformAddress Type
| Name | Type | Description |
|---|---|---|
partnerAddressId | string | External address ID |
addressId | string | BIK address ID |
address1 | string | Primary address line |
address2 | string | Secondary address line |
city | string | City |
country | string | Country |
countryCode | string | Country code |
state | string | State or province |
stateCode | string | State or province code |
zip | string | Postal / ZIP code |
latitude | number | Address latitude |
longitude | number | Address longitude |
timezone | string | Address timezone |
firstName | string | First name |
lastName | string | Last name |
phoneNumber | string | Phone number |
email | string | Email address |
isDefault | boolean | Whether this is the default address |
BikPlatformCustomerAssets Type
Note:
These represent the customer's secondary email addresses and phone numbers.
| Name | Type | Description |
|---|---|---|
id | string | Asset ID |
createdAt | string | Asset creation timestamp |
assetName | string | Asset type (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"
}
]
}