Update a sales territory
patch
/services/rest/connect/v1.4/salesTerritories/{id}
Request
Path Parameters
-
id: integer
The unique identifier of the sales territory.
The specific geographical sales region. Sales representatives can be assigned specific territories for opportunity assignment.
Root Schema : salesTerritories
Type:
object
The specific geographical sales region. Sales representatives can be assigned specific territories for opportunity assignment.
Show Source
-
adminVisibleInterfaces(optional):
object namedIDs-salesTerritories-adminVisibleInterfaces
The named ID that can be included in a list.
-
comment(optional):
[
"string",
"null"
]
Maximum Length:
1333
The comments or notes associated with the sales territory. -
createdTime(optional):
string
The date and time when the sales territory was created. This attribute is read-only.
-
disabled(optional):
boolean
Indicates whether a sales territory is disabled. The default value is false.
-
displayOrder(optional):
integer
Minimum Value:
1
Maximum Value:2147483647
The display position of the sales territory relative to other members of the same group. -
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the sales territory. -
lookupName(optional):
string
Maximum Length:
255
The name used to look up the sales territory. -
name(optional):
string
Maximum Length:
80
The name of the sales territory in the language of the current interface. This attribute is read-only. -
names(optional):
object salesTerritories-names
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
-
parent(optional):
[
"object",
"null"
]
The specific geographical sales region. Sales representatives can be assigned specific territories for opportunity assignment. It is the reference to a resource in 'salesTerritories' collection. Only ID or lookupName can be provided to specify the resource.
-
territoryHierarchy(optional):
array territoryHierarchy
The specific geographical sales region. Sales representatives can be assigned specific territories for opportunity assignment. It is the reference to a resource in 'salesTerritories' collection. Only ID or lookupName can be provided to specify the resources.
-
updatedTime(optional):
string
The date and time when the sales territory was last updated. This attribute is read-only.
Nested Schema : namedIDs-salesTerritories-adminVisibleInterfaces
Type:
object
The named ID that can be included in a list.
Show Source
-
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the object. This is the key for the list entry. -
lookupName(optional):
string
Maximum Length:
255
The name used to look up the object.
Nested Schema : salesTerritories-names
Type:
object
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Show Source
-
labelText(optional):
string
Maximum Length:
80
The language-specific label text. The value cannot be null or empty. -
language(optional):
object namedIDs-salesTerritories-names-language
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Nested Schema : territoryHierarchy
Type:
array
The specific geographical sales region. Sales representatives can be assigned specific territories for opportunity assignment. It is the reference to a resource in 'salesTerritories' collection. Only ID or lookupName can be provided to specify the resources.
Show Source
Nested Schema : namedIDs-salesTerritories-names-language
Type:
object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id(optional):
integer
Minimum Value:
0
ID value -
lookupName(optional):
string
Maximum Length:
255
Name used to lookup this object
Nested Schema : items
Type:
object
Response
Default Response
Examples
Use the PATCH operation with the following syntax to partially update a sales territory object:
https://your_site_interface/services/rest/connect/version/salesTerritories/territory_id
Include the data to be updated in the request body. Only the fields present in the request JSON data are updated. All other fields remain the same.
Request URI example
https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12
Request body example
{
"parent":
{
"id":9
}
}
Response example
The status 200 OK
is returned. Then retrieving the data for sales territory 12:
https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12
returns the following:
{
"id": 12,
"lookupName": "Quebec",
"adminVisibleInterfaces": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12/
adminVisibleInterfaces"
}
]
},
"comment": null,
"disabled": false,
"displayOrder": 2,
"name": "Quebec",
"names": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12/names"
}
]
},
"parent": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/9"
},
{
"rel": "canonical",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/9"
},
{
"rel": "describedby",
"href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/salesTerritories",
"mediaType": "application/schema+json"
}
]
},
"territoryHierarchy": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12/territoryHierarchy"
}
]
},
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12"
},
{
"rel": "canonical",
"href": "https://mysite.example.com/services/rest/connect/v1.4/salesTerritories/12"
},
{
"rel": "describedby",
"href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/salesTerritories",
"mediaType": "application/schema+json"
}
]
}
Note:
The Quebec sales territory is now under Canada.