Request: Language parameter for form and ticket API endpoints

9 Comments

  • Sabra
    Zendesk Customer Care
    Hey Michaela, 
     
    This functionality should exist using the "locale" param instead of "lang". For example: /api/v2/ticket_forms/4412295082770?locale='se-sv'
     
    Best,
    Sabra (she/her)
    Principal Technical Support Engineer | Central Time
    0
  • Michaela Sääw

    That doesn't seem to work for these endpoints unfortunately. It also seems to always return the english translation even though the default language is set to Swedish. So without any parameters it should return Swedish content even though we are using Dynamic Content, right?

    Extract from API response. Using /api/v2/ticket_fields?locale='se-sv'

     

    0
  • Sabra
    Zendesk Customer Care
    Hey Michaela, 
     
    When I hit the ticket fields endpoint in your sandbox account with the locale se-sv and locale en, I can see different results based on the locale specified. The title_in_portal property is what we are looking at when the locale parameter is specified.
     

     

    0
  • Michaela Sääw

    Hi again! Looks promising, however, I can't get it to work. I must be missing something on my end.

    I tested directly through Postman and added the query param in the request in our code, but still no luck. 

    REQUEST URL: https://fortnox1409057695.zendesk.com/api/v2/ticket_fields?locale=se-sv
    FIELD {
      url: 'https://fortnox1409057695.zendesk.com/api/v2/ticket_fields/24510111.json',
      id: 24510111,
      type: 'subject',
      title: 'Subject',
      raw_title: 'Ämne',
      description: '',
      raw_description: '',
      position: 1,
      active: true,
      required: true,
      collapsed_for_agents: false,
      regexp_for_validation: null,
      title_in_portal: 'Subject',
      raw_title_in_portal: '{{dc.subject}}',
      visible_in_portal: true,
      editable_in_portal: true,
      required_in_portal: true,
      tag: null,
      created_at: '2014-08-26T12:55:02Z',
      updated_at: '2023-02-21T13:16:41Z',
      removable: false,
      key: null,
      agent_description: null
    }
    0
  • Sabra
    Zendesk Customer Care
    I'll admit, that is strange! Would you mind re-enabling account assumption on your sandbox so we can investigate further? I'd like to follow up with our dev team to understand if there is some unknown limitation here. 
    0
  • Michaela Sääw

    Hi! Got some progress.

    We got https://fortnox1409057695.zendesk.com/api/v2/ticket_fields?locale=sv to work, note that the query parameter is missing the country code. I noticed that you used the country code in your locale param, and it's strange that the format does not work for us. 

    Is this by design and is it safe to use this format? To be sure the API won't stop accepting this and require se-sv all of a sudden. 

    0
  • Sabra
    Zendesk Customer Care
    Thanks for that additional info. Let me check with our team to see what the limitations might be with this endpoint. 
    0
  • Sabra
    Zendesk Customer Care
    Hey Michaela! We believe the behavior you see on your account is different than we would expect due to a possible bug with the sv and se-sv locales. We have pushed a change to your Sandbox account (fortnox1409057695) that might fix this behavior. Can you please try again and let us know your results?
    0
  • Sabra
    Zendesk Customer Care
    Hello! Since we haven't heard from you in a while, I will tentatively mark this ticket to Solved. Please do reach out if you have any further questions!
    0

Please sign in to leave a comment.

Powered by Zendesk