Skip to content

Line Items

Line items are the catalog entries used to build invoices, one per billable product or service.

Each line item has a name, description, SKU, unit price, unit type, and tax rate. A line item can optionally be assigned to a category to organize the catalog. Unit types describe how each item is measured, such as by hour, unit, or pound.

Line items may be grouped into categories. This allows for convenient organization to locate anad select line items. For more information about categories, see Categories.

The Line Items endpoints support creating, listing, updating, and deleting entries. The list endpoint accepts a search string and can filter by category or by items with no category. A separate endpoint retrieves the available unit types a line item can reference. Deleting a line item removes it from the catalog for future invoices.

The following endpoints are available:

EndpointExplanation
GET /pay-int-api/line-itemsLists line items, filtered by search string, category, or items with no category.
POST /pay-int-api/line-itemsCreates a new line item.
PUT /pay-int-api/line-items/{lineItemId}Updates a specified line item.
DELETE /pay-int-api/line-items/{lineItemId}Deletes a line item.
GET /pay-int-api/line-items/unit-typesRetrieves the available unit types for line items.

Lists line items

Request

GET {{baseURL}}/pay-int-api/line-items

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:

{
  "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.

See Also:
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 update a line item, see PUT /pay-int-api/line-items/{lineItemId}.
To delete a line item, see DELETE /pay-int-api/line-items/{lineItemId}.

Security
Bearer
Query
pageinteger, (int32)

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

Default:0
pageSizeinteger, (int32)

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

Default:15
orderBystring

Specifies the field the results get ordered by.

The sort order is specified by the asc value.

Example: contactName

ascboolean

Specifies the sort order.

The sort field is specified by the orderBy value.

If true, the sort order is ascending.
If false, the sort order is descending.

Example: false

Default:false
searchstring

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, use the field orderby to specify the sort field.

Example: Peppared

Example:search=Peppared
categoryIdstring, (uuid)

Specifies the category identifier.

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

Example: 1a2ae69d-0c1d-4e2f-3a4b-5c6d7e8f9a25

Example:categoryId=1a2ae69d-0c1d-4e2f-3a4b-5c6d7e8f9a25
noCategoryboolean

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

Example: true

Default:false
Example:noCategory=true
Headers
x-api-versionstring

Specifies the API version to use for the request.

Example: 1.0

Example:1.0
curl -i -X GET \
  'https://developer.flute.com/_mock/api-reference/pay-int-api/line-items?page=0&pageSize=15&orderBy=string&asc=false&search=Peppared&categoryId=1a2ae69d-0c1d-4e2f-3a4b-5c6d7e8f9a25&noCategory=true' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-api-version: 1.0'

Responses

OK

Bodyapplication/json
itemsArray of objects or null

Line items for the current page.

totalinteger, (int32)

Indicates the total number of line items found.

Example: 26

Example:26
Response
{ "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": 26 }