Keap Product Categories API
Keap Product Categories API — 9 operations across 5 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.
Keap Product Categories API — 9 operations across 5 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.
openapi: 3.1.0
info:
title: Keap Product Categories API
description: Keap Public API Documentation
termsOfService: https://www.thryv.com/terms-of-use
contact:
name: Keap
url: https://developer.keap.com/get-support
email: api.keap@thryv.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
version: v2
servers:
- url: https://api.infusionsoft.com/crm
tags:
- name: Product Categories
paths:
/rest/v2/productCategories:
get:
tags:
- Product Categories
summary: List all Product Categories
description: Retrieves a list of Product Categories
operationId: listProductCategories
parameters:
- name: filter
in: query
description: 'Filter to apply, allowed fields are:
- (String) `product_id`
- (String) `name` - Wildcard matching allowed
- (Number) `product_category_id` - supports comparison operators: `==`,`!=`, `>`, `<`, `>=`,
`<=`
You will need to apply the `==` operator to check the equality of one of the filters with your
searched
word, in the encoded form `%3D%3D`.
For fields which allow wildcard matching, you may use the * wildcard character (or its encoded
form %2A)
for case-insensitive partial matching on text fields. Example of a valid pattern of wildcard
usage:
- `field==foo*` finds anything in `field` that begins with `foo`
For the filters listed above, here are some examples:
- `filter=product_id%3D%3D29`
- `filter=name%3D%3DTestSearch`
- `filter=name%3D%3DElec*` (starts with "Elec")
- `filter=product_category_id>5` (category ID greater than 5)
- `filter=product_category_id>=10` (category ID greater than or equal to 10)
- `filter=product_category_id%3D%3D42` (category ID equals 42)
- `filter=name%3D%3DElec*%3Bproduct_category_id>5` (multiple filters combined)
'
required: false
schema:
type: string
- name: page_token
in: query
description: Page token
required: false
schema:
type: string
- name: order_by
in: query
description: 'Attribute and direction to order items.
One of the following fields:
- `id`
One of the following directions:
- `asc`
- `desc`'
required: false
schema:
type: string
- name: page_size
in: query
description: Total number of items to return per page
required: false
schema:
type: integer
format: int32
maximum: 1000
minimum: 0
example: 0
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListProductCategoriesResponse'
post:
tags:
- Product Categories
summary: Create a Product Category
description: Creates a new Product Category
operationId: createProductCategory
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProductCategoryRequest'
required: true
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCategory'
/rest/v2/productCategories/{category_id}:assignProducts:
post:
tags:
- Product Categories
summary: Assign Products to a Product Category
description: Updates the list of products assigned to a Product Category. **Note:** The full list
of product IDs that should remain assigned must be provided; any IDs omitted are removed automatically.
operationId: assignProductsToCategory
parameters:
- name: category_id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AssignProductsRequest'
required: true
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'204':
description: No Content
/rest/v2/productCategories/{category_id}/images:
post:
tags:
- Product Categories
summary: Create the product category image file
description: Creates the product category image file and uploads it to the specified product category
operationId: createImageFile
parameters:
- name: category_id
in: path
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description: File to upload
required:
- file
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'201':
description: Created
delete:
tags:
- Product Categories
summary: Delete the image from a product category
description: Deletes the image from the specified product category
operationId: deleteImageFile
parameters:
- name: category_id
in: path
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'204':
description: No Content
/rest/v2/productCategories/{category_id}:
get:
tags:
- Product Categories
summary: Get a Product Category
description: Gets a single Product Category
operationId: getProductCategory
parameters:
- name: category_id
in: path
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCategory'
delete:
tags:
- Product Categories
summary: Delete a Product Category
description: Deletes the specified Product Category, its sub-categories, and removes products from
it
operationId: deleteProductCategory
parameters:
- name: category_id
in: path
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'204':
description: No Content
patch:
tags:
- Product Categories
summary: Update a Product Category
description: Updates a single Product Category
operationId: updateProductCategory
parameters:
- name: category_id
in: path
required: true
schema:
type: string
- name: update_mask
in: query
description: An optional list of properties to be updated. If set, only the provided properties
will be updated and others will be skipped.
required: false
schema:
type: array
items:
type: string
enum:
- name
- display_order_index
- parent_category_id
uniqueItems: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateProductCategoryRequest'
required: true
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCategory'
/rest/v2/productCategories/assignedProducts:
get:
tags:
- Product Categories
summary: List Assigned Products to Categories
description: Retrieves a list of Products assigned to Product Categories
operationId: listAssignedProducts
parameters:
- name: filter
in: query
description: 'Filter to apply, allowed fields are:
- (List[String]) `product_ids`
- (List[String]) `product_category_ids`
'
required: false
schema:
type: string
- name: page_token
in: query
description: Page token
required: false
schema:
type: string
- name: order_by
in: query
description: 'Attribute and direction to order items.
One of the following fields:
- `product_category_id`
One of the following directions:
- `asc`
- `desc`'
required: false
schema:
type: string
- name: page_size
in: query
description: Total number of items to return per page
required: false
schema:
type: integer
format: int32
maximum: 1000
minimum: 0
example: 0
responses:
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'501':
description: Method Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListAssignedProductsResponse'
components:
schemas:
AssignProductsRequest:
type: object
properties:
product_ids:
type: array
items:
type: string
uniqueItems: true
required:
- product_ids
AssignedProducts:
type: object
properties:
product_category_id:
type: string
description: The product category ID
example: 123
product_ids:
type: array
description: Assigned product IDs
items:
type: string
CreateProductCategoryRequest:
type: object
description: productCategory
properties:
name:
type: string
description: The category name
example: Electronics
display_order_index:
type: integer
format: int32
description: Display order of the category
example: 0
parent_category_id:
type: string
description: Parent category ID for subcategories
example: 2
required:
- name
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
status:
type: string
details:
type: array
items:
$ref: '#/components/schemas/ErrorDetails'
ErrorDetails:
type: object
properties:
domain:
type: string
resource:
type: string
ListAssignedProductsResponse:
type: object
properties:
assigned_product_categories:
type: array
items:
$ref: '#/components/schemas/AssignedProducts'
next_page_token:
type: string
ListProductCategoriesResponse:
type: object
properties:
product_categories:
type: array
items:
$ref: '#/components/schemas/ProductCategory'
next_page_token:
type: string
ProductCategory:
type: object
properties:
id:
type: string
description: The product category ID
example: 1
name:
type: string
description: The category name
example: Electronics
display_order_index:
type: integer
format: int32
description: Display order of the category
example: 0
parent_category_id:
type: string
description: Parent category ID for subcategories
example: 2
UpdateProductCategoryRequest:
type: object
properties:
name:
type: string
description: The category name
example: Electronics
display_order_index:
type: integer
format: int32
description: Display order of the category
example: 0
parent_category_id:
type: string
description: Parent category ID for subcategories
example: 2
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize
tokenUrl: https://api.infusionsoft.com/token
scopes: {}
security:
- oauth2: []