Updates to Assign and Remove Territories APIs

Updates to Assign and Remove Territories APIs

Hello everyone!
This post is to inform you of the changes to the Assign and Remove territories APIs from V2 to V6.

Currently, from versions 2 to 6, the assign and remove territories APIs give a success response and assign or remove territories of the record.

In the new flow, these APIs will schedule a job. You can use the Job Status API to check the status.
Owing to this, there will be a change in the response from V2 to V6.

Read on for more details.

Affected APIs

  1. Assign Territories to Records
  2. Remove Territories of Records
Affected versions - V2 to V6

Response change

API URL
Current response
Updated response in V2 to V6
Response in V7
/crm/{version_2_to_6}/
{module_api_name}/{record_id}
/actions/assign_territories
Status Code : 200
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2xx5" //record id
}
"message": "the territories data updated successfully",

"status": "success"
}
]
}
Status Code : 200
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2xxx45", //record id
"job_id": "4xxxx2"
}
"message": "Territory assignment process scheduled successfully",
"status": "success"
}
]
}
Status Code : 202
{
"data": [
{
"code": "SCHEDULED",
"details": {
"id": "2xxx5", //record id
"job_id": "4xxxx2"
}
"message": "Territory assignment process scheduled successfully",
"status": "success"
}
]
}
/crm/{version_2_to_6}/
{module_api_name}/{record_id}
/actions/remove_territories
Status Code : 200
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2xx5" //record id
}
"message": "the territories data updated successfully",

"status": "success"
}
]
}
Status Code : 200
{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "2xxx45", //record id
"job_id": "4xxxx2"
}
"message": "Territory removal process scheduled successfully",
"status": "success"
}
]
}
Status Code : 202
{
"data": [
{
"code": "SCHEDULED",
"details": {
"id": "2xxx5", //record id
"job_id": "4xxxx2"
}
"message": "Territory removal process scheduled successfully",
"status": "success"
}
]
}

This update will be rolled out in phases from May 1, 2024.
We will update the relevant API documents with the release.
Let us know if you have any questions in the comment section, or write to us at support@zohocrm.com.

Thanks!

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now