Getting taxonomy terms

Published on by

Adding taxonomies to articles, blogs, or any other content type must be handled using Taxonomy API to get desired taxonomy and then sending Taxonomy API response as Taxonomy paramter value in Article or other API.

  1. Go to /api-​doc and click ​on Taxonomy - Taxo ​link that is ​displayed. This ​will take you ​to Taxonomy – Taxon. Find /api/taxons.

  2. Click on POST ​to expand API ​method for ​retrieving taxonomy terms. ​This will ​expand the ​section where ​are explained ​formats, ​parameters and ​server ​responses. ​

  3. Here you can ​find end-point ​and parameters ​that can be ​passed to API. ​Data can be ​returned in ​json, xml or ​html format. ​


 

Pre-requisites

Parameters

Parameter

Required

Type

Description

taxonomy

Yes

string

It always should be `category`

query

No

string

Name of the taxonomy – or part of taxonomy name.

limit

No

string

Value how many terms that match query should be returned.

fields

No

String

 


 

Taxonomy term can be retrieved by making request to API end-point /api/taxons.{_format}

Example request:

http://example/api/taxons.json?taxonomy=category&query=water&limit=1

Example response:

taxon-response.png
 

This example is for single term.
 

Using response in other APIs

Response from taxons API is taxonomy that should be passed as taxonomy parameter value. Response contains all details for taxonomy – including grandparent->parent->child relation, creation details and such.
 

Taxonomy