# Updates a line item

PUT {{baseURL}}/pay-int-api/line-items/{{lineItemId}}
This endpoint updates the specified line item.
The following is an example request.

```http
PUT /pay-int-api/line-items/{{lineItemId}} HTTP/1.1
Authorization: Bearer {{accessToken}}
x-api-version: 1.0
Content-Type: application/json
  
  {
    "productName": "Wireless Mouse", // Changed from 'USB Mouse'
    "unitPrice": 18.99,
    "unitTypeId": 1
  }
```

Care must be taken to complete all the fields with the existing information.
The update replaces the entire settings record, so all fields must be included, even ones that aren't changing.
Any field left out is not preserved from the previous version.
See Also:
To list line items, see GET /pay-int-api/line-items.
To create a line item, see POST /pay-int-api/line-items.
To retrieve line item unit types, see GET /pay-int-api/line-items/unit-types.
To delete a line item, see DELETE /pay-int-api/line-items/{lineItemId}.

Endpoint: PUT /pay-int-api/line-items/{lineItemId}
Version: V1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `lineItemId` (string, required)
    The ID of the line item to update.

## Header parameters:

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

Example: 1.0

## Request body:

  - `application/json` (unknown)
    The line item update request.

## Request fields (application/json):

  - `productName` (string)
    Indicates the name of the item.

Example: RollerMouse Wireless Mouse
    Example: RollerMouse Wireless Mouse

  - `description` (string)
    Indicates a description of the item.

Example: RollerMouse Design Collection, Limited Edition Wireless Mouse
    Example: RollerMouse Design Collection, Limited Edition Wireless Mouse

  - `sku` (string)
    Indicates the product identifier item.

Example: 24474771
    Example: 24474771

  - `unitPrice` (number)
    Indicates the unit price of the item.

Example: 18.99
    Example: 18.99

  - `unitTypeId` (integer)
    Indicates the identifier of the unit type.

This is a numeric identifier represents the unit of measure for the item.
Each supplier provides their own lookup value.
That value maps to a predefined unit type in their system.

Example: 1
    Example: 1

  - `categoryId` (string)
    Indicates the identifier of the item category.

Example: a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b67
    Example: a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b67

  - `taxRate` (number)
    Indicates the type of tax rate.
Example: 3.25 (as 3.25%)
    Example: 3.25

## Response 200:

  - `200` (unknown)
    OK. The line item updated successfully

## Response 400:

  - `400` (unknown)
    Bad Request

## 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

  - `errors` (object)
    Indicates the collection of validation errors, keyed by field name.
Example:
{ "Email": ["'Email' is not a valid email address."] }

## Response 404:

  - `404` (unknown)
    Resource not found

## 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:

  - `500` (unknown)
    Internal Error

## 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

