Customer Details
This API provides the specific Customer Details.
GET
{{Base_url}}/rest/V1/customers/me
This cURL request fetches the current logged-in customer’s details in a Magento store by using the Magento REST API.
curl --location --request GET '{{Base_url}}/rest/V1/customers/me' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjIxMDAyNywidXR5cGlkIjozLCJpYXQiOjE3Mzc2Mjg1ODksImV4cCI6MTczNzYzMjE4OX0._KjZTXSeh3HFdFbIN1P456gEXB9feuoio10VEfVIK5s' \
--header 'Cookie: PHPSESSID=2639naaq26nbe7st472kk4ms4i' \
--data '
'
Response
{
"id": 210027,
"group_id": 1,
"default_billing": "18102",
"default_shipping": "18102",
"created_at": "2024-05-28 08:16:06",
"updated_at": "2025-01-21 13:00:40",
"created_in": "Default Store View",
"email": "qa@zrpl.co.in",
"firstname": "qa",
"lastname": "qa",
"gender": 0,
"store_id": 1,
"website_id": 1,
"addresses": [
{
"id": 18102,
"customer_id": 210027,
"region": {
"region_code": "AP",
"region": "Andhra Pradesh",
"region_id": 534
},
"region_id": 534,
"country_id": "IN",
"street": [
"hsr",
"banglore"
],
"telephone": "1234567890",
"postcode": "535101",
"city": "VIZIANAGARAM",
"firstname": "second",
"lastname": "qa",
"default_shipping": true,
"default_billing": true
},
{
"id": 18145,
"customer_id": 210027,
"region": {
"region_code": "KA",
"region": "Karnataka",
"region_id": 549
},
"region_id": 549,
"country_id": "IN",
"street": [
"test",
"qaqa"
],
"telephone": "1234567890",
"postcode": "560034",
"city": "BENGALURU URBAN",
"firstname": "Surya",
"lastname": "qa"
}
],
"disable_auto_group_change": 0,
"extension_attributes": {
"is_subscribed": false
},
"custom_attributes": [
{
"attribute_code": "reward_balance",
"value": "0"
},
{
"attribute_code": "reward_amount",
"value": "0"
},
{
"attribute_code": "isautocreated",
"value": "0"
},
{
"attribute_code": "mobile_number",
"value": "1234567890"
},
{
"attribute_code": "monthly_purchase_cap",
"value": "2993"
}
]
}
Top-Level Attributes
id
:The unique identifier for the customer in the Magento database.
Example:
210027
group_id
:Refers to the group this customer belongs to.
Example:
1
(Typically "General" group in Magento).
default_billing
:The ID of the customer's default billing address.
Example:
"18102"
default_shipping
:The ID of the customer's default shipping address.
Example:
"18102"
created_at
:The date and time the customer account was created.
Example:
"2024-05-28 08:16:06"
updated_at
:The date and time the customer's details were last updated.
Example:
"2025-01-21 13:00:40"
created_in
:The store view in which the customer account was created.
Example:
"Default Store View"
email
:The customer's email address.
Example:
"qa@zrpl.co.in"
firstname
:The customer's first name.
Example:
"qa"
lastname
:The customer's last name.
Example:
"qa"
gender
:The customer's gender. The value
0
often means unspecified.Example:
0
store_id
:The store ID the customer belongs to.
Example:
1
website_id
:The website ID where the customer is registered.
Example:
1
Addresses
This is an array of address objects representing the customer's saved addresses.
Address 1
id
: Unique identifier for the address (e.g.,"18102"
).customer_id
: Customer ID associated with this address (e.g.,210027
).region
: Contains the region details:region_code
:"AP"
(Andhra Pradesh)region
:"Andhra Pradesh"
region_id
:534
(Region ID)
country_id
: Country code (e.g.,"IN"
for India).street
: Array of street address lines (e.g.,["hsr", "banglore"]
).telephone
: Contact phone number (e.g.,"1234567890"
).postcode
: Postal code (e.g.,"535101"
).city
: City name (e.g.,"VIZIANAGARAM"
).firstname
andlastname
: First and last name for this address.default_shipping
anddefault_billing
: Indicates if this address is the default shipping or billing address (true in this case).
Address 2
This address follows the same structure but contains different values, such as:
City:
"BENGALURU URBAN"
Region:
"Karnataka"
(withregion_code
"KA"
)Street:
["test", "qaqa"]
Name:
"Surya qa"
Other Attributes
disable_auto_group_change
:Indicates whether auto group change for the customer is disabled.
Example:
0
(not disabled).
extension_attributes
:Contains additional attributes:
is_subscribed
: Indicates if the customer is subscribed to the newsletter.Example:
false
custom_attributes
:An array of custom attributes associated with the customer:
reward_balance
: Current reward points balance (e.g.,"0"
).reward_amount
: Reward amount in currency (e.g.,"0"
).isautocreated
: Indicates if the account was auto-created (e.g.,"0"
).mobile_number
: Customer's mobile number (e.g.,"1234567890"
).monthly_purchase_cap
: Monthly purchase cap for the customer (e.g.,"2993"
).
Last updated