Customer Sign-Up Flow

If the existence check says the customer is new, register them.

Registration verifies the identifier the brand authenticates with. On an email brand the customer proves they own the email address by entering a one-time code sent to it; on a phone number brand the code goes to the phone by SMS. Everything else about the two flows is the same.

Choose the Sign-In method Provide the Main Identifier Provide The One time password Add Your Details
Choose-Signup-method Image
Main-Identifier Image
Provide-OTP Image
Add-Your-Details Image

Sign-up in a Brand that uses the Email customer authentication method

Start by sending the customer a one-time code. Pass their email to:

customers/passwordless-request

Request

Attribute Type Example Value Description
email varchar "john.doe@gmail.com" Customer's email address
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/passwordless-request",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "email": "john.doe@gmail.com"
   
  }
}

Response

{
  "status": "OK",
  "code": 200
}


Then register the account with the code and the customer's details:

customers/register

Request

Attribute Type Example Value Description
passwordless_email varchar "john.doe@gmail.com" Customer's email address
passwordless_code varchar "053631" One time password that was sent to customer's email
first_name varchar "John" Customer's first name
last_name varchar "Doe" Customer's last name
phone_number varchar (optional) "+15852826524" Can be required depending on the Brand's customer authentication type settings
optin_status_email tinyint (optional) 1 How the opt-in for marketing emails is handled depends on the Brand's opt-in settings. More information can be found in the "Opt-in" section of the 'How to view/edit basic information about my Brand' knowledge base article.
optin_status_sms tinyint (optional) 2 Customer's opt-in status for marketing SMS. Values: 1 confirmed, 2 disabled, 3 pending.
optin_status_pn tinyint (optional) 3 Customer's opt-in status for marketing push notifications. Values: 1 confirmed, 2 disabled, 3 pending.
demographics Demographic resource (optional) Can be required depending on the Brand's customer demographic data settings.
password varchar "Let!MeIn8410" Can be required depending on the Brand's customer authentication type settings. Brands whose customers also use the Punchh mobile app require it, because it becomes the password of the Punchh loyalty account.

A password must be:

  1. 8 to 25 characters long
  2. At least one number
  3. At least one capital letter
  4. At least one lowercase letter
  5. At least one special character other than &, *, : and ;
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/register",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "passwordless_email": "john.doe@gmail.com",
     "passwordless_code": "053631",
     "first_name": "John",
     "last_name": "Doe"
   
  }
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "customer_account": {
      "id": "0ff757dd-9b8a-4750-89ad-03ff531ae923",
      "type_id": 1,
      "reference_type": "CustomerAccount",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@gmail.com",
      "phone_number": "",
      "locale": "en-US",
      "state": 1,
      "demographics": [],
      "optin_status_email": 3,
      "optin_status_pn": 3,
      "has_pending_email_change": false,
      "has_pending_phone_number_change": false,
      "is_social": false,
      "social_login": null,
      "updated_at": "2023-08-24 15:33:27",
      "created_at": "2023-08-24 15:33:27"
    },
    "token": {
      "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZ2lzdGVyIiwiaWF0IjoxNjkyODkxMjA3LCJleHAiOjE2OTI4OTQ4MDcsIm5iZiI6MTY5Mjg5MTIwNywianRpIjoicjhmVE02cE80T3RwQ284dSIsInN1YiI6IjUwOTA5NjUiLCJwcnYiOiJjYzMyOTIxYTE1NDgwYTExN2Q5YmJjNzJjMGUxMjU2YTY4NTI0NThiIiwiYXBwbGljYXRpb25faWQiOjIwMTUsInNlc3Npb25faWQiOjI4MjU5fQ.OXwFMa_ci_6Q35hcYayQEq7_IV2zK5EC_WwaAf_DjQ8",
      "ttl": 60,
      "issued_token_type": "access_token",
      "token_type": "Bearer"
    },
    "dlc_access_token": null
  }
}

If the brand has the Unique phone number flag enabled in its email authentication settings, check that the phone number is not already taken before you send the registration request:

email_auth_configurations.jpg

customers/check-phone-number

Request

Attribute Type Example Value Description
phone_number varchar "+15852826524" Customer's phone number
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/check-phone-number",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "phone_number": "+15852826524"
   
  }
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "exists": false,
    "is_social": false
  }
}

After registration, record that the customer accepted the brand's Terms of Service and Privacy Policy on this device:

legal-agreement-acceptances

{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/legal-agreement-acceptances",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json",
    "Device-UUID": "1287796"
  }
  
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "legal_agreement_acceptance": {
      "id": "c2635178-1ec0-41d4-9a0b-f85ed7f0659c",
      "device_uuid": "1287796"
    }
  }
}

Sign-up in a Brand that uses the Phone number customer authentication method

Start by sending the customer a one-time code by SMS. Pass their phone number to:

customers/passwordless-request

Request

Attribute Type Example Value Description
phone_number varchar "+15852826524" Customer's phone number
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/passwordless-request",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "phone_number": "+15852826524"
   
  }
}

Response

{
  "status": "OK",
  "code": 200
}

You can resend the code to the customer by calling the same route.

Then register the account with the code and the customer's details. The email address is still required — it becomes the account's email — but on a phone number brand it is not verified:

customers/register

Request

Attribute Type Example Value Description
passwordless_email varchar "john.doe@gmail.com" Customer's email address. Becomes the account's email; it is not verified on a phone number brand
passwordless_code varchar "053631" One-time code that was sent to the customer's phone number
first_name varchar "John" Customer's first name
last_name varchar "Doe" Customer's last name
phone_number varchar "+15852826524" Customer's phone number, in E.164 format. Always required on a phone number brand
optin_status_email tinyint (optional) 1 How the opt-in for marketing emails is handled depends on the Brand's opt-in settings. More information can be found in the "Opt-in" section of the 'How to view/edit basic information about my Brand' knowledge base article.
optin_status_sms tinyint (optional) 2 Customer's opt-in status for marketing SMS. Values: 1 confirmed, 2 disabled, 3 pending.
optin_status_pn tinyint (optional) 3 Customer's opt-in status for marketing push notifications. Values: 1 confirmed, 2 disabled, 3 pending.
demographics Demographic resource (optional) Can be required depending on the Brand's customer demographic data settings.
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/register",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "phone_number": "+15852826524",
    "passwordless_email": "john.doe@gmail.com",
     "passwordless_code": "053631",
     "first_name": "John",
     "last_name": "Doe"
   
  }
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "customer_account": {
      "id": "8100bab1-267e-41ae-8592-c229253b0129",
      "type_id": 1,
      "reference_type": "CustomerAccount",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@gmail.com",
      "phone_number": "+15852826524",
      "locale": "en-US",
      "state": 1,
      "demographics": [],
      "optin_status_email": 3,
      "optin_status_pn": 3,
      "has_pending_email_change": false,
      "has_pending_phone_number_change": false,
      "is_social": false,
      "social_login": null,
      "updated_at": "2023-08-25 12:10:33",
      "created_at": "2023-08-25 12:10:33"
    },
    "token": {
      "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZ2lzdGVyIiwiaWF0IjoxNjkyOTY1NDMzLCJleHAiOjE2OTI5NjkwMzMsIm5iZiI6MTY5Mjk2NTQzMywianRpIjoiSDg3bHlxZUIwZFZRYnRBRiIsInN1YiI6IjUwOTA5NzYiLCJwcnYiOiJjYzMyOTIxYTE1NDgwYTExN2Q5YmJjNzJjMGUxMjU2YTY4NTI0NThiIiwiYXBwbGljYXRpb25faWQiOjIxNDQsInNlc3Npb25faWQiOjI4MzE0fQ.1LSunIWUapPQTySrXXBzwsufyP9EAXmGQvEHRfp0tqk",
      "ttl": 60,
      "issued_token_type": "access_token",
      "token_type": "Bearer"
    },
    "dlc_access_token": null
  }
}

The email is not verified on a phone number brand, but it still has to be unique. Check it before you send the registration request:

customers/check-email

Request

Attribute Type Example Value Description
email varchar "john.doe@gmail.com" Customer's email address
{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/customers/check-email",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json"
  },
  "body": {
    "email": "john.doe@gmail.com"
   
  }
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "exists": false,
    "is_social": false
  }
}

Attribute Type Example Value Description
exists boolean true Whether an account with this email already exists
is_social boolean false Whether that account was created through a social login

After registration, record that the customer accepted the brand's Terms of Service and Privacy Policy on this device:

legal-agreement-acceptances

{
  "method": "post",
  "url": "https://api-public-demo.menu.app/api/legal-agreement-acceptances",
  "headers": {
    "X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
    "Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
    "Api-Version": "<current-release-version>",
    "Content-Type": "application/json",
    "Device-UUID": "1287796"
  }
  
}

Response

{
  "status": "OK",
  "code": 200,
  "data": {
    "legal_agreement_acceptance": {
      "id": "c2635178-1ec0-41d4-9a0b-f85ed7f0659c",
      "device_uuid": "1287796"
    }
  }
}