Get a category set for providing search taxonomy terms on the services

Description

The following use case will retrieve a list of taxonomy terms based on a category set that is used by MI-bridges. The tax term is an AIRS service taxonomy term. More information on the tax terms and id’s can be found here https://www.airs.org/i4a/pages/index.cfm?pageid=3386. The category and subcategory items were created to improve search usability for users not familiar with AIRS.

Quote of Use Case

“I would like to get a category set for taxonomy terms that can be used to search for services”

Step 1 - Get an access token

This will retrieve an access token from CIE Identity Provider. Please note that if the system has already retrieved an access token that has not yet expired then that existing unexpired token be used with other calls. An access token is valid for 24 hours after it has been minted. The following explains how to get https://brightstreetgroup.atlassian.net/wiki/spaces/CIEP/pages/1309802703

Step 2 - Call [GET /taxonomy/categoryset] Gets all of the categories in categoryset

The social services directory tags each service by a taxonomy term that can be used to filter the results of the Call. The following will get a list of taxonomy terms in a category set. Note that taxonomy terms change infrequently ; it may not be necessary to refresh the list of valid taxonomy terms every time a request is being made for resource information.

Example CURL

curl -X 'GET' \ 'https://directory-dev.mi-cie.org/v1/taxonomy/categoryset?per_page=1000' \ -H 'accept: application/json' \ -H 'x-api-key: ZGV***MDY4ZGNk' \ -H 'authorization: Bearer eyJraW***bCKDJoe4T4BdUU71Rv8OQ'

Response

The following is a sample response. These taxonomy IDs (e.g., BD-1800.2000), category, or subcategory can be used to filter the query to only resources that provide certain specific services (e.g., food pantries)

[ { "id": 1, "taxonomy_id": "NL-3000.1500", "category": "Child Care", "subcategory": "Child Care Expense Assistance", "name": "Child Care Expense Assistance", "categoryset": "mi-bridges" }, { "id": 2, "taxonomy_id": "PH-7000.3300-140", "category": "Child Care", "subcategory": "Children's In Home Respite Care", "name": "Children's In Home Respite Care", "categoryset": "mi-bridges" }, { "id": 3, "taxonomy_id": "LJ-5000.1500", "category": "Child Care", "subcategory": " Expectant/New Parent Assistance", "name": "Childbirth Education", "categoryset": "mi-bridges" } .... ]

Step 2 Optional - Call [GET /taxonomy/categoryset] to get a filtered list of items base on a like query

You can also do a filtered query on the category set to get a list of items that match a query term on name, category or subcategory.

Here are examples of queries

{"name" : {"$like" : "Crime"}} // query for all the tax terms that have crime in name {"category" : {"$like" : "Child"}} // query for all tax terms that have a category with child in name

 

Response

The following is a sample response from the query.