Skip to content

Creates a new category

Request

POST {{baseURL}}/pay-int-api/categories

This endpoint creates a new category.

Example request:

POST {{baseURL}}/pay-int-api/categories

Authorization: Bearer {{merchantApiToken}}
Content-Type: application/json
x-api-version: 1.0
{
  "name": "Mortgage Services",
  "defaultUnitTypeId": 22
}

See Also:
To list categories, see GET /pay-int-api/categories.
To update a category, see PUT /pay-int-api/categories/{categoryId}.
To delete a category, see DELETE /pay-int-api/categories/{categoryId}.

Security
Bearer
Headers
x-api-versionstring

Specifies the API version to use for the request.

Example: 1.0

Example:1.0
Bodyapplication/json

Specifies the category creation request.

namestring or null

Specifies the name of the category.

The category name must be unique within the merchant account. The creation fails if a category with that name already exists.

Example: Mortgage Services

Example:"Mortgage Services"
defaultUnitTypeIdinteger or null, (int32)

Specifies the default unit type identifier for the category.

This sets the default unit of measure, such as each, hour, or pound, that line items assigned to this category will use.

Valid values are:

IDName
1Each
2Unit
3Item
4Dozen
5Inch
6Foot
7Yard
8Meter
9Square foot
IDName
10Fluid ounce
11Gallon
12Cubic foot
13Cubic yard
14Cord
15Bushel
16Board foot
17Cubic meter
18Pound
IDName
19Ounce
20Ton
21Kilogram
22Hour
23Day
24Month
25Kilometer
26Mile

Example: 22

Example:22
curl -i -X POST \
  https://developer.flute.com/_mock/api-reference/pay-int-api/categories \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-version: 1.0' \
  -d '{
    "name": "Mortgage Services",
    "defaultUnitTypeId": 22
  }'

Responses

OK

Bodyapplication/json
idstring, (uuid)

Indicates the identifier of the created category.

Example: 6780a6b7-8c9d-4e0f-1a2b-3c4d5e6f7a03

Example:"6780a6b7-8c9d-4e0f-1a2b-3c4d5e6f7a03"
Response
{ "id": "6780a6b7-8c9d-4e0f-1a2b-3c4d5e6f7a03" }