Skip to main content

User Extra

Manage additional user information and extended profile data.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /user_extra/

Retrieve a list of user extra information records with optional filtering and pagination.

Parameters:

Parameter Type In Required Description
parent string query No Filter by parent user ID
parent__organization_id string query No Filter by organization ID of the parent user
limit integer query No Number of results to return per page
offset integer query No The initial index from which to return the results
device_info boolean query No Include device information in the response

Example Request:

GET /api/v1/user_extra/?limit=20&offset=0&device_info=true

Example Response:

{
  "count": 45,
  "next": "https://gate.zequenze.com/api/v1/user_extra/?limit=20&offset=20",
  "previous": null,
  "results": [
    {
      "id": 1,
      "parent": "user123",
      "department": "Engineering",
      "job_title": "Senior Developer",
      "phone_extension": "1234",
      "emergency_contact": "Jane Doe",
      "emergency_phone": "+1234567890",
      "created_at": "2023-10-01T10:00:00Z",
      "updated_at": "2023-10-01T10:00:00Z"
    }
  ]
}
Status Description
200 Success
401 Unauthorized

POST /user_extra/

Create new additional information for a user.

Parameters:

Parameter Type In Required Description
data object body Yes User extra information data

Example Request:

POST /api/v1/user_extra/
Content-Type: application/json

{
  "parent": "user123",
  "department": "Marketing",
  "job_title": "Marketing Manager",
  "phone_extension": "5678",
  "emergency_contact": "John Smith",
  "emergency_phone": "+0987654321",
  "notes": "Additional notes about the user"
}

Example Response:

{
  "id": 2,
  "parent": "user123",
  "department": "Marketing",
  "job_title": "Marketing Manager",
  "phone_extension": "5678",
  "emergency_contact": "John Smith",
  "emergency_phone": "+0987654321",
  "notes": "Additional notes about the user",
  "created_at": "2023-10-01T14:30:00Z",
  "updated_at": "2023-10-01T14:30:00Z"
}
Status Description
201 Created
400 Bad Request
401 Unauthorized

GET /user_extra/{id}/

Retrieve specific user extra information by ID.

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 in the response

Example Request:

GET /api/v1/user_extra/1/?device_info=true

Example Response:

{
  "id": 1,
  "parent": "user123",
  "department": "Engineering",
  "job_title": "Senior Developer",
  "phone_extension": "1234",
  "emergency_contact": "Jane Doe",
  "emergency_phone": "+1234567890",
  "notes": "Team lead for mobile development",
  "created_at": "2023-10-01T10:00:00Z",
  "updated_at": "2023-10-01T10:00:00Z"
}
Status Description
200 Success
404 Not Found
401 Unauthorized

PUT /user_extra/{id}/

Update all fields of a user extra information record.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the user extra record
data object body Yes Complete user extra information data

Example Request:

PUT /api/v1/user_extra/1/
Content-Type: application/json

{
  "parent": "user123",
  "department": "Engineering",
  "job_title": "Lead Developer",
  "phone_extension": "1234",
  "emergency_contact": "Jane Doe",
  "emergency_phone": "+1234567890",
  "notes": "Team lead for mobile and web development"
}

Example Response:

{
  "id": 1,
  "parent": "user123",
  "department": "Engineering",
  "job_title": "Lead Developer",
  "phone_extension": "1234",
  "emergency_contact": "Jane Doe",
  "emergency_phone": "+1234567890",
  "notes": "Team lead for mobile and web development",
  "created_at": "2023-10-01T10:00:00Z",
  "updated_at": "2023-10-01T16:45:00Z"
}
Status Description
200 Success
400 Bad Request
404 Not Found
401 Unauthorized

PATCH /user_extra/{id}/

Partially update specific fields of a user extra information record.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the user extra record
data object body Yes Partial user extra information data

Example Request:

PATCH /api/v1/user_extra/1/
Content-Type: application/json

{
  "job_title": "Senior Lead Developer",
  "notes": "Promoted to senior lead position"
}

Example Response:

{
  "id": 1,
  "parent": "user123",
  "department": "Engineering",
  "job_title": "Senior Lead Developer",
  "phone_extension": "1234",
  "emergency_contact": "Jane Doe",
  "emergency_phone": "+1234567890",
  "notes": "Promoted to senior lead position",
  "created_at": "2023-10-01T10:00:00Z",
  "updated_at": "2023-10-01T17:20:00Z"
}
Status Description
200 Success
400 Bad Request
404 Not Found
401 Unauthorized

DELETE /user_extra/{id}/

Delete a user extra information record.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the user extra record

Example Request:

DELETE /api/v1/user_extra/1/
Status Description
204 No Content (Successfully deleted)
404 Not Found
401 Unauthorized

Best Practices

  • Use pagination parameters (limit and offset) when retrieving large datasets to improve performance
  • Include the device_info parameter only when device information is specifically needed
  • Use PATCH instead of PUT for partial updates to reduce bandwidth and avoid overwriting unchanged fields
  • Filter by parent or parent__organization_id to scope results to specific users or organizations
  • Always validate required fields before sending POST/PUT requests to avoid 400 errors
  • Store emergency contact information securely and ensure compliance with data protection regulations
  • Consider implementing soft deletes instead of hard deletes for audit trail purposes