ZRPL
  • Welcome!
  • Quick Start
  • Reference
    • API Reference
      • Categories List
      • Category Details by ID
      • Create Simple Product
      • Config Product Creation
      • Product List
      • Update Existing Product
      • Product Details by SKU
      • Product Details by ID
      • Products in Category
      • Create Order
      • Order Details
      • Order History
      • Create Customer
      • Customer Token
      • Create Customer Cart
      • Add Item to Cart
      • View Cart
      • Update Cart
      • Delete Cart
      • Country Code
      • Set Shipping and Billing
      • Place Order
      • Customer Details
Powered by GitBook
On this page
  1. Reference
  2. API Reference

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"
        }
    ]
}
{
    "message": "The consumer isn't authorized to access %resources.",
    "parameters": {
        "resources": "self"
    }
}

Top-Level Attributes

  1. id:

    • The unique identifier for the customer in the Magento database.

    • Example: 210027

  2. group_id:

    • Refers to the group this customer belongs to.

    • Example: 1 (Typically "General" group in Magento).

  3. default_billing:

    • The ID of the customer's default billing address.

    • Example: "18102"

  4. default_shipping:

    • The ID of the customer's default shipping address.

    • Example: "18102"

  5. created_at:

    • The date and time the customer account was created.

    • Example: "2024-05-28 08:16:06"

  6. updated_at:

    • The date and time the customer's details were last updated.

    • Example: "2025-01-21 13:00:40"

  7. created_in:

    • The store view in which the customer account was created.

    • Example: "Default Store View"

  8. email:

    • The customer's email address.

    • Example: "qa@zrpl.co.in"

  9. firstname:

    • The customer's first name.

    • Example: "qa"

  10. lastname:

    • The customer's last name.

    • Example: "qa"

  11. gender:

    • The customer's gender. The value 0 often means unspecified.

    • Example: 0

  12. store_id:

    • The store ID the customer belongs to.

    • Example: 1

  13. 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

  1. id: Unique identifier for the address (e.g., "18102").

  2. customer_id: Customer ID associated with this address (e.g., 210027).

  3. region: Contains the region details:

    • region_code: "AP" (Andhra Pradesh)

    • region: "Andhra Pradesh"

    • region_id: 534 (Region ID)

  4. country_id: Country code (e.g., "IN" for India).

  5. street: Array of street address lines (e.g., ["hsr", "banglore"]).

  6. telephone: Contact phone number (e.g., "1234567890").

  7. postcode: Postal code (e.g., "535101").

  8. city: City name (e.g., "VIZIANAGARAM").

  9. firstname and lastname: First and last name for this address.

  10. default_shipping and default_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" (with region_code "KA")

  • Street: ["test", "qaqa"]

  • Name: "Surya qa"


Other Attributes

  1. disable_auto_group_change:

    • Indicates whether auto group change for the customer is disabled.

    • Example: 0 (not disabled).

  2. extension_attributes:

    • Contains additional attributes:

      • is_subscribed: Indicates if the customer is subscribed to the newsletter.

      • Example: false

  3. 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").

PreviousPlace Order

Last updated 4 months ago