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(required): string
The customer profile id.
-
q: string
The query string.
-
requireProfileDetail: boolean
The flag indicating whether to fetch the profile detail.
-
siteScope: 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: 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
-
profileDetail:
object profileDetail
The details of the customer profile
-
scheduledOrderHistory:
object scheduledOrderHistory
List of scheduled orders for the customer profile including the pagination properties.
Nested Schema : profileDetail
Type:
object
The details of the customer profile
Show Source
-
dateOfBirth:
string
Date of birth
-
daytimeTelephoneNumber:
string
The day time telephone number of the customer profile.
-
email:
string
Email of the customer profile.
-
firstName:
string
The first name of the customer profile.
-
id:
string
The customer profile id.
-
lastName:
string
Last name of the customer profile.
-
locale:
string
Current Locale
-
receiveEmail:
string
Flag indicating whether the customer opted for receiving emails.
-
repositoryId:
string
The repository id of the customer profile record.
-
shippingAddress:
object shippingAddress
The default shipping address for the customer profile
Nested Schema : scheduledOrderHistory
Type:
object
List of scheduled orders for the customer profile including the pagination properties.
Show Source
-
items:
array items
List of scheduled orders for the customer profile.
-
limit:
integer
The batch size of the scheduled order records fetched together.
-
offset:
integer
The start index of the list of scheduled order records fetched.
-
total:
integer
The total number of scheduled orders fetched.
-
totalResults:
integer
The total number of scheduled orders fetched.
Nested Schema : shippingAddress
Type:
object
The default shipping address for the customer profile
Show Source
-
address1:
string
The address line 1 in the shipping address.
-
address2:
string
The address line 2 in the shipping address.
-
city:
string
The city in the shipping address record.
-
country:
string
The country in the shipping address record.
-
county:
string
The county in the shipping address.
-
firstName:
string
The first name in the shipping address.
-
lastName:
string
The last name in the shipping address.
-
phoneNumber:
string
The phone number in the shipping address.
-
postalCode:
string
The postal code in the shipping address.
-
repositoryId:
string
The repository id of the shipping address record.
-
state:
string
The state in the shipping address.
Nested Schema : items
Type:
Show Source
object
-
createDate:
string
Scheduled Order creation date.
-
endDate:
string
Scheduled order end date.
-
executionStatusList:
array executionStatusList
The list of executions from this scheduled order.
-
id:
string
ID of the scheduled order.
-
lastScheduledRun:
string
Last scheduled run date of the scheduled order.
-
name:
string
Name of the Scheduled Order.
-
nextScheduledRun:
string
Next scheduled run date of the scheduled order.
-
profileId:
string
Profile ID of the shopper associated with the scheduled order.
-
repositoryId:
string
Repository ID of the scheduled order.
-
schedule:
object schedule
Schedule of this scheduled order
-
startDate:
string
Scheduled Order start date.
-
state:
string
The state of the scheduled order.
-
templateOrderId:
string
The template order id.
Nested Schema : executionStatusList
Type:
array
The list of executions from this scheduled order.
Show Source
Nested Schema : schedule
Type:
object
Schedule of this scheduled order
Show Source
-
daysInMonth:
array daysInMonth
Days in a month this scheduled order has to be placed
-
daysOfWeek:
array daysOfWeek
Days in a week this scheduled order has to be placed
-
delay:
integer
The delay of the first scheduled run after start date of the Periodic Scheduled order in milliseconds.
-
monthsInYear:
array monthsInYear
Months in a year this scheduled order has to be placed
-
occurrenceInDay:
integer
The number of times this scheduled order is placed in a day
-
period:
integer
The period of repeating of the Periodic Scheduled order in milliseconds.
-
weeksInMonth:
array weeksInMonth
Weeks in a month this scheduled order has to be placed
Nested Schema : items
Type:
Show Source
object
-
errorMessages:
array errorMessages
The list of error messages for this execution.
-
executionDate:
string
The execution date.
-
id:
string
ID of the execution status.
-
orderId:
string
Order ID of the order submitted in that particular execution.
-
orderSubmitted:
boolean
The boolean indicating whether the order has been submitted successfully during the execution.
-
orderTotal:
number
Order total.
-
repositoryId:
string
The repository id of the execution status.
Nested Schema : errorMessages
Type:
array
The list of error messages for this execution.
Show Source
Nested Schema : daysInMonth
Type:
array
Days in a month this scheduled order has to be placed
Show Source
Nested Schema : daysOfWeek
Type:
array
Days in a week this scheduled order has to be placed
Show Source
Nested Schema : monthsInYear
Type:
array
Months in a year this scheduled order has to be placed
Show Source
Nested Schema : weeksInMonth
Type:
array
Weeks in a month this scheduled order has to be placed
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code