Difference between revisions of "API Dictionaries"

From Charitylog Manual
Jump to: navigation, search
Line 20: Line 20:
 
[GET] https://api.dizions.co.uk/v2/dictionary/search/referrals/referrer/SEARCH_TERM
 
[GET] https://api.dizions.co.uk/v2/dictionary/search/referrals/referrer/SEARCH_TERM
  
For Extension Database which are "Select From Option List" or "Radio buttons", there is a dictionary for each field:
+
For Extension Database which are "Select From Option List" or "Radio buttons", there is a dictionary for each field, using the collaboration name displayed on each Extension Database Field:
 +
 
 
https://api.dizions.co.uk/v2/dictionary/extension_database/INSERT_API_COLLABORATION_NAME_HERE
 
https://api.dizions.co.uk/v2/dictionary/extension_database/INSERT_API_COLLABORATION_NAME_HERE
  
 
----
 
----

Revision as of 11:04, 15 April 2020

Helpheader small.png

Many of the values returned by the API are IDs, so there's a selection of dictionaries to get the friendly names. You can get all the dictionaries using:

[GET] https://api.dizions.co.uk/v2/dictionary

This returns a large payload, so is not suggested for general use. A better option is to access the dictionaries for the fields you need, via entity/table_reference. The end points below will return the full list of IDs and friendly names, e.g.

[GET] https://api.dizions.co.uk/v2/dictionary/organisations/district

[GET] https://api.dizions.co.uk/v2/dictionary/referrals/project

[GET] https://api.dizions.co.uk/v2/dictionary/contacts/contact_type

You can also search for items in the dictionary:

[GET] https://api.dizions.co.uk/v2/dictionary/search/referrals/project/SEARCH_TERM

[GET] https://api.dizions.co.uk/v2/dictionary/search/referrals/referrer/SEARCH_TERM

For Extension Database which are "Select From Option List" or "Radio buttons", there is a dictionary for each field, using the collaboration name displayed on each Extension Database Field:

https://api.dizions.co.uk/v2/dictionary/extension_database/INSERT_API_COLLABORATION_NAME_HERE