# Callback data shape : category\_id vs category\_slug

**URL:** <https://meta.discourse.org/t/callback-data-shape-category-id-vs-category-slug/153188>\
**Category:** Feature\
**Created:** [29 mei 2020 om 05:12 UTC](https://meta.discourse.org/t/callback-data-shape-category-id-vs-category-slug/153188 "2020-05-29T05:12:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Daniel\_McQuillen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daniel_mcquillen/32/160806_2.png) [@Daniel\_McQuillen](https://meta.discourse.org/u/Daniel_McQuillen)\
**Post date:** [29 mei 2020 om 05:12 UTC](https://meta.discourse.org/t/callback-data-shape-category-id-vs-category-slug/153188/1 "2020-05-29T05:12:09Z")

</div>

I could have this wrong, but it looks like the data returned by a ‘post’ callback has `category_slug` but no `category_id`, while the data returned by a ‘topic’ callback has a `category_id` but no `category_slug`.

If that is the case (and I’m not missing a configuration somewhere) would be nice if both callbacks standardised on either `category_id` or `category_slug` or returned both.

It would also be most excellent if both types had `parent_category_id` and `parent_category_slug` if arriving from a post or topic in a subcategory. Right now both provide `category_id` which doesn’t indicate whether it’s a category or subcategory.

---

_[View the full topic](https://meta.discourse.org/t/callback-data-shape-category-id-vs-category-slug/153188)._
