Customer Management
Manage customer data by creating, updating, or removing customer profiles. These endpoints provide essential functionality for handling customer information across Gameball.
Available APIs
POST - Create Customer
The API call is used to create or update a customer in Gameball based on the provided unique customerId and optional attributes. This allows for effective management of customer profiles
Security: Requires apiKey header.
Channel Merging Available If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball's channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.For more information, head to the Channel Merging Guide.
Request
Body
application/json
customerId string
Required
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
email string
Optional
Customer's email address.
mobile string
Optional
Customer's mobile number.
deviceToken string
Optional
Token used to identify the device.
osType string
Optional
Operating system type of the device.
customerAttributes Object
Optional
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.
referrerCode string
Optional
The referral code of an existing customer who is referring the customer being created. This is required in the create customer request to process the referral.
guest boolean
Optional
A flag indicating if the individual interacting with your system is a guest (not signed up). Set this to true for guest users; otherwise, they are treated as registered customers by default.
Sample request
Response
application/json
gameballId number
The customer’s unique ID within the Gameball system. This ID is used to store the customer in our database and is different from the customerId used in the dashboard.
Sample Response
GET - Customer
The API call retrieves customer information identified by customerId while excluding personal identifiable information (PII). This ensures that sensitive information remains protected while still providing essential customer details.
This endpoint returns general customer info (no personal data) with the public key. To access PII, use Get Customer Details with the secret key.
Security: Requires apiKey header.
Request
Path Parameters
customerId string
Required
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
gameballId number
The customer’s unique ID within the Gameball system. This ID is used to store the customer in our database and is different from the customerId used in the dashboard.
customerId string
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
customerAttributes Object
Optional
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.
This is a minimized customerAttributes object, excluding all personally identifiable information (PII) for privacy protection.
referralCode string
The referral code of the customer. Used to refer other customers.
referralLink string
The referral link generated for the customer.
dynamicReferralLink string
A dynamic referral link for mobile apps, enabling users to share a unique URL with others for referral purposes.
Sample Response
GET - Customer Details
The API call retrieves information identified by customerId, including personal identifiable information (PII). This endpoint is secured by a secret key, ensuring that access to sensitive customer profiles is restricted and protected.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerId string
Required
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
customerId string
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
gameballId number
The customer’s unique ID within the Gameball system. This ID is used to store the customer in our database and is different from the customerId used in the dashboard.
customerAttributes Object
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.
referralCode string
The referral code of the customer. Used to refer other customers.
referralLink string
The referral link generated for the customer.
dynamicReferralLink string
A dynamic referral link for mobile apps, enabling users to share a unique URL with others for referral purposes.
Sample Response
DELETE - Delete Customer
The API call deletes the customer identified by customerId
from the system. This removes the customer profile and associated data.
This API can also be accessed using the POST method for systems that do not support DELETE. In such cases, simply use /customers/{customerId}/delete endpoint to achieve the same functionality.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerId string
Required
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
GET - Customer Hash
The API call generates a hash for an existing customer based on their unique customerId. This hash is used to securely redeem loyalty points during transactions.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerId string
Required
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
hash string
A unique, rotating identifier generated for each customer, used as an additional layer of security and verification during redemptions and hold operations. This number is dynamically regenerated with each transaction to ensure secure validation and prevent unauthorized actions. The hash
serves as a key to verify the legitimacy of the redemption or hold request. Refer to the Hold Management Section for more details about using the hash generated here.
Sample Response
Last updated