Skip to main content

Device App User Update

The device_app_user_update endpoint allows you to update user information and device details in the GATE system. This endpoint is essential for maintaining current user profiles, device associations, and authentication credentials in mobile and IoT applications.

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 to update comprehensive user and device information within the GATE system. This endpoint is designed for applications that need to maintain synchronized user profiles across multiple devices and platforms.

Key Features:

  • Update user authentication credentials (username, password)
  • Manage device identifiers (IMEI, IMSI, ICCID)
  • Synchronize user profiles with external systems
  • Maintain device-to-user associations
  • Handle user classification and service levels

Common Integration Scenarios:

  • Mobile applications updating user profiles after login
  • IoT device management systems synchronizing device information
  • Customer management systems updating user classifications
  • Multi-device applications maintaining user sessions
  • Telecom operators managing subscriber information

The endpoint accepts a comprehensive data payload that can include device identifiers, user credentials, and classification information, allowing for flexible updates based on your application's specific needs.


Endpoints

POST /device_app_user_update/

Description: Updates user information and associated device details in the GATE system. This endpoint allows you to modify user credentials, device identifiers, 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.

Use Cases:

  • User profile updates after authentication or registration changes
  • Device replacement or upgrade scenarios requiring identifier updates
  • Synchronization with external user management systems
  • User class of service changes or upgrades
  • Bulk user data maintenance operations

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:

The data parameter should contain a JSON object with the following optional fields:

Field Type Description
number string Device number (MSISDN) - typically the phone number
generic_id string Generic unique identifier from OS/App store
imei string International Mobile Equipment Identity
imsi string International Mobile Subscriber Identity
iccid string Integrated Circuit Card Identifier (SIM card ID)
username string User's login username
password string User's password (should be properly hashed)
user_external_id string External system user identifier for integration
user_class string User class of service or subscription tier

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\",
      \"generic_id\": \"com.example.app.user123\",
      \"imei\": \"123456789012345\",
      \"imsi\": \"310120123456789\",
      \"iccid\": \"12345678901234567890\",
      \"username\": \"john_doe\",
      \"password\": \"hashed_password_string\",
      \"user_external_id\": \"ext_user_456\",
      \"user_class\": \"premium\"
    }"
  }'

Example Response (201 Created):

{
  "number": "+1234567890",
  "generic_id": "com.example.app.user123",
  "imei": "123456789012345",
  "imsi": "310120123456789",
  "iccid": "12345678901234567890",
  "username": "john_doe",
  "password": "hashed_password_string",
  "user_external_id": "ext_user_456",
  "user_class": "premium"
}

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 - Server processing error

Common Use Cases

Use Case 1: Mobile App User Profile Update

When a user updates their profile information in a mobile application, use this endpoint to synchronize the changes with the GATE system, including updated credentials and device information.

Use Case 2: Device Replacement Scenario

When a user gets a new device or SIM card, update the device identifiers (IMEI, IMSI, ICCID) while maintaining the same user account and external system mappings.

Use Case 3: User Class Upgrade

When a user upgrades their service plan or subscription tier, update their user_class field to reflect the new level of service and permissions.

Use Case 4: External System Integration

Synchronize user information between GATE and external CRM or user management systems using the user_external_id field to maintain consistent user records.

Use 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.


Best Practices

  • Data Validation: Always validate user input before sending to the API, especially for device identifiers like IMEI and IMSI which have specific format requirements.

  • Password Security: Ensure passwords are properly hashed before transmission. Never send plain text passwords through the API.

  • Partial Updates: You only need to include fields that are changing in the data payload. The API supports partial updates, so omit unchanged fields to reduce payload size.

  • Error Handling: Implement robust error handling for validation errors (422) and authentication failures (401). Parse error responses to provide meaningful feedback to users.

  • Rate Limiting: Be mindful of API rate limits when performing bulk updates. Implement appropriate delays or batching strategies for large-scale operations.

  • Data Consistency: When updating device identifiers, ensure all related fields (IMEI, IMSI, ICCID) are consistent and belong to the same physical device or SIM card.

  • External ID Mapping: Use the user_external_id field consistently to maintain reliable mappings between GATE and your external systems.

  • Logging and Monitoring: Log all update operations for audit trails and implement monitoring to track successful updates and identify patterns in failures.