Log in With Email and Password

Log in a user with the user's email address and password information.

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • User-Agent
    Type: string
    required

    For details, see User Agent.

Body
application/json
  • client
    Type: string
    required

    Client key of the business

  • user
    Type: object
    required
Responses
  • application/json
  • application/json
  • 412

    { "Invalid Signature" }

  • 422

    { Sending invalid Entity }

Request Example for post/api/auth/customers/sign_in
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/customers/sign_in \
  --request POST \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --data '{
  "user": {
    "email": "test@example.com",
    "password": "PASSWORD_GOES_HERE",
    "age_verified_status": true
  },
  "client": "CLIENT_GOES_HERE"
}'
{
  "address_line1": "ADDRESS_GOES_HERE",
  "anniversary": null,
  "avatar_remote_url": null,
  "birthday": null,
  "city": "",
  "created_at": "2016-10-10T07:19:19Z",
  "email": "test@example.com",
  "email_verified": false,
  "fb_uid": "",
  "first_name": "FIRST_NAME_GOES_HERE",
  "gender": "",
  "id": 111111111,
  "last_name": "LAST_NAME_GOES_HERE",
  "state": "",
  "updated_at": "2017-10-11T16:03:19Z",
  "zip_code": "25110",
  "allow_multiple": true,
  "authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
  "favourite_locations": "308052",
  "favourite_store_numbers": "2310",
  "marketing_email_subscription": true,
  "marketing_pn_subscription": true,
  "passcode_configured": false,
  "profile_field_answers": {
    "children": "0",
    "dish": "Pizza"
  },
  "referral_code": "REFERRAL_CODE_GOES_HERE",
  "referral_path": "URL_GOES_HERE",
  "secondary_email": "",
  "terms_and_conditions": false,
  "title": "",
  "user_as_barcode": "1111111",
  "user_as_qrcode": "QR_CODE_GOES_HERE",
  "user_code": "P11111111",
  "user_id": 111111111,
  "user_relations": [],
  "wants_menu_notifications": false,
  "work_zip_code": null,
  "mindbody_client_id": null,
  "preferred_locale": "en",
  "phone": "",
  "migrate_status": false,
  "email_unsubscribe": false,
  "allow_push_notifications": true,
  "facebook_signup": false,
  "communicable_email": "test@example.com",
  "access_token": null,
  "expiration_date": "2018-07-31",
  "user_joined_at": "2022-11-01T19:17:44Z",
  "age_verified_status": true
}