Create New User

Sign up a new user by using information such as email, first name, last name, birthday, anniversary, password, etc. This will create/register the new user in the Punchh system.

NOTE

If the business is using a referral code, it is mandatory to pass the first_name and last_name of the guest as the referral code will be generated from first_name, last_name, and some random characters. Also, if you do not pass the first_name or the last_name, the API response may be delayed or time out.

Using Referral Code As Invite Code in the Sign-up Process

When a user signs up using the Create New User API, the API returns a referral code within the user object. The user can share this code with non-loyalty users to invite them to join the business loyalty program.

When a referred user signs up and enters the shared referral code, this referral_code must be passed in the invite_code request parameter when calling the Create New User API.

Headers
  • 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.

  • x-pch-digest
    Type: string
    required

    The signature for the API call

Body
application/json
  • client
    Type: string
    required

    Client key of the business

  • user
    Type: object
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/auth/customers.json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/customers.json \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --data '{
  "user": {
    "email": "test@example.com",
    "first_name": "FIRST_NAME_GOES_HERE",
    "last_name": "LAST_NAME_GOES_HERE",
    "password": "PASSWORD_GOES_HERE",
    "birthday": "1992-10-03",
    "anniversary": "1996-10-03",
    "phone": "1111111111",
    "terms_and_conditions": true,
    "send_compliance_sms": true,
    "external_source": "SOURCE_GOES_HERE",
    "external_source_id": "SOURCE_ID_GOES_HERE",
    "signup_channel": "WebEmail",
    "gender": "male",
    "city": "Mountain View",
    "secondary_email": "test@example.com",
    "state": "California",
    "zip_code": "30201",
    "invite_code": "INVITE_CODE_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": "User",
  "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": {},
  "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
}