Bulk Upload Business Migration Users
Allows you to upload a list of business migration users along with their details using a CSV file. See the Create Business Migration User API for details about the user attributes that can be uploaded in the CSV file.
These are the maximum values that can be included per user in the business migration user CSV file:
- Gift card: 15
- User relations: 6
- Profile fields: 25
- Rewards: 15
- Challenge progress: 15
- Loyalty card: 10
Note: This feature is designed for new brands onboarding to Punchh. If the brand is already live with Punchh, this feature will not add significant value to their operations.
Permission Required
A user account with the Business Admin role is required.
Sample CSV File Format
In the CSV file, the attributes are added in columns, and each row will contain the values for these attributes for each user. The following image shows the format for the CSV file (not all user attributes are shown in this example).
address_line1,birthday,city,email,first_name,last_name,gender,phone,state,zip_code
address1,1990-01-01,Mountain View,test1@example.com,first1,last1,male,1111111111,CA,94040
address2,2000-01-01,Austin,test2@example.com,first2,last2,female,1111111112,TX,77494
Bulk Upload Business Migration Users via Punchh Platform
The bulk upload feature for migrating business users is also available from the Punchh platform. See the "Bulk Business Migration User Upload" section in Awaiting Migration on the Punchh Support Portal for more information.
Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAuthorizationrequired
Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".
The requests for this API endpoint are passed using form data, as shown in the following examples.
Sample Request for Bulk Uploading Business Migration Users Using a Local CSV File
curl --request POST \
--url https://server_name_goes_here.punchh.com/api2/dashboard/migration_users/bulk_bmu_upload \
--header 'Accept: application/json' \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--form 'name="BMU804"' \
--form 'bulk_guest_activity_file=@"CSV_FILE_PATH_GOES_HERE"'
Sample Request for Bulk Uploading Business Migration Users Using a CSV File URL
curl --request POST \
--url https://server_name_goes_here.punchh.com/api2/dashboard/migration_users/bulk_bmu_upload \
--header 'Accept: application/json' \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--form 'name="BMU805"' \
--form 'bulk_guest_activity_file="CSV_FILE_PATH_GOES_HERE"'
- Type: stringnamerequired
Name for the bulk upload request
- Type: stringbulk
_guest _activity _file Location of the file that will be used for bulk upload. Punchh supports only the CSV file format with a maximum file size of 15 MB. The bulk upload will fail if the file size exceeds 15 MB. Note: The file location should be passed in either the
import_file_urlparameter or thebulk_guest_activity_fileparameter. The bulk upload request will fail if the file location is provided in both parameters. - Type: stringimport
_file _url URL of the file for bulk upload, publicly hosted on a cloud service like S3. Punchh supports only the CSV file format with a maximum file size of 50 MB. The bulk upload will fail if the file size exceeds 50 MB. Note: The file location should be passed in either the
import_file_urlparameter or thebulk_guest_activity_fileparameter. The bulk upload request will fail if the file location is provided in both parameters.
- 200
OK
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/migration_users/bulk_bmu_upload \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--data '{
"name": "bulk-upload-batch1",
"bulk_guest_activity_file": "CSV_FILE_PATH_GOES_HERE",
"import_file_url": "CSV_FILE_PATH_GOES_HERE"
}'