Merge Contacts API Error

Merge Contacts API Error

I want to use the Zoho Desk API to merge duplicated contacts. I wrote the following Deluge function to do this:
  1. merge_contacts_api_payloads = List();
    merge_contacts_api_payloads.insert({'ids':{'842454000000989001','842454000002232455'},'source':{'firstName':'842454000000989001','lastName':'842454000000989001','email':'842454000000989001','secondaryEmail':'842454000000989001','accountId':'842454000000989001','twitter':'842454000000989001','facebook':'842454000000989001','phone':'842454000000989001','mobile':'842454000000989001','type':'842454000000989001','title':'842454000000989001','street':'842454000000989001','city':'842454000000989001','state':'842454000000989001','zip':'842454000000989001','country':'842454000000989001','description':'842454000000989001'}});
    newLine = hexToText("0A");
    for each  payload in merge_contacts_api_payloads
    {
        source_id = payload.get("ids").get(0);
        info "source_id = " + source_id;
        info newLine;
        request_url = "https://desk.zoho.com/api/v1/contacts/" + source_id + "/merge";
        info "request_url = " + request_url;
        info newLine;
        info "payload = " + payload;
        info newLine;
        response = invokeurl
        [
            url :request_url
            type :POST
            parameters:payload.toString()
            connection:"taskmaker"
        ];
        info "response = " + response;
        info newLine;
    }
I get the following error message in response:
  1. {"errorCode":"INVALID_DATA","message":"The data is invalid due to validation restrictions","errors":[{"fieldName":"/ids","errorType":"invalid","errorMessage":""}]}
I have verified that the contact IDs are correct. What do I need to do to make this work?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方