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 all filters, given the values for any filters you provide. In other words, if the user is looking at filtered font results and then goes to change a filter setting, this command tells you, for all filters, which values they can choose from.
URL
http://api.fonts.com/rest/{format}/AllFilterValues/
Required Header Parameters:
-
Authorization
Hashed authorization key
-
AppKey
Your application’s key
Required Query String Parameters:
Optional Query String Parameters:
-
wfsclassificationid
associated classification ID
-
wfsdesignerid
associated designer ID
-
wfsfoundryid
associated foundry ID
-
wfslanguageid
associated language ID
-
wfsalphachar
associated alpha characters
-
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.
-
ClassificationAssociated
associated classification ID
-
DesignerAssociated
associated designer ID
-
FoundryAssociated
associated foundry ID
-
LanguageAssociated
associated language ID
-
StartCharacterAssociated
associated alpha characters
-
FreeOrPaid
associated font tier (0: Free, -1: All)
-
FilterValue: ValueID
value ID
-
FilterValue: ValueName
Value Name
-
FilterValue: FilterCount
Count of available filter options for given filter string.
-
FilterValue: FilterType
filter type of this filter value (classification, designer, foundry, language, alpha, freeorpaid)
Sample Code
XML Response
<FilterValues>
<Message>Success</Message>
<ClassificationAssociated>0</ClassificationAssociated>
<DesignerAssociated>0</DesignerAssociated>
<FoundryAssociated>0</FoundryAssociated>
<LanguageAssociated>W26</LanguageAssociated>
<StartCharacterAssociated>A</StartCharacterAssociated>
<FreeOrPaid>0</FreeOrPaid>
<FilterValue>
<ValueID>W95 </ValueID>
<ValueName>Symbol</ValueName>
<FontCount>1</FontCount>
<FilterType>Language</FilterType>
</FilterValue>
<FilterValue>
<ValueID>W90 </ValueID>
<ValueName>Latin</ValueName>
<FontCount>177</FontCount>
<FilterType>Language</FilterType>
</FilterValue>
<FilterValue>
<ValueID>W20 </ValueID>
<ValueName>Arabic</ValueName>
<FontCount>1</FontCount>
<FilterType>Language</FilterType>
</FilterValue>
<FilterValue>
<ValueID>H</ValueID>
<ValueName>H</ValueName>
<FontCount>4</FontCount>
<FilterType>Alpha</FilterType>
</FilterValue>
<FilterValue>
<ValueID>-1</ValueID>
<ValueName>All</ValueName>
<FontCount>172</FontCount>
<FilterType>FreeOrPaid</FilterType>
</FilterValue>
</FilterValues>
Json Response
{
"FilterValues":{
"ClassificationAssociated":"0",
"DesignerAssociated":"0",
"FilterValue":[
{
"FilterType":"Language",
"FontCount":"1",
"ValueID":"W95",
"ValueName":"Symbol"
},
{
"FilterType":"Language",
"FontCount":"177",
"ValueID":"W90",
"ValueName":"Latin"
},
{
"FilterType":"Language",
"FontCount":"1",
"ValueID":"W20",
"ValueName":"Arabic"
},
{
"FilterType":"Alpha",
"FontCount":"4",
"ValueID":"H",
"ValueName":"H"
},
{
"FilterType":"FreeOrPaid",
"FontCount":"172",
"ValueID":"-1",
"ValueName":"All"
}
],
"FoundryAssociated":"0",
"FreeOrPaid":"0",
"LanguageAssociated":"W26",
"Message":"Success",
"StartCharacterAssociated":"A"
}
}