Skip to content

Retrieves unit types

Request

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

This endpoint retrieves the full list of unit types available for line items.

This is a read only endpoint, so no request body is needed. Each unit type represents how an item is measured, such as by hour, unit, or pound.

The response returns an array of unit type objects rather than a single item. Each object includes an ID, a name, an abbreviation, and a possible category grouping.

This is an example of the response:

"items":
[
  {
    "name": "Landscaping Service",
    "id": "5ea9e43d-670e-45ce-9cd9-82531f29b936",
    "defaultUnitTypeId": 21,
    "itemCount": 1
  },
  {
    "name": "Consulting Hours",
    "id": "cb689f98-11bb-4a56-9bf7-4ce140cd8222",
    "defaultUnitTypeId": 15,
    "itemCount": 2
  }
],
"total": 2

The id value returned is also called the lineItemId. Details for a specified line item can be retrieved using GET /pay-int-api/line-items.

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 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
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/unit-types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-api-version: 1.0'

Responses

OK

Bodyapplication/json
Array [
idstring, (uuid)

Indicates the line item identifier.

This is also called the lineItemId.

Example: 3c4c08bf-2e3f-4a4b-5c6d-7e8f9a0b1c47

Example:"3c4c08bf-2e3f-4a4b-5c6d-7e8f9a0b1c47"
namestring or null

Indicates a free-formed text name of the line item

Example: Mortgage Service

Example:"Mortgage Service"
abbreviationstring or null

Indicates the abbreviated form of the unit type name.

Example: hr

Example:"hr"
categorystring or null

Indicates the category grouping for the unit type.

Example: Time

Example:"Time"
]
Response
[ { "id": "3c4c08bf-2e3f-4a4b-5c6d-7e8f9a0b1c47", "name": "Mortgage Service", "abbreviation": "hr", "category": "Time" } ]