Skip to main content

User Extra

The User Extra API provides comprehensive management of extended user profile information beyond basic account details. These endpoints allow you to store and retrieve additional demographic, contact, and custom data for users, supporting detailed user profiling for analytics, personalization, and compliance requirements.

Base URL: https://gate.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The User Extra API enables organizations to collect and manage supplementary user information that extends beyond standard user accounts. This includes demographic data (gender, age, location), contact information (address, telephone), business details (company, title), identification data (passport numbers, tax IDs), and flexible custom fields for organization-specific requirements.

Common use cases include:

  • User Analytics & Segmentation: Collect demographic data for user behavior analysis and targeted campaigns
  • Event Registration: Gather additional attendee information for conferences, webinars, or corporate events
  • Compliance & KYC: Store identification and verification data for regulated industries
  • Personalization: Use location and preference data to customize user experiences
  • Custom Data Collection: Utilize flexible custom fields for organization-specific information gathering

These endpoints work together to provide full CRUD operations on user extra data, with list filtering capabilities and optional device information inclusion for comprehensive user profiling.


Endpoints

GET /user_extra/

Description: Retrieves a paginated list of all user extra information records. This endpoint is essential for viewing collected user data across your organization, with filtering options to narrow results by parent user or organization.

Use Cases:

  • Generate user demographic reports for analytics
  • Export user data for compliance auditing
  • Filter users by organization for multi-tenant applications

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/?parent__organization_id=123&limit=50&device_info=true

Parameters:

Parameter Type In Required Description
parent string query No Filter by parent user ID to get specific user's extra data
parent__organization_id string query No Filter by organization ID to get all users within an organization
limit integer query No Number of results to return per page (default pagination applies)
offset integer query No The initial index from which to return results for pagination
device_info boolean query No Include device information in the response for enhanced user profiling

cURL Example:

curl -X GET "https://gate.zequenze.com/api/v1/user_extra/?parent__organization_id=123&limit=20&device_info=true" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "count": 156,
  "next": "https://gate.zequenze.com/api/v1/user_extra/?limit=20&offset=20&parent__organization_id=123",
  "previous": null,
  "results": [
    {
      "id": 42,
      "parent": 1001,
      "gender": "f",
      "age_range": "25-34",
      "age": 28,
      "birthday": "1995-06-15",
      "locale": "en-US",
      "address": "123 Main Street, Suite 100",
      "hometown": "Springfield",
      "city": "Chicago",
      "state": "Illinois",
      "country": "United States",
      "location": "Chicago, IL, USA",
      "telephone": "+1-555-123-4567",
      "accept_terms": true
    }
  ]
}

Response Codes:

Status Description
200 Success - Returns paginated list of user extra data
401 Unauthorized - Invalid or missing Bearer token
403 Forbidden - Insufficient permissions to access user data

POST /user_extra/

Description: Creates new extended user information records. This endpoint is typically used during user onboarding, event registration, or when collecting additional profile data from existing users.

Use Cases:

  • Collect additional user information during registration flows
  • Store event attendee details for conferences or webinars
  • Capture compliance data for regulated industries

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/

cURL Example:

curl -X POST "https://gate.zequenze.com/api/v1/user_extra/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": 1001,
    "gender": "m",
    "age": 32,
    "birthday": "1991-03-22",
    "city": "San Francisco",
    "state": "California",
    "country": "United States",
    "telephone": "+1-555-987-6543",
    "company": "Tech Innovations Inc",
    "title": "Senior Developer",
    "accept_terms": true,
    "custom_field_1": "Premium Member",
    "custom_field_2": "Annual Subscription"
  }'

Example Response:

{
  "id": 43,
  "gender": "m",
  "age_range": null,
  "age": 32,
  "birthday": "1991-03-22",
  "locale": null,
  "address": null,
  "hometown": null,
  "city": "San Francisco",
  "state": "California",
  "postal_code": null,
  "country": "United States",
  "location": null,
  "telephone": "+1-555-987-6543",
  "company": "Tech Innovations Inc",
  "title": "Senior Developer",
  "passport_number": null,
  "country_id": null,
  "tax_id": null,
  "event": null,
  "accept_terms": true,
  "custom_field_1": "Premium Member",
  "custom_field_2": "Annual Subscription",
  "custom_field_3": null,
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null
}

Response Codes:

Status Description
201 Created - User extra data successfully created
400 Bad Request - Invalid data format or missing required fields
401 Unauthorized - Invalid or missing Bearer token
409 Conflict - User extra data already exists for this parent user

GET /user_extra/{id}/

Description: Retrieves detailed information for a specific user extra record by ID. This endpoint is useful for viewing complete user profiles, including optional device information for comprehensive user analysis.

Use Cases:

  • Display detailed user profiles in admin dashboards
  • Retrieve specific user data for customer support
  • Access user information for personalization features

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/42/?device_info=true

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the user extra record
device_info boolean query No Include device information for enhanced user profiling

cURL Example:

curl -X GET "https://gate.zequenze.com/api/v1/user_extra/42/?device_info=true" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "id": 42,
  "parent": 1001,
  "gender": "f",
  "age_range": "25-34",
  "age": 28,
  "birthday": "1995-06-15",
  "locale": "en-US",
  "address": "123 Main Street, Suite 100",
  "hometown": "Springfield",
  "city": "Chicago",
  "state": "Illinois",
  "country": "United States",
  "location": "Chicago, IL, USA",
  "telephone": "+1-555-123-4567",
  "accept_terms": true
}

Response Codes:

Status Description
200 Success - Returns detailed user extra data
401 Unauthorized - Invalid or missing Bearer token
404 Not Found - User extra record with specified ID does not exist
403 Forbidden - Insufficient permissions to access this user's data

PUT /user_extra/{id}/

Description: Completely updates an existing user extra record, replacing all fields with new values. This endpoint requires all data to be provided and is ideal for comprehensive profile updates.

Use Cases:

  • Update complete user profiles after data verification
  • Sync user information from external systems
  • Refresh all user data during periodic updates

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/42/

cURL Example:

curl -X PUT "https://gate.zequenze.com/api/v1/user_extra/42/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "gender": "f",
    "age": 29,
    "birthday": "1995-06-15",
    "locale": "en-US",
    "address": "456 Oak Avenue, Apt 5B",
    "city": "Chicago",
    "state": "Illinois",
    "postal_code": "60601",
    "country": "United States",
    "telephone": "+1-555-123-4567",
    "company": "Design Solutions LLC",
    "title": "Creative Director",
    "accept_terms": true,
    "custom_field_1": "Enterprise Client",
    "custom_field_2": "VIP Status"
  }'

Example Response:

{
  "id": 42,
  "gender": "f",
  "age_range": null,
  "age": 29,
  "birthday": "1995-06-15",
  "locale": "en-US",
  "address": "456 Oak Avenue, Apt 5B",
  "hometown": null,
  "city": "Chicago",
  "state": "Illinois",
  "postal_code": "60601",
  "country": "United States",
  "location": null,
  "telephone": "+1-555-123-4567",
  "company": "Design Solutions LLC",
  "title": "Creative Director",
  "passport_number": null,
  "country_id": null,
  "tax_id": null,
  "event": null,
  "accept_terms": true,
  "custom_field_1": "Enterprise Client",
  "custom_field_2": "VIP Status",
  "custom_field_3": null,
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null
}

Response Codes:

Status Description
200 Success - User extra data completely updated
400 Bad Request - Invalid data format or validation errors
401 Unauthorized - Invalid or missing Bearer token
404 Not Found - User extra record with specified ID does not exist

PATCH /user_extra/{id}/

Description: Partially updates specific fields of an existing user extra record. This endpoint allows selective field updates without affecting other data, making it perfect for incremental profile updates.

Use Cases:

  • Update specific user fields like contact information
  • Modify custom fields without changing personal data
  • Apply incremental changes from user profile edits

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/42/

cURL Example:

curl -X PATCH "https://gate.zequenze.com/api/v1/user_extra/42/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "telephone": "+1-555-999-8888",
    "company": "New Company Name Inc",
    "custom_field_1": "Updated Status"
  }'

Example Response:

{
  "id": 42,
  "gender": "f",
  "age_range": null,
  "age": 29,
  "birthday": "1995-06-15",
  "locale": "en-US",
  "address": "456 Oak Avenue, Apt 5B",
  "hometown": null,
  "city": "Chicago",
  "state": "Illinois",
  "postal_code": "60601",
  "country": "United States",
  "location": null,
  "telephone": "+1-555-999-8888",
  "company": "New Company Name Inc",
  "title": "Creative Director",
  "passport_number": null,
  "country_id": null,
  "tax_id": null,
  "event": null,
  "accept_terms": true,
  "custom_field_1": "Updated Status",
  "custom_field_2": "VIP Status",
  "custom_field_3": null,
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null
}

Response Codes:

Status Description
200 Success - User extra data partially updated
400 Bad Request - Invalid data format or validation errors
401 Unauthorized - Invalid or missing Bearer token
404 Not Found - User extra record with specified ID does not exist

DELETE /user_extra/{id}/

Description: Permanently removes a user extra record from the system. This endpoint should be used carefully as it permanently deletes all extended user information associated with the specified ID.

Use Cases:

  • Remove user data upon account deletion for GDPR compliance
  • Clean up test or invalid user extra records
  • Handle user requests for data removal

Full URL Example:

https://gate.zequenze.com/api/v1/user_extra/42/

cURL Example:

curl -X DELETE "https://gate.zequenze.com/api/v1/user_extra/42/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response Codes:

Status Description
204 No Content - User extra data successfully deleted
401 Unauthorized - Invalid or missing Bearer token
404 Not Found - User extra record with specified ID does not exist
403 Forbidden - Insufficient permissions to delete this user's data

Common Use Cases

Event Registration System

Use POST /user_extra/ to collect attendee information including contact details, company information, and dietary preferences in custom fields. Filter by organization using GET with parent__organization_id to generate attendee lists per company.

User Analytics Dashboard

Retrieve demographic data with GET /user_extra/ including age ranges and locations to create user segmentation reports. Use the pagination parameters to handle large datasets efficiently.

Profile Management Interface

Implement a user profile editor using GET /user_extra/{id}/ to load current data, then PATCH /user_extra/{id}/ for incremental updates as users modify their information.

Compliance Data Collection

Store KYC information using passport numbers, tax IDs, and country identification. Use custom fields for industry-specific compliance requirements, and delete records with DELETE /user_extra/{id}/ when required for data privacy regulations.

Multi-tenant User Management

Filter users by organization using parent__organization_id parameter to manage user data across different tenants while maintaining data isolation and proper access controls.


Best Practices

  • Data Privacy: Always implement proper access controls and consider GDPR/privacy regulations when collecting and storing user data
  • Pagination: Use limit and offset parameters for large datasets to improve performance and reduce response times
  • Partial Updates: Prefer PATCH over PUT for single field updates to minimize data transfer and reduce the risk of overwriting unchanged data
  • Custom Fields: Plan your custom field usage in advance and document their purposes for your organization to maintain consistency
  • Error Handling: Implement proper error handling for 404 responses when user records don't exist, especially in user-facing applications
  • Device Information: Only request device_info when necessary as it may impact response times and data usage