Ticket Departments REST API Route
Authentication #
Authentication is only required for this route if you are adding or editing departments.
Schema #
When working with the Ticket Departments REST API route the following fields can be expected in any responses.
idinteger |
Unique identifier for the term Read Only |
countinteger |
Number of tickets for the term Read Only |
descriptionstring |
HTML description of the term |
linkstring |
URL of the term Read Only |
namestring |
HTML title for the term |
slugstring |
An alphanumeric identifier for the term unique to its type |
taxonomystring |
Type attribution for the term Read Only |
parentinteger |
The parent term ID |
metaobject |
Meta fields |
List Ticket Department Categories #
Query this endpoint to retrieve a collection of departments. The response you receive can be controlled and filtered using the URL query parameters below.
Definition #
GET /wp/v2/ticket_departments
Example Request #
$ curl https://example.com/wp-json/wp/v2/ticket_departments
Arguments #
context |
Scope under which the request is made; determines fields present in response Default: viewOne of: view, embed, edit |
page |
Current page of the collection Default: 1 |
per_page |
Maximum number of items to be returned in result set Default: 10 |
search |
Limit results to those matching a string |
exclude |
Ensure result set excludes specific IDs |
include |
Limit result set to specific IDs |
order |
Order sort attribute ascending or descending Default: ascOne of: asc, desc |
orderby |
Sort collection by term attribute Default: nameOne of: id, include, name, slug, include_slugs, term_group, description, count |
hide_empty |
Whether to hide terms not assigned to any posts |
parent |
Limit result set to terms assigned to a specific parent |
post |
Limit result set to terms assigned to a specific ticket |
slug |
Limit result set to terms with one or more specific slugs |
Create a Ticket Department #
Arguments #
description |
HTML description of the term |
nameRequired |
HTML title for the term. |
slug |
An alphanumeric identifier for the term unique to its type |
parent |
The parent term ID |
meta |
Meta fields |
Definition #
POST /wp/v2/ticket_departments
Retrieve a Ticket Department #
Definition #
GET /wp/v2/ticket_departments/<id>
Example Request #
$ curl https://example.com/wp-json/wp/v2/ticket_departments/<id>
Arguments #
id |
Unique identifier for the term |
context |
Scope under which the request is made; determines fields present in response Default: viewOne of: view, embed, edit |
Update a Ticket Department #
Arguments #
id |
Unique identifier for the term |
description |
HTML description of the term |
name |
HTML title for the term |
slug |
An alphanumeric identifier for the term unique to its type |
parent |
The parent term ID |
meta |
Meta fields |
Definition #
POST /wp/v2/ticket_departments/<id>
Example Request #
$ curl -X POST https://example.com/wp-json/wp/v2/ticket_departments/<id> -d '{"description":"My department term"}'
Delete a Ticket Department #
Arguments #
id |
Unique identifier for the term |
force |
Required to be true, as terms do not support trashing |
Definition #
DELETE /wp/v2/ticket_departments/<id>
Example Request #
$ curl -X DELETE https://example.com/wp-json/wp/v2/ticket_departments/<id>
