DuplicateValue error when trying to update the name of an organization using API | Community
Skip to main content

DuplicateValue error when trying to update the name of an organization using API

  • February 22, 2022
  • 3 replies
  • 0 views

Raven12

Using the below endpoint I am getting DuplicateValue error when I try to update the name of the organization. I have been using this endpoint successfully for a long time, but not for name changes. Any help appreciated

Endpoint:  /api/v2/organizations/orgid.json

JSON I am sending:

zOrgFields = { 'organization':
                     {'name': CompanyName,
                     'organization_fields':
                        {'grx_id':CompanyGRXid,
                         'company_address':ZenCompanyAddress
                         }
                      }
                     }

3 replies

Guided
  • February 22, 2022

Hey Raven Agape,

Organization names should be unique:
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/

So this can't be done in the native UI, nor on the API.


Chase15
  • October 11, 2022

So shouldn't that update the other fields of the existing organization? Or return the existing organization?


Eric27
  • October 13, 2022
Hey Chase,

If I'm following your question correctly, it wouldn't as part of your payload is invalid as the name isn't unique. As we don't support PATCH requests and only PUT we wouldn't want to update partial records. 
 
Hope this helps provide some clarity!