The customer profile is information related to customers, including basic information, membership class, customer's accumulated points...
Authenticated access scopes: loy.read_profiles
What you can do with the Customer Profile
The Haravan API lets you do the following with the Customer Profile resource.
- GET https://apis.haravan.com/loy/profiles.json Retrieves a list of all customer profiles.
- GET https://apis.haravan.com/loy/profiles/{profile_id}.json Retrieves single the customer profile.
- GET https://apis.haravan.com/loy/profiles/{profile_id}/tags.json Retrieves tags of customer.
- GET https://apis.haravan.com/loy/profiles/{profile_id}/attributes.json Retrieves attributes of customer.
Customer Profile properties
Endpoints
Retrieves a list of all customer profiles. You can filter resources by params.
since_id | Restrict results to after the specified ID |
fields | comma-separated list of fields to include in the response. |
phone | Restrict results by customer's phone. |
updated_at_min | Show customer profile last updated after date (format: 2021-10-20T14:07:45.084Z). |
updated_at_max | Show customer profile last updated befor date (format: 2021-10-20T14:07:45.084Z). |
page | Page to show the result.. |
limit | integer ≤ 50 default 20 The maximum number of results to show on a page. |
Retrieves a list of all customer profiles by first page.
GET https://apis.haravan.com/loy/profiles.json?page=1&limit=10
HTTP/1.1 200 OK
{ "profiles": [ { "id": 360455, "first_name": "", "last_name": "test", "gender": "unknown", "birthday": null, "profile_card_number": "100006037116", "phone": "", "email": "customerkh@gmail.com", "address": "", "country_code": "vn", "country_name": "Vietnam", "province_code": "", "province_name": "", "district_code": "", "district_name": "", "ward_code": "", "ward_name": "", "point_used": 900, "point_available": 6100, "point_ranking": 10350, "point_incoming": 0, "level_id": 2106, "level_name": "Member", "total_spent": 1035000, "total_order": 6, "status": "enabled", "last_order_at": "2020-05-08T04:08:06.000000Z", "created_at": "2020-04-15T09:28:57.000000Z", "updated_at": "2020-07-21T08:33:36.000000Z" } ] }
Retrieves single the customer profile.
GET https://apis.haravan.com/loy/profiles/360455.json
HTTP/1.1 200 OK
{ "profile": { "id": 360455, "first_name": "", "last_name": "test", "gender": "unknown", "birthday": null, "profile_card_number": "100006037116", "phone": "", "email": "customerkh@gmail.com", "address": "", "country_code": "vn", "country_name": "Vietnam", "province_code": "", "province_name": "", "district_code": "", "district_name": "", "ward_code": "", "ward_name": "", "point_used": 900, "point_available": 6100, "point_ranking": 10350, "point_incoming": 0, "level_id": 2106, "level_name": "Member", "total_spent": 1035000, "total_order": 6, "status": "enabled", "last_order_at": "2020-05-08T04:08:06.000000Z", "created_at": "2020-04-15T09:28:57.000000Z", "updated_at": "2020-07-21T08:33:36.000000Z" } }
Retrieves tags of customer.
GET https://apis.haravan.com/loy/profiles/360455/tags.json
HTTP/1.1 200 OK
{ "profile": { "tags": "MUA_HANG_KM,Online,Facebook" } }
Retrieves attributes of customer.
Retrieves attributes of customer.
GET https://apis.haravan.com/loy/profiles/360455/attributes.json
HTTP/1.1 200 OK
{ "profile": { "attributes": [ { "id": 1210, "key": "ref_id", "value": "1010" }, { "id": 1211, "key": "customer_level_prev_id", "value": "2991" } ] } }