Xentral Product Category API
Product Category represents the Product Category Tree that can be used to categorise products.
Product Category represents the Product Category Tree that can be used to categorise products.
openapi: 3.0.0
info:
title: Xentral Account Product Category API
version: v0.1
description: Xentral is an ERP platform.
contact:
name: Xentral
url: https://xentral.com
email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
description: Your Xentral Instance
variables:
xentralId:
default: xentral
- url: https://{domain}
description: Xentral at a custom domain
variables:
domain:
default: xentral.com
security:
- BearerAuth: []
tags:
- name: Product Category
description: Product Category represents the Product Category Tree that can be used to categorise products.
paths:
/api/v1/productsCategories:
get:
tags:
- Product Category
operationId: productCategory.list
summary: List product categories
description: Lists all available products categories.
responses:
'200':
description: Operation completed successfully.
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
description: Name of the product category
example: Clothing
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
examples:
Lists all product categories:
value:
data:
- id: '5'
name: Candy
parent:
id: '3'
name: Food
- id: '3'
name: Food
parent: null
- id: '4'
name: Gardening
parent: null
- id: '6'
name: Plants
parent:
id: '4'
name: Gardening
- id: '8'
name: Repair
parent:
id: '2'
name: Services
- id: '2'
name: Services
parent: null
- id: '7'
name: Tools
parent:
id: '4'
name: Gardening
application/vnd.xentral.hierarchy+json:
schema:
type: object
additionalProperties: false
properties:
data:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
description: Name of the product category
example: Clothing
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
children:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
children:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
children:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
children:
type: array
items:
type: object
description: Categories nested indefinitely.
description: Nested categories.
examples:
Lists all product categories in hierarchical order:
value:
data:
- id: '3'
name: Food
parent: null
children:
- id: '5'
name: Candy
parent:
id: '3'
name: Food
children: []
- id: '4'
name: Gardening
parent: null
children:
- id: '6'
name: Plants
parent:
id: '4'
name: Gardening
children: []
- id: '7'
name: Tools
parent:
id: '4'
name: Gardening
children: []
- id: '2'
name: Services
parent: null
children:
- id: '8'
name: Repair
parent:
id: '2'
name: Services
children: []
'401':
description: Unable to authenticate the client
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error message explaining why the request failed.
example: 'Missing required scopes: customer:create.'
example:
message: 'Missing required scopes: customer:create.'
text/html:
schema:
type: string
example: Unauthorized
'403':
description: Unable to authorize the client
'406':
description: Requested resource representation does not exist.
'429':
description: Too many API calls made.
post:
tags:
- Product Category
operationId: productCategory.create
summary: Create product category
description: Creates a new product category.
parameters: []
requestBody:
description: Product category create request payload
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
name:
type: string
parent:
description: Reference to another resource
type: object
additionalProperties: false
required:
- id
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
example:
id: '1337'
examples:
create ProductCategory payload:
value:
name: Computers
parent:
id: '1024'
responses:
'201':
description: Resource successfully created response
headers:
Location:
schema:
type: string
example: https://example.xentral.biz/api/users/17
description: URI of the created resource
content:
text/html:
schema:
type: string
enum:
- ''
nullable: true
'400':
description: IETF RFC 9457 Problem API compliant response
content:
application/problem+json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- type
- title
- violations
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/request-validation
title:
type: string
minLength: 1
example: Request payload validation failed.
violations:
oneOf:
- type: array
items:
type: object
example:
username:
- This value should not be blank.
email:
- This value is not a valid email address.
description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
- type: object
example:
_:
- This value should contain at most `9` elements.
description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/generic-validation
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflict
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- items
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflictItems
title:
type: string
minLength: 1
items:
type: array
items:
type: object
additionalProperties: false
required:
- id
- title
- messages
properties:
id:
type: integer
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- scopes
properties:
type:
type: string
enum:
- https://developer.xentral.com/reference/problems#token-scopes
title:
type: string
minLength: 1
scopes:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/generic-validation
title:
type: string
minLength: 1
messages:
type: object
additionalProperties:
type: array
items:
type: string
'401':
description: Unable to authenticate the client
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error message explaining why the request failed.
example: 'Missing required scopes: customer:create.'
example:
message: 'Missing required scopes: customer:create.'
text/html:
schema:
type: string
example: Unauthorized
'403':
description: Unable to authorize the client
'409':
description: Request conflict with the current state of the target resource
content:
application/problem+json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflict
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- items
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflictItems
title:
type: string
minLength: 1
items:
type: array
items:
type: object
additionalProperties: false
required:
- id
- title
- messages
properties:
id:
type: integer
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
'415':
description: Resource representation send in the request is not supported.
'429':
description: Too many API calls made.
/api/v1/productsCategories/{id}:
get:
tags:
- Product Category
operationId: productCategory.view
summary: View product category
description: Returns details of a single product category
parameters:
- in: path
name: id
required: true
description: The resource's identifier.
schema:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
responses:
'200':
description: Operation completed successfully.
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
x-description-missing: true
type: object
example:
id: '3'
name: Clothing
parent: null
additionalProperties: false
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
description: Name of the product category
example: Clothing
parent:
description: An optional object with id and name
type: object
additionalProperties: false
required:
- id
- name
nullable: true
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
name:
type: string
example:
id: '1337'
name: Diamond
examples:
Shows a single product category:
value:
data:
id: '3'
name: Food
parent: null
'401':
description: Unable to authenticate the client
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error message explaining why the request failed.
example: 'Missing required scopes: customer:create.'
example:
message: 'Missing required scopes: customer:create.'
text/html:
schema:
type: string
example: Unauthorized
'403':
description: Unable to authorize the client
'404':
description: Resource was not found or not enough access privileges
'429':
description: Too many API calls made.
patch:
tags:
- Product Category
operationId: productCategory.update
summary: Update product category
description: Updates details of a single product category
parameters:
- in: path
name: id
required: true
description: The resource's identifier.
schema:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
requestBody:
description: Product category update request payload
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
name:
type: string
parent:
description: Reference to another resource
type: object
additionalProperties: false
required:
- id
properties:
id:
type: string
pattern: \d+
example: '17'
description: Resource identifier.
example:
id: '1337'
examples:
create ProductCategory payload:
value:
name: Computers
parent:
id: '1024'
responses:
'204':
description: Operation completed successfully, no response body
'400':
description: IETF RFC 9457 Problem API compliant response
content:
application/problem+json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- type
- title
- violations
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/request-validation
title:
type: string
minLength: 1
example: Request payload validation failed.
violations:
oneOf:
- type: array
items:
type: object
example:
username:
- This value should not be blank.
email:
- This value is not a valid email address.
description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
- type: object
example:
_:
- This value should contain at most `9` elements.
description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/generic-validation
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflict
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- items
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/conflictItems
title:
type: string
minLength: 1
items:
type: array
items:
type: object
additionalProperties: false
required:
- id
- title
- messages
properties:
id:
type: integer
title:
type: string
minLength: 1
messages:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- scopes
properties:
type:
type: string
enum:
- https://developer.xentral.com/reference/problems#token-scopes
title:
type: string
minLength: 1
scopes:
type: array
items:
type: string
- type: object
additionalProperties: false
required:
- type
- title
- messages
properties:
type:
type: string
enum:
- https://api.xentral.biz/problems/generic-validation
title:
type: string
minLength: 1
messages:
type: object
additionalProperties:
type: array
items:
type: string
'401':
description: Unable to authenticate the client
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Er
# --- truncated at 32 KB (37 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/xentral/refs/heads/main/openapi/xentral-product-category-api-openapi.yml