Skip to main content
POST
/
login
{
  "user_id": "42",
  "first_name": "John",
  "last_name": "Doe",
  "display_name": "John Doe",
  "role": "Customer",
  "avatar_urls": {
    "24": "https://secure.gravatar.com/avatar/example?s=24&d=mm&r=g",
    "48": "https://secure.gravatar.com/avatar/example?s=48&d=mm&r=g",
    "96": "https://secure.gravatar.com/avatar/example?s=96&d=mm&r=g"
  },
  "email": "john.doe@example.com",
  "extras": {},
  "dev_note": "Don't forget to store the users login information in order to authenticate all other routes with CoCart."
}

Body

application/json
username
string
required

Username or email address.

password
string
required

User password.

Response

User logged in successfully.

user_id
string

Unique ID of the user on the site.

first_name
string

The first name of the user (if any).

last_name
string

The last name of the user (if any).

display_name
string

The display name of the user (if any).

role
string

The role type assigned to the user.

avatar_urls
object

The avatar URLs of the user for each avatar size registered.

email
string

The email address of the user.

extras
object

Extra details added via the filter.

dev_note
string

A message to developers.

I