POST

Query Categories


Retrieves a list of up to 100 categories, given the provided paging, filtering, and sorting. Query Categories runs with these defaults, which you can override.

  • displayPosition is sorted in DESC order.
  • paging.limit is 50.
  • paging.offset is 0.

For field support for filters and sorting, see Field Support for Filtering and Sorting.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

Permissions
Manage Blog
Read Blog
Read Draft Blog Posts
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/blog/v3/categories/query

Body Params
queryQuery

Query options.


fieldsetsArray <string>maxItems 10

List of additional category fields to include in the response. For example, use the URL fieldset to retrieve the url field in the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default only the category’s base fields are returned.

Response Object
categoriesArray <Category>

List of categories.


pagingMetadataPagingMetadata

Details on the paged set of results returned.

Query Categories Example 1
Request
cURL
curl \ 'https://www.wixapis.com/blog/v3/categories/query' \ --data-binary '{ "fieldsets": ["URL"], "filter": { "title": { "$startsWith": "Summer" } } }' \ } -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "categories": [ { "id": "5f2bcaa0879ad500173577f3", "label": "Summer", "postCount": 17, "url": { "base": "https://some.wixsite.com/something-to-prod/blog", "path": "/blog/categories/summer" }, "description": "Posts about my summer", "title": "Summer", "displayPosition": 1, "language": "en", "slug": "summer-slug", "translationId": "111a58a2-dc75-422d-9ca6-00a489750dfd" } ], "pagingMetadata": { "count": 1, "hasNext": false, "offset": 0, "total": 1 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?