facetoe / zenpy

Python wrapper for the Zendesk API
GNU General Public License v3.0
344 stars 162 forks source link

Update organization is rejected by Zendesk #636

Closed chillaq closed 3 months ago

chillaq commented 3 months ago

Hi, I am using latest zenpy and seeing an error when updating any field in organization, the PUT request in the log is below:

DEBUG:zenpy.lib.api:PUT: https://splitsoftware.zendesk.com/api/v2/organizations/23969457277837.json - {'json': {'organization': {'id': 23969457277837, 'organization_fields': {'csm': 'Sarah Beecham', 'organization_id': '17d47de0-7433-11ee-97f7-2264bd75b318', 'package': 'business', 'sfdc_plan_status': 'ACTIVE', 'sfdc_plan_type': 'PAID', 'sfdc_support_plan_type': 'STANDARD'}}}, 'timeout': 60.0}

Error coming back: reply: 'HTTP/1.1 422 Unprocessable Entity\r\n' x-zendesk-api-warn: {:allowed_parameters=>{:controller=>"organizations", :action=>"update", :unpermitted_keys=>["organization.id"], :invalid_values=>[]}}

Looks like zendesk is rejecting having the organization.id included in the json body.

chillaq commented 3 months ago

nvm, this actually does not impact the update