To aid searching and classification, photo and photoset objects can be assigned one or several categories. Zenfolio supports up to three levels of category structure called category, subcategory, and subcategory detail. For example, the "Travel and Places" category contains the "Asia" subcategory which in turn contains the subcategory detail called "China".
In the Zenfolio API, categories are represented by numeric codes with the first three digits representing the top-level category code, the next three digits representing the subcategory code, and the last three digits representing the subcategory detail code.
012 000 000 - Travel and Places 012 003 000 - Asia 012 003 006 - China
Here 012 is the code of the "Travel and Places" category, 003 is the code of the "Asia" subcategory and 006 is the code of the "China" subcategory detail.
If an object is assigned a specific subcategory or subcategory detail code, it is automatically assigned codes for containing category and subcategory. For example, if you assign a photo category code 012003006 (China), the system will also assign category codes 012003000 (Asia) and 012000000 (Travel and Places). This ensures that an object given a specific classification can also be found using a more generic classification (e.g. when searching for "Asia" photos all "China" photos will be returned).
The list of supported categories can be expanded with new categories from time to time. Because of this, you should not hard-code category codes in your application. Instead, you should obtain the list of supported categories from the Zenfolio server by using the GetCategories method.