convertToScheduledOrder
post
/ccstore/v1/orders/current/convertToScheduledOrder
Create the scheduledOrder based on the current order. Optionally takes the X-CCOrganization header to specify current Organization context of logged in user.
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCOrganization(optional): string
Current organization context of the logged in user
Root Schema : convertToScheduledOrder_request
Type:
Show Source
object
-
endDate(optional):
string
The end date of the Scheduled order.
-
name:
string
The name of the Scheduled order.
-
schedule:
object schedule
The schedule of the Scheduled order.
-
scheduleType:
string
The schedule type of the Scheduled order.
-
startDate:
string
The start date of the Scheduled order.
Example:
{
"schedule":{
"selectedDates":[
],
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
2
],
"daysOfWeek":[
1,
2,
3
]
},
"scheduleType":"calendar",
"endDate":"2017-10-01T00:00:00.000Z",
"name":"testScheduleOrder",
"startDate":"2015-10-01T00:00:00.000Z"
}
Nested Schema : schedule
Type:
object
The schedule of the Scheduled order.
Show Source
-
daysOfWeek:
array daysOfWeek
The days of week of the Scheduled order.
-
delay(optional):
integer
The delay of the first scheduled run after start date of the Periodic Scheduled order in milliseconds.
-
interval(optional):
integer
The interval in term of number of days of the Scheduled order.
-
monthsInYear:
array monthsInYear
The months in year of the Scheduled order.
-
occurenceInDay(optional):
integer
The occurence in day on the Scheduled order.
-
period:
integer
The period of repeating of the Periodic Scheduled order in milliseconds.
-
selectedDates:
array selectedDates
The selected dates in a month in year for the Scheduled order.
-
weeksInMonth:
array weeksInMonth
The weeks in month of the Scheduled order.
Nested Schema : selectedDates
Type:
array
The selected dates in a month in year for the Scheduled order.
Show Source
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : convertToScheduledOrder_response
Type:
Show Source
object
-
clonedOrders(optional):
array clonedOrders
The list of cloned orders
-
createDate(optional):
string
The create date of the Scheduled order.
-
endDate(optional):
string
The end date of the Scheduled order.
-
executionStatusList(optional):
array executionStatusList
The status list of executed scheduled orders
-
id(optional):
string
The id of the Scheduled order.
-
lastScheduledRun(optional):
string
The last scheduled run of the Scheduled order.
-
links(optional):
array links
Collection of links indicating operations possible upon resource/subresource.
-
name(optional):
string
The name of the Scheduled order.
-
nextScheduledRun(optional):
string
The next scheduled run of the Scheduled order.
-
profileId(optional):
string
The profileId of the Scheduled order.
-
schedule(optional):
object schedule
The schedule of the Scheduled order.
-
startDate(optional):
string
The start date of the Scheduled order.
-
state(optional):
string
The status of the Scheduled order.
-
templateOrder(optional):
object templateOrder
The templateOrder of the Scheduled order.
-
templateOrderId(optional):
string
The templateOrderId of the Scheduled order.
-
type(optional):
string
The type of the Scheduled order.
Nested Schema : executionStatusList
Type:
array
The status list of executed scheduled orders
Show Source
Nested Schema : links
Type:
array
Collection of links indicating operations possible upon resource/subresource.
Show Source
Nested Schema : schedule
Type:
object
The schedule of the Scheduled order.
Show Source
-
daysOfWeek(optional):
array daysOfWeek
The days of week of the Scheduled order.
-
delay(optional):
integer
The delay of the first scheduled run after start date of the Periodic Scheduled order in milliseconds.
-
interval(optional):
integer
The interval in term of number of days of the Scheduled order.
-
monthsInYear(optional):
array monthsInYear
The months in year of the Scheduled order.
-
occurenceInDay(optional):
integer
The occurence in day on the Scheduled order.
-
period(optional):
integer
The period of repeating of the Periodic Scheduled order in milliseconds.
-
selectedDates(optional):
array selectedDates
The selected dates in a month in year for the Scheduled order.
-
weeksInMonth(optional):
array weeksInMonth
The weeks in month of the Scheduled order.
Nested Schema : templateOrder
Type:
object
The templateOrder of the Scheduled order.
Show Source
-
repositoryId(optional):
string
The repository id of the templateOrder
-
state(optional):
string
The state of the templateOrder
Nested Schema : items
Type:
Show Source
object
-
currency(optional):
string
The currency code of order.
-
errorMessages(optional):
string
The error messages list.
-
executionDate(optional):
string
The date for previous scheduled run
-
id(optional):
string
The Id of the execution status.
-
orderId(optional):
string
The Id of the order.
-
orderSubmitted(optional):
boolean
The status of order.
-
orderTotal(optional):
number
Total order value.
-
scheduledOrderId(optional):
string
The Id of the Scheduled order.
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
href specifying link's destination.
-
method(optional):
string
HTTP method type.
-
rel(optional):
string
Attribute specifying link between current response and linked destination.
Nested Schema : selectedDates
Type:
array
The selected dates in a month in year for the Scheduled order.
Show Source
Example Response (application/json)
{
"endDate":"2022-10-01T00:00:00.000Z",
"executionStatusList":[
],
"type":"scheduledOrder",
"schedule":{
"daysInMonth":[
],
"scheduleType":"calendar",
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
2
],
"daysOfWeek":[
1,
2,
3
],
"occurrenceInDay":1
},
"templateOrderId":"o240411",
"clonedOrders":[
],
"profileId":"se-570031",
"templateOrder":{
"repositoryId":"o240411",
"state":"TEMPLATE"
},
"name":"testScheduleOrder",
"nextScheduledRun":"2020-10-01T00:00:00.000Z",
"links":[
{
"method":"PATCH",
"rel":"/rels/patchCurrentOrder",
"href":"http://localhost:8080/ccstore/v1/orders/current"
},
{
"method":"POST",
"rel":"/rels/priceCurrentOrder",
"href":"http://localhost:8080/ccstore/v1/orders/current/price"
},
{
"method":"POST",
"rel":"/rels/convertToScheduledOrder",
"href":"http://localhost:8080/ccstore/v1/orders/current/convertToScheduledOrder"
},
{
"method":"POST",
"rel":"/rels/switchCurrentOrder",
"href":"http://localhost:8080/ccstore/v1/orders/current/switch"
},
{
"method":"POST",
"rel":"/rels/submitCurrentOrder",
"href":"http://localhost:8080/ccstore/v1/orders/current/submit"
}
],
"state":"active",
"id":"sco140001",
"startDate":"2020-10-01T00:00:00.000Z",
"createDate":"2020-09-21T08:47:10.889Z"
}
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code