update many custom org feilds via API suceeding but not updating data in sandbox

5 Comments

  • Greg Katechis
    Zendesk Developer Advocacy

    Hi Chris! Since you're making a request to an endpoint that is going to create a job, as opposed to directly updating the record, you'll generally get a 200 if the payload is syntactically correct JSON. The reason that you're not seeing the update come through is because you need to pass in the fields in their own `organization_fields` object like this:

    {
        "organizations": [
            {
                "id": 1500479850061,
                "organization_fields": {
                    "sugar_system_id": "000-001",
                    "sitename": "Data"
                }
            },
            {
                "id": 1500479850141,
                "organization_fields": {
                    "sugar_system_id": "000-002",
                    "sitename": "Data"
                }
            },
            {
                "id": 1500479850281,
                "organization_fields": {
                    "sugar_system_id": "000-003",
                    "sitename": "Data"
                }
            }
        ]
    }

    Let us know if you run into any issues!

    2
  • David Gordon

    Greg Katechis Your example does not match the example in the documentation. Can you make sure the docs reflect the correct JSON structure?

    https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#batch-update

     

    0
  • Tipene Hughes
    Zendesk Developer Advocacy

    Hey, David Gordon!

    The example in the documentation provides the id and notes properties which are an integer and a string, respectively. The code sample is only intended as a basic demonstration of the format. You can take a look at the JSON format table for a description of each property available to the organizations object, including the data type.

    I hope this helps!

    Tipene

    0
  • David Gordon

    Hi Tipene Hughes,

    Sorry, this does not help. The example in your documentation is incorrect, and should be fixed to provide an example that will work for folks like me, who are interested in using this particular API. I don't understand your comment, and the formats are entirely different. It's not like the example that Greg Katechis provided at all. Apologies, but I have had some other recent frustrations with the API and I can't accept that the docs will continue to be incorrect when such a glaring discrepancy is raised.

    Regards,  Dave

    0
  • Tipene Hughes
    Zendesk Developer Advocacy

    No worries at all! Just to make sure we’re on the same page, are you referring to the example provided under the Batch update section of the Organizations endpoint documentation?

    0

Please sign in to leave a comment.

Powered by Zendesk