Get Customer Categories
To get a list of customer categories, make a GET request to the /api/v3/client-categories endpoint. Sample request using axios
jsconst response = await axios.get("/api/v3/client-categories");
Sample response object
json[
{
"id": 1224,
"business_id": 1,
"name": "Class of 2021",
"description": "",
"created_at": "2021-05-07T16:33:17.000000Z",
"updated_at": "2021-05-07T16:33:17.000000Z",
"archived": false,
"customer_count": 324
},
{
"id": 2683,
"business_id": 1,
"name": "JHS 3 - 2022",
"description": "",
"created_at": "2021-09-23T10:38:11.000000Z",
"updated_at": "2021-09-23T10:38:11.000000Z",
"archived": false,
"customer_count": 3
}
]
Create a customer categories
To create a customer category, make a POST request to the /api/v3/client-categories endpoint. Sample request using axios:
jsconst response = await axios.post("/api/v3/client-categories",
{
"name": "Technology", // The name of the category
"description": "Products and services related to technology, including hardware and software." // The description of the category
}
{
headers: {
accept: "application/json",
authorization: "Bearer <API-KEY>",
"content-type": "application/json",
},
}
);