get-private-categories.rst (955B)
1 .. http:get:: [/instances/$INSTANCE]/private/categories 2 3 This request returns the known product categories 4 and the number of products in each category. 5 Since API version **v16**. 6 7 **Required permission:** ``categories-read`` 8 9 **Response:** 10 11 :http:statuscode:`200 Ok`: 12 The body is a `CategoryListResponse`. 13 14 **Details:** 15 16 .. ts:def:: CategoryListResponse 17 18 interface CategoryListResponse { 19 20 // Array with all of the categories we know. 21 categories: CategoryListEntry[]; 22 23 } 24 25 .. ts:def:: CategoryListEntry 26 27 interface CategoryListEntry { 28 29 // Unique number for the category. 30 category_id: Integer; 31 32 // Name of the category. 33 name: string; 34 35 // Translations of the name into various 36 // languages. 37 name_i18n?: { [lang_tag: string]: string }; 38 39 // Number of products in this category. 40 // A product can be in more than one category. 41 product_count: Integer; 42 43 }