Create New User
This API creates a new user account by using phone or email or card (at least one of them).
- Type: stringAuthorizationrequired
This is a combination of unique API key as well as business key (UUID) as the Authorization header.
For authentication, the location key token must be provided as a parameter.
Using a Loyalty Card
Card numbers are generated in the Punchh platform. By using a card, an end-user can earn loyalty without registering. A business usually distributes physical cards to end-users with a PIN. The cards are scanned by the barcode reader at the POS. Card numbers are usually 16 digits.
- Type: stringphonerequired
Phone number of the user. The phone number parameter accepts various formats, including 1111-111-111, 111-111-1111, or 1111111111.
- Type: stringaddress
_line1 Address of the user
- Type: booleanage
_verified _status Whether or not the user has undergone age verification by Koupon Media. Possible values: true, false. The parameter is accepted in the request if Koupon Media is selected as the age verification adapter for the business in the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration setting.
- Format: dateenumbirthdayconst:YYYY-MM-DD
Birth date of the user
values- Y
Y Y Y - M M - D D
- Type: stringcard
_number Loyalty card number of the user
- Type: stringcity
City in which the user lives
- Type: stringemail
Email address of the user
- Type: stringfavourite
_locations List of favorite locations of the end-user. You can fetch location_name and location_id from the Location Configuration API. The parameter accepts an empty value ("") for the blank favorite locations list.
- Type: stringfirst
_name First name of the user
- Type: stringgender
Gender of the user (i.e.,
male,female, ordeclined) - Type: stringlast
_name Last name of the user
- Type: booleansend
_compliance _sms Send true in order to trigger a compliance / opt-in SMS for the user. Possible values -
True,true,False,false. Bothterms_and_conditionsandsend_compliance_smsmust be set to "true" for the API to trigger a compliance (opt-in) SMS.
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/users \
--request POST \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"phone": "1111111111",
"email": "test@example.com",
"terms_and_conditions": true,
"send_compliance_sms": true,
"favourite_locations": "352704,359591",
"zip_code": 12344,
"birthday": "1999-01-01",
"gender": "male",
"marketing_email_subscription": true,
"age_verified_status": true
}'
{
"address_line1": null,
"anniversary": null,
"avatar_remote_url": null,
"birthday": "1999-01-01",
"city": null,
"created_at": "2020-10-06T14:59:18Z",
"email": "test@example.com",
"email_verified": false,
"fb_uid": null,
"first_name": "FIRST_NAME_GOES_HERE",
"age_verified": false,
"privacy_policy": false,
"gender": "male",
"id": 60389313,
"last_name": "LAST_NAME_GOES_HERE",
"state": null,
"updated_at": "2020-10-06T14:59:18Z",
"zip_code": "12344",
"balance": {
"banked_rewards": 0,
"membership_level": null,
"membership_level_id": null,
"net_balance": 0,
"net_debits": 0,
"pending_points": 0,
"points_balance": 0,
"signup_anniversary_day": "10/06",
"total_credits": 0,
"total_debits": "0.0",
"total_point_credits": 0,
"total_redeemable_visits": 0,
"expired_membership_level": null,
"total_visits": 0,
"initial_visits": 0,
"unredeemed_cards": 0
},
"user_digest": "USER_DIGEST_GOES_HERE",
"selected_card_number": null,
"selected_reward_id": null,
"selected_redeemable_id": null,
"rewards": [],
"discount_type": null,
"phone": "1111111111",
"age_verified_status": true
}