Create a sales lead resource
post
/crmRestApi/resources/11.13.18.05/leads/{leadsUniqID}/child/MklLeadResources
Request
Path Parameters
-
leadsUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Sales Leads resource and used to uniquely identify an instance of Sales Leads. The client should not generate the hash key value. Instead, the client should query on the Sales Leads collection resource in order to navigate to a specific instance of Sales Leads to get the hash key.
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.
-
Upsert-Mode: string
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
AccessLevelCode: string
Title:
AccessMaximum Length:30Default Value:FULLThe code indicating the access level of a team member. -
ConflictId: integer
(int64)
Title:
Conflict IdentifierDefault Value:1The value guarantees the uniqueness of the row when duplicates are created in different databases such as mobile databases, or the server. -
FunctionalRole: string
Title:
FunctionMaximum Length:30The role played by this Sale team resource for the handling of this sales lead. -
LeadId(required): integer
Title:
Lead IDThe unique identifier of the sales lead for this sales lead resource. -
LeadNumber: string
Title:
Lead NumberMaximum Length:30The alternate unique identifier of the lead. -
LeadResourceId: integer
Title:
Lead Resource IDThe unique identifier of the sales lead resource. -
PrimaryFlag: boolean
Title:
PrimaryMaximum Length:1Default Value:falseIndicates whether the record represents the primary resource on the lead. The primary resource on the lead is the same as the lead owner. -
ResourceId(required): integer
Title:
Resource IDThe unique identifier associated with this sales lead resource. -
smartActions: array
Smart Actions
Title:
Smart ActionsThe smart actions resource is used to view the name, security, context object, REST operation, confirmation message, and other global properties of smart actions. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Nested Schema : Smart Actions
Type:
arrayTitle:
Smart ActionsThe smart actions resource is used to view the name, security, context object, REST operation, confirmation message, and other global properties of smart actions. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Show Source
Nested Schema : leads-MklLeadResources-smartActions-item-post-request
Type:
Show Source
object-
ActionIntent: string
(byte)
Title:
Action IntentJSON object that describes what an action does and what context data can be passed to the action. -
ConfirmationMessage: string
Title:
Confirmation MessageMaximum Length:4000The confirmation message displayed before the smart action runs. An affirmative response allows the smart action to run. -
ContentType: string
Title:
Content TypeMaximum Length:50The media type of the smart action REST operation. -
DisplayLabel(required): string
Title:
Action NameMaximum Length:256The display name of the smart action. -
Entity: string
Title:
Parent EntityMaximum Length:150The primary object the smart action is associated with. For example, if the smart action creates an appointment for a lead, lead is the primary object. -
Href: string
Title:
REST EndpointMaximum Length:1024The relative path of the smart action REST resource. The path can include path parameters. -
IncludedInApplication: string
Title:
Included in ApplicationMaximum Length:512The client applications that the smart action is associated with. -
MassActionFlag: boolean
Title:
Mass ActionMaximum Length:1Indicates whether the action can be mass processed. -
Method: string
Title:
HTTP MethodMaximum Length:15The HTTP method of the smart action REST operation. -
ObjectFunctionName: string
Title:
Object FunctionMaximum Length:64The object function associated with the smart action. -
PageType: string
Title:
Page TypeMaximum Length:256The list of pages that this action can be used in. -
SmartSuggestFlag: boolean
Title:
Smart SuggestMaximum Length:1Indicates whether the smart suggest is enabled for the action. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1The system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. -
UpdateOfAttributes: string
Title:
Attributes to UpdateMaximum Length:512The object attribute to be updated as a result of using a data entry form. It is used by the applications to determine which form to use. The value is object scoped and must be unique across all smart actions for an object. -
UserActionId: integer
(int64)
Title:
User Action IDThe unique system assigned identifier of the smart action definition. -
UserActionName(required): string
Title:
Action NameMaximum Length:256The unique system assigned smart action name. - UserActionNavigation: array Smart Action User Interface Definitions
-
UserActionRank: integer
(int64)
Title:
PriorityThe number defining the relative position of the smart action in the list of smart actions displayed in a client application. -
UserActionRequestPayload: array
Smart Action REST Payload Definitions
Title:
Smart Action REST Payload DefinitionsIf an LOV required for constructing a request payload needs to post data, the payload metadata is stored here. -
UserActionURLBinding: array
Smart Action User Interface Definitions
Title:
Smart Action User Interface DefinitionsBinding metadata for a variable in the URL.
Nested Schema : Smart Action REST Payload Definitions
Type:
arrayTitle:
Smart Action REST Payload DefinitionsIf an LOV required for constructing a request payload needs to post data, the payload metadata is stored here.
Show Source
Nested Schema : Smart Action User Interface Definitions
Type:
arrayTitle:
Smart Action User Interface DefinitionsBinding metadata for a variable in the URL.
Show Source
Nested Schema : leads-MklLeadResources-smartActions-UserActionRequestPayload-item-post-request
Type:
Show Source
object-
Binding: string
Title:
Payload Value Binding TypeMaximum Length:64The classification of the value property of a name-value pair. A binding value of RUNTIME indicates the value to be assigned is the runtime value of an object attribute. A value of STATIC indicates the value to be assigned is a simple string. A null value indicates that the value type is JSON_ARRAY_STRING. -
MandatoryFlag: boolean
Title:
MandatoryMaximum Length:1Indicates whether a REST payload body parameter value is mandatory. If True, runtime validation ensures that the value is defined. -
RequestPayloadId: integer
(int64)
The unique system assigned identifier of a smart action REST payload body parameter name-value pair definition.
-
RequestPayloadName: string
Title:
Request Payload Attribute NameMaximum Length:256The value assigned to the name property of a name-value pair. -
SmartSuggestPath: string
Title:
Smart Suggest PathMaximum Length:2048The path used for smart suggest. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1Default Value:falseThe system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. The value is automatically derived from smartActions.SystemActionFlag. -
Value: string
Title:
Request Payload Attribute ValueMaximum Length:1000The value assigned to the value property of a name-value pair. -
ValueStruct: string
Title:
Payload Value StructureMaximum Length:20A value of JSON_ARRAY_STRING indicates that the value property of a name-value pair represents an array of data rather than a single entity such as an object attribute name or simple text string. The array string is a definition of the name-value pair and the Binding and Mandatory properties. The array string follows specific pattern, for example [{"name":"leadId","Value":"LeadId","MandatoryFlag":true,"Binding":"RUNTIME"}]. A null value indicates the value property represents a simple, single entity such as an object attribute name or simple text string.
Nested Schema : leads-MklLeadResources-smartActions-UserActionURLBinding-item-post-request
Type:
Show Source
object-
Binding: string
Title:
URL Binding TypeMaximum Length:64The classification of the value property of a name-value pair. The binding value of a UserActionURLBinding instance must be RUNTIME. A binding value of RUNTIME indicates the value to be assigned is the runtime value of an object attribute. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1Default Value:falseThe system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. The value is automatically derived from smartActions.SystemActionFlag. -
URLBindingId: integer
(int64)
The unique system assigned identifier of a smart action REST path parameter name-value pair definition.
-
URLBindingName: string
Title:
URL Binding Parameter NameMaximum Length:256The value assigned to the name property of a name-value pair. -
Value: string
Title:
URL Binding Parameter ValueMaximum Length:1000The value assigned to the value property of a name-value pair.
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 : leads-MklLeadResources-item-response
Type:
Show Source
object-
AccessLevelCode: string
Title:
AccessMaximum Length:30Default Value:FULLThe code indicating the access level of a team member. -
ConflictId: integer
(int64)
Title:
Conflict IdentifierDefault Value:1The value guarantees the uniqueness of the row when duplicates are created in different databases such as mobile databases, or the server. -
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created this sales lead resource. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date and time when this sales lead resource is created. -
EmailAddress: string
Title:
EmailRead Only:trueMaximum Length:320The e-mail address associated with the sales lead team resource. -
FormattedPhoneNumber: string
Title:
PhoneRead Only:trueThe formatted phone number of the lead sales team resource. -
FunctionalRole: string
Title:
FunctionMaximum Length:30The role played by this Sale team resource for the handling of this sales lead. -
LastUpdateDate: string
(date-time)
Title:
Last Updated DateRead Only:trueThe date and time of the last update of the sales lead resource. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the sales lead resource. -
LastUpdateLogin: string
Title:
Last Updated LoginRead Only:trueMaximum Length:32The login of the user who last updated the record. -
LeadId: integer
Title:
Lead IDThe unique identifier of the sales lead for this sales lead resource. -
LeadNumber: string
Title:
Lead NumberMaximum Length:30The alternate unique identifier of the lead. -
LeadResourceId: integer
Title:
Lead Resource IDThe unique identifier of the sales lead resource. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
ManagerName: string
Title:
Manager NameRead Only:trueMaximum Length:360The name of the sales lead manager. -
Name: string
Title:
OrganizationRead Only:trueMaximum Length:240The name of the sales lead resource. -
PartyName: string
Title:
Team MemberRead Only:trueMaximum Length:360The name of the party associated with the sales lead resource. -
PartyNumber: string
Title:
Resource Party NumberRead Only:trueMaximum Length:30The contact number of the party associated with the lead resource. -
PrimaryFlag: boolean
Title:
PrimaryMaximum Length:1Default Value:falseIndicates whether the record represents the primary resource on the lead. The primary resource on the lead is the same as the lead owner. -
PrimaryPhonePurpose: string
Title:
RoleRead Only:trueMaximum Length:30The type of contact point used for updating underlying contact point TCA data. -
ResourceId: integer
Title:
Resource IDThe unique identifier associated with this sales lead resource. -
ResourceOrgId: integer
(int64)
Title:
Resource Organization IDRead Only:trueThe unique identifier of the resource organization associated with this sales lead resource. -
RoleName: string
Title:
RoleRead Only:trueMaximum Length:60The name of the role of the sales lead resource associated with the sales lead. -
smartActions: array
Smart Actions
Title:
Smart ActionsThe smart actions resource is used to view the name, security, context object, REST operation, confirmation message, and other global properties of smart actions. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : Smart Actions
Type:
arrayTitle:
Smart ActionsThe smart actions resource is used to view the name, security, context object, REST operation, confirmation message, and other global properties of smart actions. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
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.
Nested Schema : leads-MklLeadResources-smartActions-item-response
Type:
Show Source
object-
ActionIntent: string
(byte)
Title:
Action IntentJSON object that describes what an action does and what context data can be passed to the action. -
ConfirmationMessage: string
Title:
Confirmation MessageMaximum Length:4000The confirmation message displayed before the smart action runs. An affirmative response allows the smart action to run. -
ContentType: string
Title:
Content TypeMaximum Length:50The media type of the smart action REST operation. -
DisplayLabel: string
Title:
Action NameMaximum Length:256The display name of the smart action. -
Entity: string
Title:
Parent EntityMaximum Length:150The primary object the smart action is associated with. For example, if the smart action creates an appointment for a lead, lead is the primary object. -
Href: string
Title:
REST EndpointMaximum Length:1024The relative path of the smart action REST resource. The path can include path parameters. -
IncludedInApplication: string
Title:
Included in ApplicationMaximum Length:512The client applications that the smart action is associated with. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
MassActionFlag: boolean
Title:
Mass ActionMaximum Length:1Indicates whether the action can be mass processed. -
Method: string
Title:
HTTP MethodMaximum Length:15The HTTP method of the smart action REST operation. -
ObjectFunctionName: string
Title:
Object FunctionMaximum Length:64The object function associated with the smart action. -
PageType: string
Title:
Page TypeMaximum Length:256The list of pages that this action can be used in. -
SmartSuggestFlag: boolean
Title:
Smart SuggestMaximum Length:1Indicates whether the smart suggest is enabled for the action. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1The system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. -
UpdateOfAttributes: string
Title:
Attributes to UpdateMaximum Length:512The object attribute to be updated as a result of using a data entry form. It is used by the applications to determine which form to use. The value is object scoped and must be unique across all smart actions for an object. -
UserActionId: integer
(int64)
Title:
User Action IDThe unique system assigned identifier of the smart action definition. -
UserActionName: string
Title:
Action NameMaximum Length:256The unique system assigned smart action name. - UserActionNavigation: array Smart Action User Interface Definitions
-
UserActionRank: integer
(int64)
Title:
PriorityThe number defining the relative position of the smart action in the list of smart actions displayed in a client application. -
UserActionRequestPayload: array
Smart Action REST Payload Definitions
Title:
Smart Action REST Payload DefinitionsThe payload definitions resource is used to view the REST request payload name-value pair definitions of a smart action. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action. -
UserActionURLBinding: array
Smart Action REST Path Parameter Definitions
Title:
Smart Action REST Path Parameter DefinitionsThe path parameter definitions resource is used to view the REST request path parameter name-value pair definitions of a smart action. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : Smart Action REST Payload Definitions
Type:
arrayTitle:
Smart Action REST Payload DefinitionsThe payload definitions resource is used to view the REST request payload name-value pair definitions of a smart action. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Show Source
Nested Schema : Smart Action REST Path Parameter Definitions
Type:
arrayTitle:
Smart Action REST Path Parameter DefinitionsThe path parameter definitions resource is used to view the REST request path parameter name-value pair definitions of a smart action. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action.
Show Source
Nested Schema : leads-MklLeadResources-smartActions-UserActionRequestPayload-item-response
Type:
Show Source
object-
Binding: string
Title:
Payload Value Binding TypeMaximum Length:64The classification of the value property of a name-value pair. A binding value of RUNTIME indicates the value to be assigned is the runtime value of an object attribute. A value of STATIC indicates the value to be assigned is a simple string. A null value indicates that the value type is JSON_ARRAY_STRING. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
MandatoryFlag: boolean
Title:
MandatoryMaximum Length:1Indicates whether a REST payload body parameter value is mandatory. If True, runtime validation ensures that the value is defined. -
RequestPayloadId: integer
(int64)
The unique system assigned identifier of a smart action REST payload body parameter name-value pair definition.
-
RequestPayloadName: string
Title:
Request Payload Attribute NameMaximum Length:256The value assigned to the name property of a name-value pair. -
SmartSuggestPath: string
Title:
Smart Suggest PathMaximum Length:2048The path used for smart suggest. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1Default Value:falseThe system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. The value is automatically derived from smartActions.SystemActionFlag. -
Value: string
Title:
Request Payload Attribute ValueMaximum Length:1000The value assigned to the value property of a name-value pair. -
ValueStruct: string
Title:
Payload Value StructureMaximum Length:20A value of JSON_ARRAY_STRING indicates that the value property of a name-value pair represents an array of data rather than a single entity such as an object attribute name or simple text string. The array string is a definition of the name-value pair and the Binding and Mandatory properties. The array string follows specific pattern, for example [{"name":"leadId","Value":"LeadId","MandatoryFlag":true,"Binding":"RUNTIME"}]. A null value indicates the value property represents a simple, single entity such as an object attribute name or simple text string.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : leads-MklLeadResources-smartActions-UserActionURLBinding-item-response
Type:
Show Source
object-
Binding: string
Title:
URL Binding TypeMaximum Length:64The classification of the value property of a name-value pair. The binding value of a UserActionURLBinding instance must be RUNTIME. A binding value of RUNTIME indicates the value to be assigned is the runtime value of an object attribute. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
SystemActionFlag: boolean
Title:
System ActionMaximum Length:1Default Value:falseThe system assigned value indicating whether the smart action is seeded or custom. 'True' indicates the smart action is seeded. The value is automatically derived from smartActions.SystemActionFlag. -
URLBindingId: integer
(int64)
The unique system assigned identifier of a smart action REST path parameter name-value pair definition.
-
URLBindingName: string
Title:
URL Binding Parameter NameMaximum Length:256The value assigned to the name property of a name-value pair. -
Value: string
Title:
URL Binding Parameter ValueMaximum Length:1000The value assigned to the value property of a name-value pair.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Links
- AccessVA
-
Parameters:
- finder:
LookupTypeActiveEnabledOrBindCodeFinder%3BBindLookupType%3DMKL_ACCESS_LEVEL%2CBindLookupCode%3D{AccessLevelCode}
The lookups resource is used to view standard lookup codes. - finder:
- HzLookupPVO1
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DZCA_RESOURCE_FUNCTION
The standard lookups list of values resource is used to query the list of values of standard lookups, which list the available codes and translated meanings. Standard lookups are defined in the standard lookups view and store lookup codes that support reference data sharing. - finder:
- smartActions
-
Parameters:
- LeadResourceId:
$request.path.LeadResourceId - leadsUniqID:
$request.path.leadsUniqID
The smart actions resource is used to view the name, security, context object, REST operation, confirmation message, and other global properties of smart actions. Smart action item or collection links returned in response payloads are valid at the moment the REST request is processed. Any change to the parent object context can invalidate a previously valid smart action. - LeadResourceId:
Examples
cURL Command
The following example shows how to create a sales lead resource by submitting a POST request on the REST resource using cURL.
curl -u <username:password> \ -X POST -d @example_request_payload.json -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/leads/{lead_id}/child/MklLeadResources/
Example of Request Body
The following shows an example of the request body in JSON format.
{"ResourceId" : 100010032635399}Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"LeadResourceId" : 300100092582213,
"CreatedBy" : "MHoope",
"CreationDate" : "2016-11-07T05:20:20-08:00",
"LastUpdateDate" : "2016-11-07T05:20:20-08:00",
"LastUpdatedBy" : "MHoope",
"PrimaryFlag" : false,
"FunctionalRole" : null,
"ResourceId" : 100010032635399,
"LeadId" : 300100092582093,
"ResourceOrgId" : 100000015105001,
"EmailAddress" : "sendmail-test-discard@oracle.com",
"PartyName" : "Dan Foreman",
"PrimaryPhonePurpose" : "BUSINESS",
"RoleName" : "Salesperson",
"ManagerName" : "Todd Beeler",
"FormattedPhoneNumber" : "+1 (415) 820-3815",
"Name" : "APAC Commercial",
"PartyNumber" : "100010032635399",
"links" : [ {
"rel" : "self",
"href" : "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/leads/{lead_id}/child/MklLeadResources/300100092582213",
"name" : "MklLeadResources",
"kind" : "item",
"properties" : {
"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000004737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787200106A6176612E6C616E672E4F626A656374000000000000000000000078700000000178"
}
}, {
"rel" : "canonical",
"href" : "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/leads/{lead_id}/child/MklLeadResources/300100092582213",
"name" : "MklLeadResources",
"kind" : "item"
}, {
"rel" : "parent",
"href" : "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/leads/300100092582093",
"name" : "leads",
"kind" : "item"
}, {
"rel" : "lov",
"href" : "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/leads/{lead_id}/child/MklLeadResources/300100092582213/lov/HzLookupPVO1",
"name" : "HzLookupPVO1",
"kind" : "Collection"
} ]
}