# Update a task

This endpoint updates trainer task in a gym.

Endpoint: PUT /api/v2/tasks/{taskId}
Version: 2.0.0
Security: mms

## Security:

  - `mms` (unknown)
    apiKey in header x-api-key

## Path parameters:

  - `taskId` (integer, required)

## Request fields (application/json):

  - `name` (string, required)
    Task name

  - `type` (string)
    Task type
    Enum: "GENERAL", "ANAMNESIS", "COORDINATION_FITNESS_TEST", "HEALTH_FITNESS_TEST", "PWC_FITNESS_TEST", "MAX_FORCE_FITNESS_TEST", "MOBILITY_SCREEN_FITNESS_TEST", "BLOOD_PRESSURE_FITNESS_TEST", "POLAR_FITNESS_TEST", "INBODY_FITNESS_TEST", "JAWON_FITNESS_TEST"

  - `dueDate` (string, required)
    Task completion deadline date. format: yyyy-MM-dd

  - `authorId` (string, required)
    The author of the task. EGYM account ID

  - `targetId` (string, required)
    The account of task related to. EGYM account ID

  - `completerId` (string)
    The account who solved the task. EGYM account ID

  - `completed` (boolean)
    If this task has been completed in the gym this will be true, false otherwise.

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `id` (string)
    The ID of the task

  - `name` (string, required)
    Task name

  - `type` (string)
    Task type
    Enum: "GENERAL", "ANAMNESIS", "COORDINATION_FITNESS_TEST", "HEALTH_FITNESS_TEST", "PWC_FITNESS_TEST", "MAX_FORCE_FITNESS_TEST", "MOBILITY_SCREEN_FITNESS_TEST", "BLOOD_PRESSURE_FITNESS_TEST", "POLAR_FITNESS_TEST", "INBODY_FITNESS_TEST", "JAWON_FITNESS_TEST"

  - `dueDate` (string, required)
    Task completion deadline date. format: yyyy-MM-dd

  - `authorId` (string, required)
    The author of the task. EGYM account ID

  - `targetId` (string, required)
    The account of task related to. EGYM account ID

  - `completerId` (string)
    The account who solved the task. EGYM account ID

  - `completed` (boolean)
    If this task has been completed in the gym this will be true, false otherwise.

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: de625cf1-1

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: age

  - `fieldErrors.message` (string)
    The error message.
    Example: Must be greater than 10.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: de625cf1-1

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: age

  - `fieldErrors.message` (string)
    The error message.
    Example: Must be greater than 10.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: de625cf1-1

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: age

  - `fieldErrors.message` (string)
    The error message.
    Example: Must be greater than 10.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: de625cf1-1

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: age

  - `fieldErrors.message` (string)
    The error message.
    Example: Must be greater than 10.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: de625cf1-1

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: age

  - `fieldErrors.message` (string)
    The error message.
    Example: Must be greater than 10.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context

