Description
When listing the fonts in our library, you can narrow the results based on values specified for certain filters. This API returns the possible values for a filter given the values for any other filters you provide. For example, if the requested filter is "Designer" and you provide Language=Hebrew and Classification=Handwriting, then you will receive a list of those designers who have handwriting Hebrew fonts in our library. This is useful for populating drop-down lists.
URL
http://api.fonts.com/rest/{format}/FilterValues/
Required Header Parameters:
-
Authorization
Hashed authorization key
-
AppKey
Your application’s key
Required Query String Parameters:
-
wfsfiltertype
Filter whose possible values are desired
Optional Query String Parameters:
-
wfsclassificationid
associated classification ID
-
wfsdesignerid
associated designer ID
-
wfsfoundryid
associated foundry ID
-
wfslanguageid
associated language ID
-
wfsalphachar
associated alpha value
-
wfsfreeorpaid
associated font tier options ( -1: All, 0: Free, 1: Paid)
Response variables:
-
Message
If the response is successful then the “message” parameter of the response will be “Success” and if there is some error or failure then the “message” parameter will be the error message.
-
Classification
Associated associated classification ID
-
DesignerAssociated
associated designer ID
-
FoundryAssociated
associated foundry ID
-
LanguageAssociated
associated language ID
-
FilterName
name of the filter to use
-
FilterValue: ValueID
value ID
-
FilterValue: ValueName
Value Name
-
FilterValue: FilterCount
Count of available filter options for given filter string.
-
NOTE: if filtertype is Language then ClassificationAssociated, DesignerAssociated, FoundryAssociated (types associated will be returned)
XML Response
<FilterValues>
<Message>Success</Message>
<FilterName>language</FilterName>
<ClassificationAssociated>0</ClassificationAssociated>
<DesignerAssociated>0</DesignerAssociated>
<FoundryAssociated>0</FoundryAssociated>
<FilterValue>
<ValueID>W20</ValueID>
<ValueName>Arabic</ValueName>
<FontCount>45</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W84</ValueID>
<ValueName>Armenian</ValueName>
<FontCount>4</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W10</ValueID>
<ValueName>Cyrillic</ValueName>
<FontCount>239</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W15</ValueID>
<ValueName>Greek</ValueName>
<FontCount>188</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W27</ValueID>
<ValueName>Hebrew</ValueName>
<FontCount>404</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W55</ValueID>
<ValueName>Japanese</ValueName>
<FontCount>106</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W34</ValueID>
<ValueName>Korean</ValueName>
<FontCount>4</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W90</ValueID>
<ValueName>Latin</ValueName>
<FontCount>7744</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W45</ValueID>
<ValueName>Simplified Chinese</ValueName>
<FontCount>10</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W95</ValueID>
<ValueName>Symbol</ValueName>
<FontCount>96</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W31</ValueID>
<ValueName>Thai</ValueName>
<FontCount>4</FontCount>
</FilterValue>
<FilterValue>
<ValueID>W40</ValueID>
<ValueName>Traditional Chinese</ValueName>
<FontCount>10</FontCount>
</FilterValue>
</FilterValues>
Json Response
{
"FilterValues":{
"ClassificationAssociated":"0",
"DesignerAssociated":"0",
"FilterName":"language",
"FilterValue":[
{
"FontCount":"45",
"ValueID":"W20",
"ValueName":"Arabic"
},
{
"FontCount":"4",
"ValueID":"W84",
"ValueName":"Armenian"
},
{
"FontCount":"239",
"ValueID":"W10",
"ValueName":"Cyrillic"
},
{
"FontCount":"188",
"ValueID":"W15",
"ValueName":"Greek"
},
{
"FontCount":"404",
"ValueID":"W27",
"ValueName":"Hebrew"
},
{
"FontCount":"106",
"ValueID":"W55",
"ValueName":"Japanese"
},
{
"FontCount":"4",
"ValueID":"W34",
"ValueName":"Korean"
},
{
"FontCount":"7744",
"ValueID":"W90",
"ValueName":"Latin"
},
{
"FontCount":"10",
"ValueID":"W45",
"ValueName":"Simplified Chinese"
},
{
"FontCount":"96",
"ValueID":"W95",
"ValueName":"Symbol"
},
{
"FontCount":"4",
"ValueID":"W31",
"ValueName":"Thai"
},
{
"FontCount":"10",
"ValueID":"W40",
"ValueName":"Traditional Chinese"
}
],
"FoundryAssociated":"0",
"Message":"Success"
}
}