Skip to content

Measurement Field Serializer Documentation

This section outlines the MeasurementFieldSerializer, which is used in the API to handle the serialization of measurement field data. This serializer transforms data between Django models and JSON format, facilitating API requests and responses.


Serializers

  1. Measurement Field Serializer: MeasurementFieldSerializer

1. Measurement Field Serializer

Serializer Overview

MeasurementFieldSerializer is used to serialize measurement field data. It includes the field's unique identifier, name, status (active or inactive), and the timestamp of when it was created.

Fields

Field Type Description
id integer The unique identifier for the measurement field.
name string The desc of the measurement field.
description charfield The name of the measurement field.
is_active boolean Indicates whether the measurement field is active.
created_at datetime The date and time when the measurement field was created.

Example Response

Reponse

{
  "id": 1,
  "name": "Waist Size",
  "description": "This is test desc",
  "is_active": true,
  "created_at": "2025-03-14T10:00:00Z"
}