saveTextSearchSettings
put
/ccadmin/v1/merchant/textSearch
Saves the Text Search Settings.Enables or Disables text search based on input request.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : saveTextSearchSettings_request
{
"enable":true,
"scheduledJobs":[
{
"schedule":{
"period":1000000
},
"scheduledJobName":"orderIncrementalIndexingSchedule",
"scheduleType":"periodic"
},
{
"schedule":{
"period":1000000
},
"scheduledJobName":"profileIncrementalIndexingSchedule",
"scheduleType":"periodic"
},
{
"schedule":{
"occurrenceInDay":2
},
"scheduledJobName":"orderOptimizationSchedule",
"scheduleType":"calendar"
},
{
"schedule":{
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
3
],
"daysOfWeek":[
1,
2,
3
],
"occurrenceInDay":2
},
"scheduledJobName":"profileOptimizationSchedule",
"scheduleType":"calendar"
}
]
}
- enable
-
Type:
booleanRequired:trueIndicates whether text search need to be enabled or disabled. - scheduledJobs
-
Type:
arrayscheduledJobsAdditional Properties Allowed:List of scheduled Jobs Data.
Nested Schema : scheduledJobs
Nested Schema : items
Type:
object- schedule
-
Type:
objectscheduleRequired:trueAdditional Properties Allowed: - scheduledJobName
-
Type:
stringRequired:trueName of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule' - scheduleType
-
Type:
stringRequired:trueSchedule type could be periodic or calendar.If type is periodic then schedule must have property: period. If type is calendar then combinations of these properties are allowed: 1.occurenceInDay, daysOfWeek, weeksInMonth, monthsInYear. 2.monthsInYear, daysInMonth, occurenceInDay
Nested Schema : schedule
Type:
object- daysInMonth:
-
Type:
integerThis field corresponds to the day of the month and it can be set to a number between 1 and 31 (depending on the number of days in the month). - daysOfWeek
-
Type:
integerThis field can be set to 1, 2, 3, 4, 5, 6, or 7, which correspond to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.Example: [1,2,3] - This schedule runs once every Sunday, Monday and Tuesday - monthsInYear::
-
Type:
integerThis field can be set to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, which correspond to January, February, March, April, May, June, July, August, September, October, November and December - occurrenceInDay
-
Type:
integerThis field can be set to 1 or 2, representing once a day or twice a day, respectively. The default is 1, in other words, if occurenceInDay is not specified, the order will be run once on the specified days. - period
-
Type:
integerIt contains value in milliseconds.Mandatory when scheduleType is periodic - weeksInMonth:
-
Type:
integerThis field can be set to 1, 2, 3, 4, or 5, which correspond to the first, second, third, fourth or last week of the month.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : saveTextSearchSettings_response
- enabled
-
Type:
booleanFlag indicates whether text search is enabled or not. - errorMessage
-
Type:
stringError message if there is any error while performing text search setup. - scheduledJobs
-
Type:
arrayscheduledJobsAdditional Properties Allowed:List of scheduled Jobs created. This feild is returned once setup is done and scheduled jobs are created - scheduledJobsInputData
-
Type:
arrayscheduledJobsInputDataAdditional Properties Allowed:List of scheduled Jobs Data given in the input. This feild is returned only when setup is 'inProgress' - setupRunning
-
Type:
booleanFlag indicates whether text search setup is running or not. - statusMessage
-
Type:
stringStatus message of the current request.Possible messages:Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true., Scheduled Jobs has been successfully created or updated.
Nested Schema : scheduledJobs
Nested Schema : scheduledJobsInputData
Nested Schema : items
Type:
object- componentPath
-
Type:
stringSupported scheduled job path - schedule
-
Type:
objectscheduleAdditional Properties Allowed: - scheduleDescription
-
Type:
stringDescriptive schedule information - scheduledJobName
-
Type:
stringName of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule' - scheduleType
-
Type:
stringSchedule type could be periodic or calendar
Nested Schema : schedule
Type:
object- period
-
Type:
integerIt contains value in milliseconds.
Nested Schema : items
Type:
object- schedule
-
Type:
objectscheduleAdditional Properties Allowed: - scheduleDescription
-
Type:
stringDescriptive schedule information - scheduledJobName
-
Type:
stringName of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule' - scheduleType
-
Type:
stringSchedule type could be periodic or calendar
Nested Schema : schedule
Type:
object- period
-
Type:
integerIt contains value in milliseconds.
Example application/json
{
"setUpRunning":true,
"scheduledJobsInputData":[
{
"schedule":{
"period":1000000,
"catchUp":false
},
"scheduledJobName":"profileIncrementalIndexingSchedule",
"scheduleType":"periodic",
"scheduleDescription":"every 1000 seconds without catch up"
},
{
"schedule":{
"daysInMonth":[
],
"weeksInMonth":[
1,
2,
3,
4,
5
],
"monthsInYear":[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"daysOfWeek":[
1,
2,
3,
4,
5,
6,
7
],
"occurrenceInDay":2
},
"scheduledJobName":"orderOptimizationSchedule",
"scheduleType":"calendar",
"scheduleDescription":"months:Jan-Dec dates: daysOfWeek:Sun-Sat occurrencesInMonth:1-last hours:11,23 minutes:0"
},
{
"schedule":{
"daysInMonth":[
],
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
3
],
"daysOfWeek":[
1,
2,
3
],
"occurrenceInDay":2
},
"scheduledJobName":"profileOptimizationSchedule",
"scheduleType":"calendar",
"scheduleDescription":"months:Feb,Apr dates: daysOfWeek:Sun-Tue occurrencesInMonth:1-3 hours:11,23 minutes:0"
},
{
"schedule":{
"period":1000000,
"catchUp":false
},
"scheduledJobName":"orderIncrementalIndexingSchedule",
"scheduleType":"periodic",
"scheduleDescription":"every 1000 seconds without catch up"
}
],
"errorMessage":"",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadminui/v1/merchant/textSearch"
}
],
"enabled":false,
"statusMessage":"Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true."
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|100007|Could not perform text search configuration as another text search setup is currently in progress.|
|100008|enable flag is required.|
|100009|scheduledJobName field in scheduledJobs is required.|
|100010|Could not perform text search configuration as similar internal operation is currently in progress.|
|100011|Invalid scheduled Job Name: {0}|
|53000|Unable to create or update schedule information.|
|53001|Missing required property: scheduleType/schedule (or) Invalid input for the schedule (or) Invalid schedule type property found. It should be either calendar or periodic.|
|53006|Unable to remove schedule information.|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"enable": true,
"scheduledJobs": [
{
"schedule": {"period": 1000000},
"scheduledJobName": "orderIncrementalIndexingSchedule",
"scheduleType": "periodic"
},
{
"schedule": {"period": 1000000},
"scheduledJobName": "profileIncrementalIndexingSchedule",
"scheduleType": "periodic"
},
{
"schedule": {"occurrenceInDay": 2},
"scheduledJobName": "orderOptimizationSchedule",
"scheduleType": "calendar"
},
{
"schedule": {
"weeksInMonth": [
1,
2,
3
],
"monthsInYear": [
1,
3
],
"daysOfWeek": [
1,
2,
3
],
"occurrenceInDay": 2
},
"scheduledJobName": "profileOptimizationSchedule",
"scheduleType": "calendar"
}
]
}
Sample Response Payload returned by endpoint:
{
"setUpRunning": true,
"scheduledJobsInputData": [
{
"schedule": {
"period": 1000000,
"catchUp": false
},
"scheduledJobName": "profileIncrementalIndexingSchedule",
"scheduleType": "periodic",
"scheduleDescription": "every 1000 seconds without catch up"
},
{
"schedule": {
"daysInMonth": [],
"weeksInMonth": [
1,
2,
3,
4,
5
],
"monthsInYear": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"daysOfWeek": [
1,
2,
3,
4,
5,
6,
7
],
"occurrenceInDay": 2
},
"scheduledJobName": "orderOptimizationSchedule",
"scheduleType": "calendar",
"scheduleDescription": "months:Jan-Dec dates: daysOfWeek:Sun-Sat occurrencesInMonth:1-last hours:11,23 minutes:0"
},
{
"schedule": {
"daysInMonth": [],
"weeksInMonth": [
1,
2,
3
],
"monthsInYear": [
1,
3
],
"daysOfWeek": [
1,
2,
3
],
"occurrenceInDay": 2
},
"scheduledJobName": "profileOptimizationSchedule",
"scheduleType": "calendar",
"scheduleDescription": "months:Feb,Apr dates: daysOfWeek:Sun-Tue occurrencesInMonth:1-3 hours:11,23 minutes:0"
},
{
"schedule": {
"period": 1000000,
"catchUp": false
},
"scheduledJobName": "orderIncrementalIndexingSchedule",
"scheduleType": "periodic",
"scheduleDescription": "every 1000 seconds without catch up"
}
],
"errorMessage": "",
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccadminui/v1/merchant/textSearch"
}],
"enabled": false,
"statusMessage": "Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true."
}