BUG: Get articles by section ID requires locale | Community
Skip to main content

BUG: Get articles by section ID requires locale

  • April 19, 2023
  • 1 reply
  • 0 views

Ryan29

HTTP GET call fetching articles by section id fails with the following error unless a query parameter for locale is specified (?locale=en-us)

https://...../api/v2/help_center/sections/xxxx/articles.json

zenpy.lib.exception.APIException: {"error": {"title": "Invalid attribute", "message": "You passed an invalid value for the sort_by attribute. The endpoint must specify a locale in order to sort by titles"}}

1 reply

Pulkit12
  • April 20, 2023

Hi Ryan

You need to provide the locale to get the articles by section ID, if your help center supports a single language like en-us or en-gb etc then you can pass your locale on API to get the articles your API call would go like below

https://...../api/v2/help_center/en-us/sections/xxxx/articles.json

 

Thank You 

Pulkit 

Team Diziana