listScheduledOrdersByProfile
get
/ccagent/v1/scheduledOrders
List Scheduled Orders By Profile. Lists the scheduled orders corresponding to the given profileId. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value.
Request
Supported Media Types
- application/json
Query Parameters
-
profileId: string
The customer profile id.
-
q(optional): string
The query string.
-
requireProfileDetail(optional): boolean
The flag indicating whether to fetch the profile detail.
-
siteScope(optional): string
Defines the scope of search when site id is passed. It takes the values - siteOnly or sharedCart. If siteScope is passed as siteOnly, it will return orders corresponding to a particular site. If it is passed as sharedCart, it will return all orders corresponding to Sharing sites in the Site Group. The default value is sharedCart
Header Parameters
-
X-CCOrganization(optional): string
The organization Id to which the order belongs
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : listScheduledOrdersByProfile_response
Type:
Show Source
object
-
items(optional):
array items
The array of the Scheduled orders by the profile id.
-
limit(optional):
integer
The limit results of the Scheduled orders in a page.
-
offset(optional):
integer
The offset results of the Scheduled orders.
-
total(optional):
integer
The total number of the Scheduled orders.
-
totalResults(optional):
integer
The total results of the Scheduled orders.
Nested Schema : items
Type:
Show Source
object
-
createDate(optional):
string
The created date of the Scheduled order.
-
endDate(optional):
string
The end date of the Scheduled order.
-
Id(optional):
string
The Id of the Scheduled order.
-
lastScheduledRun(optional):
string
The last scheduled run of the user of the Scheduled order.
-
name(optional):
string
The name of the Scheduled order.
-
nextScheduledRun(optional):
string
The next scheduled run of the Scheduled order.
-
profileId(optional):
string
The profile Id of the user of the Scheduled order.
-
repositoryId(optional):
string
The repository Id of the user of the Scheduled order.
-
schedule(optional):
object schedule
The schedule of the Scheduled order.
-
siteId(optional):
string
The site Id of the user 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 template order of the Scheduled order.
-
templateOrderId(optional):
string
The template order id Id of the user of the Scheduled order.
-
type(optional):
string
The type of the Scheduled order.
-
version(optional):
integer
The version of the Scheduled order.
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 template order of the Scheduled order.
Show Source
-
state(optional):
string
The state of the template order.
Nested Schema : selectedDates
Type:
array
The selected dates in a month in year for the Scheduled order.
Show Source
Example Response (application/json)
{
"profileDetail":{
"lastName":"Butt",
"firstName":"James",
"repositoryId":"120099",
"receiveEmail":"no",
"shippingAddress":{
"lastName":"Butt",
"firstName":"James",
"country":"United States",
"phoneNumber":"504-845-1427",
"address2":"",
"city":"New Orleans",
"address1":"6649 N Blue Gum St",
"postalCode":"70116",
"county":"Orleans",
"repositoryId":"140010",
"state":"Los Angeles"
},
"dateOfBirth":null,
"id":"120099",
"locale":"en_US",
"email":"jbutt@example.com",
"daytimeTelephoneNumber":""
},
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagentui/v1/scheduledOrders?profileId=120939&requireProfileDetail=true"
}
],
"scheduledOrderHistory":{
"total":1,
"totalResults":1,
"offset":0,
"limit":250,
"items":[
{
"lastError":null,
"endDate":"2018-01-18T00:00:00.000Z",
"executionStatusList":[
{
"errorMessages":[
"Exception While cloning an order."
],
"orderId":null,
"repositoryId":"600005",
"executionDate":"2016-11-23T00:00:00.000Z",
"id":"600005",
"orderSubmitted":false,
"orderTotal":null
}
],
"type":"scheduledOrder",
"version":1,
"lastScheduledRun":null,
"schedule":{
"daysInMonth":[
1
],
"weeksInMonth":[
],
"monthsInYear":[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"daysOfWeek":[
],
"occurrenceInDay":1
},
"templateOrderId":"o90419",
"clonedOrders":[
],
"profileId":"120939",
"repositoryId":"sco30002",
"name":"test 123231",
"siteId":"siteUS",
"nextScheduledRun":"2017-01-01T00:00:00.000Z",
"state":null,
"id":"sco30002",
"startDate":"2016-12-01T00:00:00.000Z",
"createDate":"2016-11-22T17:14:14.000Z"
}
]
}
}
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|
|------------------|------------------|
|100094|Organization passed in the header is currently inactive|
|100095|The order or return request does not belong to the current organization of the shopper profile|
|100096|The organization associated to the order or return request was deleted / does not exist|
|100097|The organization associated to the order or return request is currently inactive|
|100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization|
|100099|Current operation is being performed in an organization context and the order or return request does not belong to any organization|
|100101|The shopper profile does not belong to organization passed in the header|
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