Skip to content

Updates a line item

Request

PUT {{baseURL}}/pay-int-api/line-items/{{lineItemId}}

This endpoint updates the specified line item.

The following is an example request.

PUT {{baseURL}}/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}.

Security
Bearer
Path
lineItemIdstring, (uuid)required

The ID of the line item to update.

Headers
x-api-versionstring

Specifies the API version to use for the request.

Example: 1.0

Example:1.0
Bodyapplication/json

The line item update request.

productNamestring

Indicates the name of the item.

Example: RollerMouse Wireless Mouse

Example:"RollerMouse Wireless Mouse"
descriptionstring or null

Indicates a description of the item.

Example: RollerMouse Design Collection, Limited Edition Wireless Mouse

Example:"RollerMouse Design Collection, Limited Edition Wireless Mouse"
skustring or null

Indicates the product identifier item.

Example: 24474771

Example:"24474771"
unitPricenumber, (double)

Indicates the unit price of the item.

Example: 18.99

Example:18.99
unitTypeIdinteger, (int32)

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
categoryIdstring or null, (uuid)

Indicates the identifier of the item category.

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

Example:"a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b67"
taxRatenumber, (double)

Indicates the type of tax rate.

Example: 3.25 (as 3.25%)

Example:3.25
curl -i -X PUT \
  'https://developer.flute.com/_mock/api-reference/pay-int-api/line-items/{lineItemId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-version: 1.0' \
  -d '{
    "productName": "RollerMouse Wireless Mouse",
    "description": "RollerMouse Design Collection, Limited Edition Wireless Mouse",
    "sku": "24474771",
    "unitPrice": 18.99,
    "unitTypeId": 1,
    "categoryId": "a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b67",
    "taxRate": 3.25
  }'

Responses

OK. The line item updated successfully

Response
No content