Skip to main content

User Extra

Endpoints Summary

Method Path Swagger
GET /user_extra/ Swagger ↗
POST /user_extra/ Swagger ↗
GET /user_extra/{id}/ Swagger ↗
PUT /user_extra/{id}/ Swagger ↗
PATCH /user_extra/{id}/ Swagger ↗
DELETE /user_extra/{id}/ Swagger ↗

The User Extra API endpoints manage additional user information and extended profile data in GATE. These endpoints handle supplementary user attributes like demographics, contact details, custom fields, and profile metadata that extend beyond basic user account information. Use these endpoints to store and retrieve comprehensive user profiles for enhanced personalization and data collection.

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 provides comprehensive management of extended user profile information in GATE. This category handles supplementary user data that goes beyond basic account credentials, including demographic information, contact details, location data, custom fields, and business-related attributes.

These endpoints are essential for organizations that need to collect and manage detailed user profiles for compliance, personalization, reporting, or customer relationship management purposes. The API supports flexible data collection through eight custom fields, standard demographic fields, and business-specific information like tax IDs and passport numbers.

The user extra data is linked to parent user accounts through the parent field, allowing you to maintain a clear relationship between core user accounts and their extended profile information. This separation enables you to manage sensitive or optional profile data independently from essential authentication details.

Common scenarios include user registration flows that collect additional profile information, compliance requirements for identity verification, demographic data collection for analytics, and custom data fields for organization-specific needs.


Endpoints

GET /user_extra/

Description: Retrieve a paginated list of user extra information records. This endpoint allows you to fetch multiple user profiles with optional filtering by parent user or organization. Use this for bulk data retrieval, reporting, or administrative dashboards where you need to view multiple user profiles simultaneously.

Use Cases:

  • Generate user demographic reports for analytics
  • Export user profile data for compliance audits
  • Administrative dashboards displaying user information
  • Bulk data synchronization with external systems

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 extra info for specific user
parent__organization_id string query No Filter by organization ID to get all user extra info 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 the results for pagination
device_info boolean query No Include additional device information in the response

cURL Example:

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

Example Response:

{
  "count": 150,
  "next": "https://gate.zequenze.com/api/v1/user_extra/?limit=25&offset=25",
  "previous": null,
  "results": [
    {
      "id": 1,
      "parent": 456,
      "title": "Dr.",
      "company": "Acme Corporation",
      "telephone": "+1-555-0123",
      "address": "123 Main Street",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "United States",
      "country_id": "US",
      "gender": "f",
      "birthday": "1985-03-15",
      "age": 39,
      "age_range": "35-44",
      "locale": "en_US",
      "location": "San Francisco, CA",
      "hometown": "Portland, OR",
      "accept_terms": true,
      "custom_field_1": "Premium Member",
      "custom_field_2": "Referred by John Smith",
      "event": "Conference 2024",
      "tax_id": "12-3456789",
      "passport_number": null
    }
  ]
}

Response Codes:

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

POST /user_extra/

Description: Create new user extra information record for a specific parent user. This endpoint allows you to add comprehensive profile data when users register or when additional information needs to be collected. All fields except the parent user ID are optional, providing flexibility in data collection workflows.

Use Cases:

  • Complete user registration with extended profile information
  • Add demographic data during user onboarding
  • Collect compliance-required information for identity verification
  • Store event-specific user data during registration processes

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": 789,
    "title": "Ms.",
    "company": "Tech Innovations LLC",
    "telephone": "+1-555-0456",
    "address": "456 Innovation Drive",
    "city": "Austin",
    "state": "TX",
    "postal_code": "73301",
    "country": "United States",
    "country_id": "US",
    "gender": "f",
    "birthday": "1992-07-22",
    "locale": "en_US",
    "accept_terms": true,
    "custom_field_1": "Marketing Campaign A",
    "custom_field_2": "Enterprise Tier",
    "event": "Product Launch 2024"
  }'

Example Response:

{
  "id": 25,
  "parent": 789,
  "title": "Ms.",
  "company": "Tech Innovations LLC",
  "telephone": "+1-555-0456",
  "address": "456 Innovation Drive",
  "city": "Austin",
  "state": "TX",
  "postal_code": "73301",
  "country": "United States",
  "country_id": "US",
  "gender": "f",
  "birthday": "1992-07-22",
  "age": 32,
  "age_range": "25-34",
  "locale": "en_US",
  "location": "Austin, TX",
  "hometown": null,
  "accept_terms": true,
  "custom_field_1": "Marketing Campaign A",
  "custom_field_2": "Enterprise Tier",
  "custom_field_3": null,
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null,
  "event": "Product Launch 2024",
  "tax_id": null,
  "passport_number": null
}

Response Codes:

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

GET /user_extra/{id}/

Description: Retrieve detailed user extra information for a specific record by ID. This endpoint returns comprehensive profile data for a single user extra record, including optional device information when requested. Use this for displaying detailed user profiles or retrieving specific user data for processing.

Use Cases:

  • Display complete user profile in admin interfaces
  • Retrieve user information for customer service interactions
  • Load user data for form pre-population during updates
  • Access user details for compliance or audit purposes

Full URL Example:

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

Parameters:

Parameter Type In Required Description
id integer path Yes The unique identifier of the user extra record to retrieve
device_info boolean query No Include additional device information in the response

cURL Example:

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

Example Response:

{
  "id": 25,
  "parent": 789,
  "title": "Ms.",
  "company": "Tech Innovations LLC",
  "telephone": "+1-555-0456",
  "address": "456 Innovation Drive",
  "city": "Austin",
  "state": "TX",
  "postal_code": "73301",
  "country": "United States",
  "country_id": "US",
  "gender": "f",
  "birthday": "1992-07-22",
  "age": 32,
  "age_range": "25-34",
  "locale": "en_US",
  "location": "Austin, TX",
  "hometown": "Dallas, TX",
  "accept_terms": true,
  "custom_field_1": "Marketing Campaign A",
  "custom_field_2": "Enterprise Tier",
  "custom_field_3": "Preferred Contact: Email",
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null,
  "event": "Product Launch 2024",
  "tax_id": "75-1234567",
  "passport_number": null
}

Response Codes:

Status Description
200 Success - Returns the requested user extra information
401 Unauthorized - Invalid or missing authentication 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 update an existing user extra information record. This endpoint replaces all fields of the user extra record with the provided data. Any fields not included in the request will be cleared (set to null), except for the ID and parent fields. Use this for complete profile updates where you want to replace all existing information.

Use Cases:

  • Complete profile updates from user settings pages
  • Data migration or bulk updates with full record replacement
  • Compliance updates that require complete information refresh
  • Administrative corrections that involve multiple fields

Full URL Example:

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

cURL Example:

curl -X PUT "https://gate.zequenze.com/api/v1/user_extra/25/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": 789,
    "title": "Dr.",
    "company": "Tech Innovations LLC",
    "telephone": "+1-555-0789",
    "address": "789 Updated Street",
    "city": "Austin",
    "state": "TX",
    "postal_code": "73301",
    "country": "United States",
    "country_id": "US",
    "gender": "f",
    "birthday": "1992-07-22",
    "locale": "en_US",
    "accept_terms": true,
    "custom_field_1": "Updated Marketing Campaign",
    "custom_field_2": "Premium Enterprise",
    "custom_field_3": "VIP Customer",
    "event": "Annual Conference 2024"
  }'

Example Response:

{
  "id": 25,
  "parent": 789,
  "title": "Dr.",
  "company": "Tech Innovations LLC",
  "telephone": "+1-555-0789",
  "address": "789 Updated Street",
  "city": "Austin",
  "state": "TX",
  "postal_code": "73301",
  "country": "United States",
  "country_id": "US",
  "gender": "f",
  "birthday": "1992-07-22",
  "age": 32,
  "age_range": "25-34",
  "locale": "en_US",
  "location": "Austin, TX",
  "hometown": null,
  "accept_terms": true,
  "custom_field_1": "Updated Marketing Campaign",
  "custom_field_2": "Premium Enterprise",
  "custom_field_3": "VIP Customer",
  "custom_field_4": null,
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null,
  "event": "Annual Conference 2024",
  "tax_id": null,
  "passport_number": null
}

Response Codes:

Status Description
200 Success - User extra information successfully updated
400 Bad Request - Invalid data format or validation errors
401 Unauthorized - Invalid or missing authentication token
404 Not Found - User extra record with specified ID does not exist
403 Forbidden - Insufficient permissions to modify this user's data

PATCH /user_extra/{id}/

Description: Partially update specific fields of an existing user extra information record. This endpoint allows you to modify only the fields you specify, leaving all other fields unchanged. This is ideal for targeted updates like changing a phone number, updating custom fields, or modifying specific demographic information without affecting the rest of the profile.

Use Cases:

  • Update specific profile fields like phone number or address
  • Modify custom fields for campaign tracking or user segmentation
  • Partial updates from forms that only collect certain information
  • Incremental profile completion over multiple interactions

Full URL Example:

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

cURL Example:

curl -X PATCH "https://gate.zequenze.com/api/v1/user_extra/25/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "telephone": "+1-555-9999",
    "custom_field_4": "Newsletter Subscriber",
    "tax_id": "75-9876543"
  }'

Example Response:

{
  "id": 25,
  "parent": 789,
  "title": "Dr.",
  "company": "Tech Innovations LLC",
  "telephone": "+1-555-9999",
  "address": "789 Updated Street",
  "city": "Austin",
  "state": "TX",
  "postal_code": "73301",
  "country": "United States",
  "country_id": "US",
  "gender": "f",
  "birthday": "1992-07-22",
  "age": 32,
  "age_range": "25-34",
  "locale": "en_US",
  "location": "Austin, TX",
  "hometown": null,
  "accept_terms": true,
  "custom_field_1": "Updated Marketing Campaign",
  "custom_field_2": "Premium Enterprise",
  "custom_field_3": "VIP Customer",
  "custom_field_4": "Newsletter Subscriber",
  "custom_field_5": null,
  "custom_field_6": null,
  "custom_field_7": null,
  "custom_field_8": null,
  "event": "Annual Conference 2024",
  "tax_id": "75-9876543",
  "passport_number": null
}

Response Codes:

Status Description
200 Success - User extra information partially updated
400 Bad Request - Invalid data format or validation errors
401 Unauthorized - Invalid or missing authentication token
404 Not Found - User extra record with specified ID does not exist
403 Forbidden - Insufficient permissions to modify this user's data

DELETE /user_extra/{id}/

Description: Permanently delete a user extra information record. This endpoint removes all extended profile data for the specified record while leaving the parent user account intact. Use this carefully as the operation is irreversible and will permanently remove all custom fields, demographic data, and additional profile information.

Use Cases:

  • Data privacy compliance (right to be forgotten requests)
  • Clean up test or invalid user extra records
  • Remove profile data when users downgrade to basic accounts
  • Administrative cleanup of orphaned or duplicate records

Full URL Example:

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

cURL Example:

curl -X DELETE "https://gate.zequenze.com/api/v1/user_extra/25/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response Codes:

Status Description
204 No Content - User extra information successfully deleted
401 Unauthorized - Invalid or missing authentication 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

Use Case 1: Complete User Registration Flow

When implementing comprehensive user registration, use POST /user_extra/ after creating the base user account to collect additional profile information like demographics, company details, and custom tracking data for marketing or compliance purposes.

Use Case 2: Customer Profile Management Dashboard

Build administrative interfaces using GET /user_extra/ with organization filtering to display user profiles, then use individual GET /user_extra/{id}/ calls to show detailed information when administrators need to view or assist specific users.

Use Case 3: Progressive Profile Completion

Implement progressive profile building by using PATCH /user_extra/{id}/ to incrementally add information as users interact with your system, updating custom fields to track engagement, preferences, or additional voluntary information over time.

Use Case 4: Compliance and Data Privacy

Use the DELETE /user_extra/{id}/ endpoint to handle right-to-be-forgotten requests while maintaining core user accounts, or use PUT operations to update compliance-related fields like tax IDs and passport numbers for identity verification.

Use Case 5: Event-Based Data Collection

During events, conferences, or campaigns, create user extra records with event-specific information in the event field and custom fields, then use filtering by organization or event data to generate attendee reports and analytics.


Best Practices

  • Use PATCH for targeted updates: When updating specific fields like contact information or custom fields, use PATCH instead of PUT to avoid accidentally clearing other profile data.

  • Implement proper validation: Always validate gender field values (m, f, o) and date formats (YYYY-MM-DD) before sending requests to avoid 400 errors.

  • Handle pagination efficiently: For large datasets, use reasonable limit values (25-100 records) and implement offset-based pagination to avoid timeouts and improve performance.

  • Secure sensitive data: Be particularly careful with fields like tax_id and passport_number - ensure these are only accessible to authorized personnel and consider encryption at rest.

  • Use device_info parameter judiciously: Only request device information when necessary as it adds processing overhead and response size.

  • Implement proper error handling: Always check for 404 responses when accessing specific records, as user extra data may be deleted independently of parent user accounts.

  • Leverage custom fields strategically: Plan your custom field usage in advance - use consistent naming conventions and document what each custom field represents in your application.