updateScheduledOrder
put
/ccstore/v1/scheduledOrders/{id}
Update Scheduled Order. It will update the scheduled order information like deactivate, change the schedule information. Optionally takes the X-CCOrganization header to specify current Organization context of logged in user .
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The id of the Scheduled order.
Header Parameters
- X-CCOrganization
-
Type:
string
Current organization context of the logged in user
Body Parameter
Root Schema : updateScheduledOrder_request
{
"schedule":{
"daysInMonth":[
1
],
"weeksInMonth":[
],
"monthsInYear":[
1,
3,
5,
7,
9,
11
],
"daysOfWeek":[
],
"occurrenceInDay":1
},
"scheduleType":"calendar",
"endDate":"2016-12-08",
"name":"Monthly Order",
"state":"active",
"startDate":"2016-12-01"
}
- endDate
-
Type:
string
Scheduled order end date. - name
-
Type:
string
Name of the Scheduled Order. - schedule
-
Type:
object
scheduleRequired:true
The schedule of the scheduled order - startDate
-
Type:
string
Required:true
Scheduled Order start date. - state
-
Type:
string
The state of the scheduled order.
Nested Schema : schedule
Type:
object
The schedule of the scheduled order
- daysInMonth
-
Type:
array
daysInMonthDays in a month this scheduled order has to be placed - daysOfWeek
-
Type:
array
daysOfWeekDays in a week this scheduled order has to be placed - monthsInYear
-
Type:
array
monthsInYearMonths in a year this scheduled order has to be placed - occurrenceInDay
-
Type:
integer
The number of times this scheduled order is placed in a day - weeksInMonth
-
Type:
array
weeksInMonthWeeks in a month this scheduled order has to be placed
Nested Schema : daysInMonth
Nested Schema : daysOfWeek
Nested Schema : monthsInYear
Nested Schema : weeksInMonth
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateScheduledOrder_response
- createDate
-
Type:
string
Scheduled Order creation date. - endDate
-
Type:
string
Scheduled order end date. - executionStatusList
-
Type:
array
executionStatusListThe list of executions from this scheduled order. - id
-
Type:
string
ID of the scheduled order. - lastScheduledRun
-
Type:
string
Last scheduled run date of the scheduled order. - name
-
Type:
string
Name of the Scheduled Order. - nextScheduledRun
-
Type:
string
Next scheduled run date of the scheduled order. - profileId
-
Type:
string
Profile ID of the shopper associated with the scheduled order. - repositoryId
-
Type:
string
Repository ID of the scheduled order. - schedule
-
Type:
object
scheduleSchedule of this scheduled order - startDate
-
Type:
string
Scheduled Order start date. - state
-
Type:
string
The state of the scheduled order. - templateOrderId
-
Type:
string
The template order id.
Nested Schema : executionStatusList
Nested Schema : schedule
Type:
object
Schedule of this scheduled order
- daysInMonth
-
Type:
array
daysInMonthDays in a month this scheduled order has to be placed - daysOfWeek
-
Type:
array
daysOfWeekDays in a week this scheduled order has to be placed - monthsInYear
-
Type:
array
monthsInYearMonths in a year this scheduled order has to be placed - occurrenceInDay
-
Type:
integer
The number of times this scheduled order is placed in a day - weeksInMonth
-
Type:
array
weeksInMonthWeeks in a month this scheduled order has to be placed
Nested Schema : items
Type:
object
- errorMessages
-
Type:
array
errorMessagesThe list of error messages for this execution. - executionDate
-
Type:
string
The execution date. - id
-
Type:
string
ID of the execution status. - orderId
-
Type:
string
Order ID of the order submitted in that particular execution. - orderSubmitted
-
Type:
boolean
The boolean indicating whether the order has been submitted successfully during the execution. - orderTotal
-
Type:
number
Order total. - repositoryId
-
Type:
string
The repository id of the execution status.
Nested Schema : errorMessages
Nested Schema : daysInMonth
Nested Schema : daysOfWeek
Nested Schema : monthsInYear
Nested Schema : weeksInMonth
Example application/json
{
"schedule":{
"weeksInMonth":[
"1",
"2",
"3"
],
"monthsInYear":[
"1",
"2"
],
"daysOfWeek":[
"1",
"2",
"3"
]
},
"templateOrderId":"o10001",
"scheduleType":"calendar",
"endDate":"10/01/2017",
"profileId":"user1",
"name":"testScheduleOrder",
"nextScheduledRun":"10/02/2015",
"Id":"sch001",
"state":"active",
"startDate":"10/01/2015",
"createDate":"9/01/2015"
}
Default Response
The error response
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAn optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{ "schedule": { "weeksInMonth": [ "1", "2", "3" ], "monthsInYear": [ "1", "2" ], "daysOfWeek": [ "1", "2", "3" ] }, "scheduleType": "calendar", "endDate": "10/01/2017", "name": "testScheduleOrder", "state": "active", "startDate": "10/01/2015" }
Sample Response Payload returned by endpoint:
{ "schedule": { "weeksInMonth": [ "1", "2", "3" ], "monthsInYear": [ "1", "2" ], "daysOfWeek": [ "1", "2", "3" ] }, "templateOrderId": "o10001", "scheduleType": "calendar", "endDate": "10/01/2017", "profileId": "user1", "name": "testScheduleOrder", "nextScheduledRun": "10/02/2015", "Id": "sch001", "state": "active", "startDate": "10/01/2015", "createDate": "9/01/2015" }