Device App User Update
Endpoints Summary
POST
/device_app_user_update/
Swagger ↗
The device_app_user_update API endpoint allows
youmobile applications and device management systems to update user informationandassociateddevicewithdetails in the GATE system.devices. This endpoint is essential for maintainingcurrentaccurate user profiles, device associations, andauthenticationsubscribercredentialsdata in mobileandnetworkIoT applications.environments.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The device_app_user_update API category provides functionality tofor updateupdating comprehensive user information linked to mobile devices and devicenetwork information within the GATE system.subscribers. This endpoint is designedparticularly forvaluable applicationsfor:
Key Features:
The endpoint supports updating critical identifiers including device numbers (MSISDN), hardware identifiers (IMEI, IMSI, ICCID)
Common Integration Scenarios:
The endpoint accepts a comprehensive data payload that can include device identifiers,, user credentials, and classificationservice information,classifications. allowingThis forcomprehensive flexibleapproach ensures that all aspects of the user-device relationship can be maintained accurately across the system.
Common scenarios include user onboarding, device transfers between users, credential updates, and service class modifications. The endpoint is designed to handle both individual field updates basedand onbulk yourprofile application'smodifications specific needs.efficiently.
Endpoints
POST /device_app_user_update/
Description: Updates comprehensive user information associated with a device, including network identifiers, hardware identifiers, user credentials, and associatedservice device details in the GATE system.classifications. This endpoint allowsis youessential tofor modifymaintaining useraccurate credentials,user-device relationships in mobile networks and device identifiers,management external system mappings, and user classifications in a single request. It's designed for scenarios where user or device information has changed and needs to be synchronized across the system.systems.
Use Cases:
UserUpdateprofileuserupdatescredentialsafterwhenauthenticationaor registrationsubscriber changes their login informationDeviceAssociatereplacementaornewupgrade scenarios requiring identifier updates
Full URL Example:
https://gate.zequenze.com/api/v1/device_app_user_update/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| data | string | body | Yes | JSON string containing user and device information to update |
Request Body Structure:Fields:
The data parameter should contain a JSON object with the following optional fields:
| Field | Type |
|---|
cURL Example:
curl -X POST "https://gate.zequenze.com/api/v1/device_app_user_update/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": "{
\"number\": \"+1234567890\",\"username\":\"john.doe\",\"user_class\":\"premium\",\"imei\":\"123456789012345\",\"user_external_id\":\"ext_12345\"}"
}'
Example Request Body:
{
"data": "{\"number\":\"+1234567890\",\"generic_id\": \"com.example.app.user123\",
\"imei\": \"123456789012345\",
\"imsi\": \"310120123456789\310260123456789\",
\"iccid\": \"12345678901234567890\89014103211118510720\",
\"username\": \"john_doe\john.doe\",
\"password\": \"hashed_password_string\$2a$10$N9qo8uLOickgx2ZMRZoMye\",
\"user_external_id\": \"ext_user_456\ext_12345\",
\"user_class\": \"premium\"
}"
}'
Example Response (201 Created):
{
"number": "+1234567890",
"generic_id": "com.example.app.user123",
"imei": "123456789012345",
"imsi": "310120123456789"310260123456789",
"iccid": "12345678901234567890"89014103211118510720",
"username": "john_doe"john.doe",
"password": "hashed_password_string"$2a$10$N9qo8uLOickgx2ZMRZoMye",
"user_external_id": "ext_user_456"ext_12345",
"user_class": "premium",
"updated_at": "2024-01-15T10:30:00Z",
"status": "success"
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - User information successfully updated |
| 400 | Bad Request - Invalid data format or missing required fields |
| 401 | Unauthorized - Invalid or missing authentication token |
| 422 | Unprocessable Entity - Data validation errors |
| 500 | Internal Server Error - |
Common Use Cases
Use Case 1: Mobile App User ProfileCredential Update
When a user updateschanges their profilelogin informationcredentials, inupdate atheir mobile application, use this endpoint to synchronize the changes with the GATE system, including updated credentialsusername and password while maintaining device information.associations. This ensures continued access while preserving all device-specific identifiers.
Use Case 2: Device Replacement ScenarioUpgrade
WhenDuring a device upgrade, transfer user getsinformation ato the new device orby SIM card, updateupdating the deviceIMEI and other hardware identifiers (IMEI, IMSI, ICCID) while maintainingkeeping the same user accountcredentials and externalservice systemclass mappings.intact.
Use Case 3: UserService ClassPlan UpgradeChange
When a user upgrades or downgrades their service plan or subscription tier,plan, update theirthe user_class field to reflect thetheir new levelsubscription oftier, enabling appropriate service and permissions.provisioning.
Use Case 4: SIM Card Replacement
After replacing a damaged or lost SIM card, update the IMSI and ICCID values while maintaining all other user information and device associations.
Use Case 5: External System Integration
Synchronize user informationdata between GATE andwith external CRM or user managementbilling systems usingby updating the user_external_id fieldfield, toenabling maintain consistentcross-platform user records.
Useand Case 5: Bulk User Maintenance
Perform maintenance operations on user accounts, such as updating authentication credentials or device associations during system migrations or security updates.management.
Best Practices
-
Data
to prevent data corruptionValidation:Validation: Always validateuser input before sending to the API, especially fordevice identifierslike(IMEI,IMEIIMSI,andICCID)IMSIagainstwhichindustryhavestandardsspecificbeforeformatsubmissionrequirements. -
Password
Security:Security: Ensure passwords are properly hashed using strong algorithms (bcrypt, Argon2) beforetransmission.sendingNever send plain text passwords throughto theAPI.API -
Partial
transfer and processing timeUpdates:Updates:You only need toOnly include fields thatareneedchangingupdating in thedata payload. The API supports partial updates, so omit unchanged fieldsrequest toreduceminimizepayloaddatasize. -
Error
Handling:Handling: Implement robust error handlingforto manage validationerrors (422)failures andauthenticationnetworkfailurestimeouts(401). Parse error responses to provide meaningful feedback to users.gracefully -
Idempotency: Design your integration to handle duplicate requests safely, as network issues may cause request retries
Data Consistency:Privacy: WhenEnsure updatingcompliance devicewith identifiers,data ensureprotection allregulations relatedwhen fieldshandling (IMEI,user IMSI, ICCID) are consistentcredentials and belongpersonal to the same physical device or SIM card.
ExternalLogging: IDMaintain Mapping:audit Uselogs theof user_external_iduser fieldupdates consistentlyfor to maintain reliable mappings between GATEsecurity and yourcompliance externalpurposes, systems.
Loggingsensitive anddata Monitoring:like Log all update operations for audit trails and implement monitoring to track successful updates and identify patterns in failures.