Customer Login
POST
/store/authLog a customer in and includes the Cookie session in the response header. The cookie session can be used in subsequent requests to authenticate the customer. When using Medusa's JS or Medusa React clients, the cookie is automatically attached to subsequent requests.
Request
The Customer's email.
The Customer's password.
{
"email": "string",
"password": "string"
}
Request samples
Responses
A customer can make purchases in your store and manage their profile.
The customer's ID
The customer's email
The customer's first name
The customer's last name
The customer's billing address ID
The customer's phone number
Whether the customer has an account or not
The date with timezone at which the resource was created.
The date with timezone at which the resource was updated.
The date with timezone at which the resource was deleted.
The details of the orders this customer placed.
An optional key-value map with additional details
The customer groups the customer belongs to.
The details of the shipping addresses associated with the customer.
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
{
"customer": {
"id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"email": "user@example.com",
"first_name": "Arno",
"last_name": "Willms",
"billing_address_id": "addr_01G8ZH853YPY9B94857DY91YGW",
"phone": 16128234334802,
"has_account": false,
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z",
"deleted_at": "2019-08-24T14:15:22.123Z",
"orders": [
{}
],
"metadata": {
"car": "white"
},
"groups": [
{
"id": "cgrp_01G8ZH853Y6TFXWPG5EYE81X63",
"name": "VIP",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z",
"deleted_at": "2019-08-24T14:15:22.123Z",
"customers": [
{}
],
"price_lists": [
{}
],
"metadata": {
"car": "white"
}
}
],
"shipping_addresses": [
{
"id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
"customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"customer": {},
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"province": "Kentucky",
"postal_code": 72093,
"phone": 16128234334802,
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z",
"deleted_at": "2019-08-24T14:15:22.123Z",
"country_code": "st",
"metadata": {
"car": "white"
},
"country": {
"id": 109,
"name": "ITALY",
"display_name": "Italy",
"region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
"region": {},
"iso_2": "it",
"iso_3": "ita",
"num_code": 380
}
}
],
"billing_address": {
"id": "addr_01G8ZC9VS1XVE149MGH2J7QSSH",
"customer_id": "cus_01G2SG30J8C85S4A5CHM2S1NS2",
"customer": {},
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"province": "Kentucky",
"postal_code": 72093,
"phone": 16128234334802,
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z",
"deleted_at": "2019-08-24T14:15:22.123Z",
"country_code": "st",
"metadata": {
"car": "white"
},
"country": {
"id": 109,
"name": "ITALY",
"display_name": "Italy",
"region_id": "reg_01G1G5V26T9H8Y0M4JNE3YGA4G",
"region": {},
"iso_2": "it",
"iso_3": "ita",
"num_code": 380
}
}
}
}