Update a resource for a territory
patch
/crmRestApi/resources/11.13.18.05/territories/{TerritoryVersionId}/child/TerritoryResource/{TerritoryResourceUniqID}
Request
Path Parameters
-
TerritoryResourceUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Resources resource and used to uniquely identify an instance of Resources. The client should not generate the hash key value. Instead, the client should query on the Resources collection resource in order to navigate to a specific instance of Resources to get the hash key.
-
TerritoryVersionId(required): integer(int64)
The unique identifier of the territory version.
Header Parameters
-
Metadata-Context: string
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version: string
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
AdministratorFlag: boolean
Title:
Team Member AdministratorMaximum Length:1Indicates whether the resource is an administrator of the territory. -
FunctionCode: string
Title:
Team Member FunctionMaximum Length:30The code for the function of the resource associated with the territory. -
ManageForecastFlag: boolean
Title:
Forecasting DelegateMaximum Length:1Indicates whether a territory resource has been given the responsibility to manage the territory forecast on behalf of the owner of the territory. -
ResourceId: integer
(int64)
Title:
Resource IDThe unique identifier of the resource from the resource manager. -
TerritoryVersionId: integer
(int64)
Title:
Territory Version IDThe unique identifier of the territory version.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : territories-TerritoryResource-item-response
Type:
Show Source
object-
AdministratorFlag: boolean
Title:
Team Member AdministratorMaximum Length:1Indicates whether the resource is an administrator of the territory. -
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created the territory team member. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date the territory team member was created. -
Email: string
Title:
EmailRead Only:trueMaximum Length:320The email address of the territory team member. -
FunctionCode: string
Title:
Team Member FunctionMaximum Length:30The code for the function of the resource associated with the territory. -
LastUpdateDate: string
(date-time)
Title:
Last Updated DateRead Only:trueThe date the territory team member was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the territory team member. -
LastUpdateLogin: string
Title:
Last Update LoginRead Only:trueMaximum Length:32The login of the user who last updated the territory team member. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
ManageForecastFlag: boolean
Title:
Forecasting DelegateMaximum Length:1Indicates whether a territory resource has been given the responsibility to manage the territory forecast on behalf of the owner of the territory. -
Manager: string
Read Only:
trueMaximum Length:360The name of the manager. -
OrganizationName: string
Title:
OrganizationRead Only:trueMaximum Length:240The name of the organization. -
OwnerFlag: boolean
Title:
OwnerRead Only:trueIndicates whether the territory team member is the owner. -
ResourceId: integer
(int64)
Title:
Resource IDThe unique identifier of the resource from the resource manager. -
ResourceName: string
Title:
Resource NameRead Only:trueMaximum Length:360The name of the resource associated with the territory. -
ResourceNumber: string
Title:
Resource Registry IDRead Only:trueMaximum Length:30The registry ID of the territory team member. -
RoleName: string
Title:
Team Member RoleRead Only:trueMaximum Length:60The name of the team member role associated with the resource. -
TerritoryVersionId: integer
(int64)
Title:
Territory Version IDThe unique identifier of the territory version. -
TerrResourceId: integer
(int64)
Title:
Territory Resource IDThe unique identifier of the territory resource. -
UniqueTerritoryNumber: string
Title:
Unique Territory NumberMaximum Length:30The unique territory number of the territory team member.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Links
- LookupFunctionCodeViewAccessor
-
Parameters:
- finder:
LookupTypeIsEnabledFinder%3BBindLookupType%3DMOT_TEAM_MEMBER_FUNCTION
The list of values for the role or function of the resource associated with the territory, such as Legal or Salesperson.
The following properties are defined on the LOV link relation:- Source Attribute: FunctionCode; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
- LookupYesNoViewAccessor
-
Parameters:
- finder:
LookupTypeFinder%3BBindLookupType%3DYES_NO
The list of values to indicate whether the resource is an administrator of the territory or not. The valid values are Yes and No.
The following properties are defined on the LOV link relation:- Source Attribute: AdministratorFlag; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
Examples
The following example shows how to update a resource for a territory by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl -u <username:password> \ -X
-X PATCH -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502/child/TerritoryResource/300100091635503
Example of Request Body
The following example shows the contents of the request body in JSON format.
{
"ManageForecastFlag":"true"
}
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"TerrResourceId": 300100091635503,
"ResourceId": 100010025532672,
"ResourceName": "Gabrielle Lee",
"TerritoryVersionId": 300100091635502,
"FunctionCode": null,
"OrganizationName": null,
"RoleName": null,
"ManageForecastFlag": true,
"AdministratorFlag": null,
"Manager": null,
"links":[
{"rel": "self", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502/child/TerritoryResource/300100091635503",…},
{"rel": "canonical", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502/child/TerritoryResource/300100091635503",…},
{"rel": "parent", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502",…},
{"rel": "lov", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502/child/TerritoryResource/300100091635503/lov/LookupFunctionCodeViewAccessor",…},
{"rel": "lov", "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/territories/300100091635502/child/TerritoryResource/300100091635503/lov/LookupYesNoViewAccessor",…}
]
}