# Updates a category by its ID

<a id="flute-v1-put-pay-int-api-categories-categoryId"></a>
<span class="api-endpoint">PUT {{<a href="#urlbases">baseURL</a>}}/pay-int-api/categories/{{categoryId}}</span>
This endpoint updates or edits category information.
The category name must be unique in the merchant account.
<span class="api-seealso">See Also:</span><br>
To list categories, see <a href="/api-reference/categories/flute-v1-get-pay-int-api-categories" style="text-decoration: underline;">GET /pay-int-api/categories</a>.<br>
To create a category, see <a href="/api-reference/categories/flute-v1-post-pay-int-api-categories" style="text-decoration: underline;">POST /pay-int-api/categories</a>.<br>
To delete a category, see <a href="/api-reference/categories/flute-v1-delete-pay-int-api-categories-categoryid" style="text-decoration: underline;">DELETE /pay-int-api/categories/{categoryId}</a>.<br>

Endpoint: PUT /pay-int-api/categories/{categoryId}
Version: V1
Security: Bearer

## Path parameters:

  - `categoryId` (string, required)
    Specifies the identifier of the category to update.

## Header parameters:

  - `x-api-version` (string)
    Specifies the API version to use for the request.

Example: 1.0

## Request fields (application/json):

  - `name` (string)
    Specifies the new name of the category.

The category name must be unique within the merchant account.
The creation fails if a category with that name already exis

Example: Mortgage Services
    Example: Mortgage Services

  - `defaultUnitTypeId` (integer)
    Specifies the default unit type identifier for the category.
This sets the default unit of measure, such as each, hour, or pound, that line items assigned to this category will use.
Valid values are:
IDName1Each2Unit3Item4Dozen5Inch6Foot7Yard8Meter9Square footIDName10Fluid ounce11Gallon12Cubic foot13Cubic yard14Cord15Bushel16Board foot17Cubic meter18PoundIDName19Ounce20Ton21Kilogram22Hour23Day24Month25Kilometer26MileExample: 22
    Example: 22

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.
    Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Collections.Generic.KeyNotFoundException
    Example: System.Collections.Generic.KeyNotFoundException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 500 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: An unexpected error occurred while processing the request.
    Example: An unexpected error occurred while processing the request.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: (Service)

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Exception
    Example: System.Exception

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

