Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

Ticket Departments REST API Route

Ticket Departments REST API Route

List, update and create ticket departments via 3rd party applications

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.

id
integer
Unique identifier for the term
Read Only
count
integer
Number of tickets for the term
Read Only
description
string
HTML description of the term
link
string
URL of the term
Read Only
name
string
HTML title for the term
slug
string
An alphanumeric identifier for the term unique to its type
taxonomy
string
Type attribution for the term
Read Only
parent
integer
The parent term ID
meta
object
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: view
One 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: asc
One of: asc, desc
orderby Sort collection by term attribute
Default: name
One 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
name
Required
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: view
One 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>


Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

Developer Docs REST API Last updated: 21/01/2021

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

Ticket Source REST API Route

Next

Replies REST API Route

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code