Login with email and password (public)

POST /auth/login

Login with email and password will return the complete ambassador and the Token

Headers

application/json

Body

Responses

POST /auth/login
curl \
 --request POST https://domain.tld/api/v2/auth/login \
 --header "Content-Type: application/json" \
 --header "X-Popsell-Domain: example.com" \
 --data '{"email":"string","password":"string"}'
Request examples
# Headers
X-Popsell-Domain: example.com

# Payload
{
  "email": "string",
  "password": "string"
}
Response examples (200)
{
  "user": {
    "id_ambassador": 42,
    "id_brand": 42,
    "date_insert": "string",
    "date_update": "string",
    "key_data": "string",
    "customer_id": "string",
    "broker_id": "string",
    "shopify_customer_id": "string",
    "facebook_id": "string",
    "google_id": "string",
    "apple_id": "string",
    "supervisor_identity": "string",
    "ambassador_id_referrer": "string",
    "id_ws": "string",
    "id_ws_referrer": "string",
    "image": "string",
    "gender": "string",
    "firstname": "string",
    "lastname": "string",
    "username": "string",
    "description": "string",
    "motivation_letter": "string",
    "email": "string",
    "email_tmp": "string",
    "dob": "string",
    "lang": "string",
    "phone_1": "string",
    "phone_2": "string",
    "notification_newsletter": true,
    "notification_pl_created": true,
    "notification_pl_expired": true,
    "notification_pl_order": true,
    "notification_pl_blog": true,
    "notification_post_comment": true,
    "notification_community": true,
    "notification_reward": true,
    "notification_browser_waiting_list": true,
    "email_notification_enabled": true,
    "browser_notification_enabled": true,
    "notification_tag": true,
    "notification_chat": true,
    "email_notification_delay": "string",
    "last_notification_date": "string",
    "notification_email_chat": true,
    "notification_email_favorite_comment": true,
    "notification_email_post_comment": true,
    "notification_email_reward": true,
    "notification_email_tag": true,
    "notification_post_community": true,
    "notification_email_post_community": true,
    "last_notification_flow": "string",
    "gamification_score": 42,
    "gamification_current_level": 42,
    "gamification_next_level": 42,
    "gamification_level_badge": "string",
    "gamification_level_label": "string",
    "gamification_id_level": "string",
    "gamification_current_level_value": 42,
    "gamification_points": 42,
    "last_date_gamification": "string",
    "optin_cgu": true,
    "optin_cgu_photos": true,
    "active": true,
    "status": 42,
    "unsubscribe": "string",
    "last_date_connection": "string",
    "activation_date": "string",
    "validate_date": "string",
    "availability": "string",
    "unavailable": true,
    "last_action_date": "string",
    "is_absent": true,
    "absent_msg": "string",
    "fb_account": "string",
    "twitter_account": "string",
    "instagram_account": "string",
    "linkedIn_account": "string",
    "youtube_account": "string",
    "register_src": "string",
    "register_landing_url": "string",
    "onboarding_sequence": "string",
    "social_community_display": true,
    "last_contact_import": "string",
    "sell_token_amount": "string",
    "products_purchased_limit": "string",
    "nb_public_popliste": "string",
    "nb_private_popliste": "string",
    "chat_topics": [
      42
    ]
  },
  "token": "string"
}
Response examples (401)
{
  "message": "Unauthorized."
}
{
  "message": "Invalid email or password"
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}