---
title: "Update a test type. Roles: admin."
method: PUT
path: "/api/test-types/{testTypeId}"
tags: ["Tests"]
---

# Update a test type. Roles: admin.

`PUT /api/test-types/{testTypeId}`

## Path parameters

- `testTypeId` integer, required

## Request body

- TestTypeUpdateRequest
  - `membershipId` integer, required
  - `name` string, required
  - `description` string
  - `testVariables` TestVariableRequest[]
    - `testVariableId` integer
    - `uomId` integer
    - `uomCode` 'ACCEL_G' | 'ACCEL_FT_S2' | 'ACCEL_M_S2' | 'ANGLE_DEG' | 'ANGLE_MIN' | 'ANGLE_SEC' | 'AREA_SQ_IN' | 'AREA_SQ_FT' | 'AREA_SQ_KM' | 'FORCE_KG_M' | 'LENGTH_IN' | 'LENGTH_FT' | 'LENGTH_YD' | 'LENGTH_MI' | 'LENGTH_MM' | 'LENGTH_CM' | 'LENGTH_M' | 'LENGTH_KM' | 'MASS_OZ' | 'MASS_LB' | 'MASS_MG' | 'MASS_G' | 'MASS_KG' | 'POWER_W' | 'POWER_W_KG' | 'POWER_W_KG_FT2' | 'STATISTIC_PCT' | 'TEMP_C' | 'TEMP_F' | 'TIME_MS' | 'TIME_SEC' | 'TIME_MIN' | 'TIME_HR' | 'TIME_DAY' | 'TIME_WK' | 'TIME_MON' | 'TIME_YR' | 'VELOCITY_STEPS_S' | 'VELOCITY_M_S' | 'VELOCITY_FT_S' | 'VELOCITY_MPH' | 'VELOCITY_RPM' | 'VOLUME_FL_OZ' | 'VOLUME_PT' | 'VOLUME_QT' | 'VOLUME_GAL' | 'VOLUME_ML' | 'VOLUME_L' | 'VOLUME_KL' | 'VOLUME_CC'
    - `code` string, required
    - `contextCode` 'STEP' | 'TEST', required
    - `datatypeCode` 'BOOLEAN' | 'DATE' | 'DATETIME' | 'HTML' | 'NUMBER' | 'STRING' | 'TIME', required
    - `name` string, required
    - `abbr` string
    - `seq` integer, required
    - `numScale` integer
    - `required` boolean, required
  - `stepVariables` TestVariableRequest[]
    - `testVariableId` integer
    - `uomId` integer
    - `uomCode` 'ACCEL_G' | 'ACCEL_FT_S2' | 'ACCEL_M_S2' | 'ANGLE_DEG' | 'ANGLE_MIN' | 'ANGLE_SEC' | 'AREA_SQ_IN' | 'AREA_SQ_FT' | 'AREA_SQ_KM' | 'FORCE_KG_M' | 'LENGTH_IN' | 'LENGTH_FT' | 'LENGTH_YD' | 'LENGTH_MI' | 'LENGTH_MM' | 'LENGTH_CM' | 'LENGTH_M' | 'LENGTH_KM' | 'MASS_OZ' | 'MASS_LB' | 'MASS_MG' | 'MASS_G' | 'MASS_KG' | 'POWER_W' | 'POWER_W_KG' | 'POWER_W_KG_FT2' | 'STATISTIC_PCT' | 'TEMP_C' | 'TEMP_F' | 'TIME_MS' | 'TIME_SEC' | 'TIME_MIN' | 'TIME_HR' | 'TIME_DAY' | 'TIME_WK' | 'TIME_MON' | 'TIME_YR' | 'VELOCITY_STEPS_S' | 'VELOCITY_M_S' | 'VELOCITY_FT_S' | 'VELOCITY_MPH' | 'VELOCITY_RPM' | 'VOLUME_FL_OZ' | 'VOLUME_PT' | 'VOLUME_QT' | 'VOLUME_GAL' | 'VOLUME_ML' | 'VOLUME_L' | 'VOLUME_KL' | 'VOLUME_CC'
    - `code` string, required
    - `contextCode` 'STEP' | 'TEST', required
    - `datatypeCode` 'BOOLEAN' | 'DATE' | 'DATETIME' | 'HTML' | 'NUMBER' | 'STRING' | 'TIME', required
    - `name` string, required
    - `abbr` string
    - `seq` integer, required
    - `numScale` integer
    - `required` boolean, required
  - `allVariables` TestVariableRequest[]
    - `testVariableId` integer
    - `uomId` integer
    - `uomCode` 'ACCEL_G' | 'ACCEL_FT_S2' | 'ACCEL_M_S2' | 'ANGLE_DEG' | 'ANGLE_MIN' | 'ANGLE_SEC' | 'AREA_SQ_IN' | 'AREA_SQ_FT' | 'AREA_SQ_KM' | 'FORCE_KG_M' | 'LENGTH_IN' | 'LENGTH_FT' | 'LENGTH_YD' | 'LENGTH_MI' | 'LENGTH_MM' | 'LENGTH_CM' | 'LENGTH_M' | 'LENGTH_KM' | 'MASS_OZ' | 'MASS_LB' | 'MASS_MG' | 'MASS_G' | 'MASS_KG' | 'POWER_W' | 'POWER_W_KG' | 'POWER_W_KG_FT2' | 'STATISTIC_PCT' | 'TEMP_C' | 'TEMP_F' | 'TIME_MS' | 'TIME_SEC' | 'TIME_MIN' | 'TIME_HR' | 'TIME_DAY' | 'TIME_WK' | 'TIME_MON' | 'TIME_YR' | 'VELOCITY_STEPS_S' | 'VELOCITY_M_S' | 'VELOCITY_FT_S' | 'VELOCITY_MPH' | 'VELOCITY_RPM' | 'VOLUME_FL_OZ' | 'VOLUME_PT' | 'VOLUME_QT' | 'VOLUME_GAL' | 'VOLUME_ML' | 'VOLUME_L' | 'VOLUME_KL' | 'VOLUME_CC'
    - `code` string, required
    - `contextCode` 'STEP' | 'TEST', required
    - `datatypeCode` 'BOOLEAN' | 'DATE' | 'DATETIME' | 'HTML' | 'NUMBER' | 'STRING' | 'TIME', required
    - `name` string, required
    - `abbr` string
    - `seq` integer, required
    - `numScale` integer
    - `required` boolean, required

## Response `200`

OK

- TestTypeResponseTestTypeFull
  - `success` boolean
  - `error` string
  - `testType` TestTypeFull
    - `audit` Audit
      - `createdTime` string, date-time
      - `modifiedTime` string, date-time
      - `modifiedBy` string
    - `testTypeId` integer
    - `membershipId` integer
    - `code` string
    - `name` string
    - `description` string
    - `external` boolean
    - `testVariables` TestVariableCore[]
      - `audit` Audit
        - `createdTime` string, date-time
        - `modifiedTime` string, date-time
        - `modifiedBy` string
      - `testVariableId` integer
      - `uomId` integer
      - `code` string
      - `contextCode` 'STEP' | 'TEST'
      - `datatypeCode` 'BOOLEAN' | 'DATE' | 'DATETIME' | 'HTML' | 'NUMBER' | 'STRING' | 'TIME'
      - `required` boolean
      - `name` string
      - `abbr` string
      - `seq` integer
      - `numScale` integer
    - `stepVariables` TestVariableCore[]
      - `audit` Audit
        - `createdTime` string, date-time
        - `modifiedTime` string, date-time
        - `modifiedBy` string
      - `testVariableId` integer
      - `uomId` integer
      - `code` string
      - `contextCode` 'STEP' | 'TEST'
      - `datatypeCode` 'BOOLEAN' | 'DATE' | 'DATETIME' | 'HTML' | 'NUMBER' | 'STRING' | 'TIME'
      - `required` boolean
      - `name` string
      - `abbr` string
      - `seq` integer
      - `numScale` integer

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.dev/mobilecoach/apis/untitled-api.md) · [All operations](https://skmtc.dev/mobilecoach/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mobilecoach/untitled-api/revisions/f2568e11c0ab/schema)
