# Lists line items

<a id="flute-v1-get-pay-int-api-line-items"></a>
<span class="api-endpoint">GET {{<a href="#urlbases">baseURL</a>}}/pay-int-api/line-items</span>
This endpoint retrieves a paginated list of line items from the merchant's catalog.
Results can be filtered by search string, by a specific category, or limited to only items with no category assigned.
Each item in the response includes its name, description, SKU, unit price, unit type, and any associated category information.
The following is an example of a single line item in the response:

```json
{
  "items": [
    {
      "id": "d0f6d7e8-9f0a-4b1c-2d3e-4f5a6b7c8d14",
      "unitType": "Each",
      "unitTypeId": 1,
      "productName": "RollerMouse Wireless Mouse",
      "description": "RollerMouse Design Collection, Limited Edition Wireless Mouse",
      "sku": "24474771",
      "unitPrice": 18.99,
      "categoryId": "a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b67",
      "categoryName": "Computer Accessories",
      "categoryDefaultUnitTypeId": 1
    }
  ],
  "total": 1
}
```
The `total` field in the response indicates how many line items matched the request.
This is independent of how many are returned on the current page.
<span class="api-seealso">See Also:</span><br>
To create a line item, see <a href="/api-reference/line-items/flute-v1-post-pay-int-api-line-items" style="text-decoration: underline;">POST /pay-int-api/line-items</a>.<br>
To retrieve line item unit types, see <a href="/api-reference/line-items/flute-v1-get-pay-int-api-line-items-unit-types" style="text-decoration: underline;">GET /pay-int-api/line-items/unit-types</a>.<br>
To update a line item, see <a href="/api-reference/line-items/flute-v1-put-pay-int-api-line-items-lineitemid" style="text-decoration: underline;">PUT /pay-int-api/line-items/{lineItemId}</a>.<br>
To delete a line item, see <a href="/api-reference/line-items/flute-v1-delete-pay-int-api-line-items-lineitemid" style="text-decoration: underline;">DELETE /pay-int-api/line-items/{lineItemId}</a>.<br>

Endpoint: GET /pay-int-api/line-items
Version: V1
Security: Bearer

## Query parameters:

  - `page` (integer)
    Specifies the page number of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Values above the maximum page value will complete successfully but not return any items.

Example: 0

  - `pageSize` (integer)
    Specifies the number of items for each page of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Example: 50

  - `orderBy` (string)
    Specifies the field the results get ordered by.

The sort order is specified by the `asc` value.

Example: contactName

  - `asc` (boolean)
    Specifies the sort order is ascending.

The sort field is specified by the `orderBy` value.

If `true`, the sort order is ascending.<br>
If `false`, the sort order is descending.

Example: true

  - `search` (string)
    Specifies the search string.

This performs a case insensitive, matching, or partially matching search.

Fields does not have to be specified.
If the results are to be sorted, the field `orderby` to specify the sort field.

  - `categoryId` (string)
    Specifies the category identifier.

This is mutually exclusive with `noCategory`.
If `noCategory` is also provided, `noCategory` is ignored.

  - `noCategory` (boolean)
    Specifies the results to only line items that have no category assigned (`categoryId` is null).

If null or omitted, all line items are returned regardless of category assignment.

If `true`, return only line items that have no category assigned.<br>
If `false`, return all line items are returned regardless of category assignment.
                                                                                                         
This is mutually exclusive with `categoryId`.
If `categoryId` is also provided, `noCategory` is ignored.

## Header parameters:

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

Example: 1.0

## Response 200 fields (application/json):

  - `items` (array)
    Line items for the current page.

  - `items.id` (string)
    Indicates the identifier of the item.

Example: d0f6d7e8-9f0a-4b1c-2d3e-4f5a6b7c8d14
    Example: d0f6d7e8-9f0a-4b1c-2d3e-4f5a6b7c8d14

  - `items.unitType` (string)
    Indicates the unit of measure associated with the item.
This is a string 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.
See the field `unitTypeId` for a numeric equivalent.
Example: Each
    Example: Each

  - `items.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.
See the field `unitType` for a string equivalent.
Example: 1
    Example: 1

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

Example: RollerMouse Wireless Mouse
    Example: RollerMouse Wireless Mouse

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

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

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

Example: 24474771
    Example: 24474771

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

Example: 18.99
    Example: 18.99

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

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

  - `items.categoryName` (string)
    Indicates the category associated with the item.

Example: Computer Accessories
    Example: Computer Accessories

  - `items.categoryDefaultUnitTypeId` (integer)
    Indicates the default unit type identifier associated with the category.

Example: 1
    Example: 1

  - `total` (integer)
    Indicates the total number of line items found.

Example: 26
    Example: 26

