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
-
Type:
string
Required:true
The customer profile id.- q
Type:string
The query string.- requireProfileDetail
Type:boolean
The flag indicating whether to fetch the profile detail.Header Parameters- X-CCOrganization
-
Type:
string
The organization Id to which the order belongs
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : listScheduledOrdersByProfile_response- profileDetail
-
Type:
object
profileDetailThe details of the customer profile - scheduledOrderHistory
-
Type:
object
scheduledOrderHistoryList of scheduled orders for the customer profile including the pagination properties.
Nested Schema : profileDetailType:object
The details of the customer profile- daytimeTelephoneNumber
-
Type:
string
The day time telephone number of the customer profile. -
Type:
string
Email of the customer profile. - firstName
-
Type:
string
The first name of the customer profile. - id
-
Type:
string
The customer profile id. - lastName
-
Type:
string
Last name of the customer profile. - receiveEmail
-
Type:
string
Flag indicating whether the customer opted for receiving emails. - repositoryId
-
Type:
string
The repository id of the customer profile record. - shippingAddress
-
Type:
object
shippingAddressThe default shipping address for the customer profile
Nested Schema : scheduledOrderHistoryType:object
List of scheduled orders for the customer profile including the pagination properties.- items
-
Type:
array
itemsList of scheduled orders for the customer profile. - limit
-
Type:
integer
The batch size of the scheduled order records fetched together. - offset
-
Type:
integer
The start index of the list of scheduled order records fetched. - total
-
Type:
integer
The total number of scheduled orders fetched. - totalResults
-
Type:
integer
The total number of scheduled orders fetched.
Nested Schema : shippingAddressType:object
The default shipping address for the customer profile- address1
-
Type:
string
The address line 1 in the shipping address. - address2
-
Type:
string
The address line 2 in the shipping address. - city
-
Type:
string
The city in the shipping address record. - country
-
Type:
string
The country in the shipping address record. - county
-
Type:
string
The county in the shipping address. - firstName
-
Type:
string
The first name in the shipping address. - lastName
-
Type:
string
The last name in the shipping address. - phoneNumber
-
Type:
string
The phone number in the shipping address. - postalCode
-
Type:
string
The postal code in the shipping address. - repositoryId
-
Type:
string
The repository id of the shipping address record. - state
-
Type:
string
The state in the shipping address.
Nested Schema : itemsNested Schema : itemsType:object
- 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 : executionStatusListNested Schema : scheduleType: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 : itemsType: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 : errorMessagesNested Schema : daysInMonthNested Schema : daysOfWeekNested Schema : monthsInYearNested Schema : weeksInMonthExample 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" }, "id":"120099", "email":"jbutt@gmail.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 ResponseThe 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|BodyRoot Schema : errorModelType: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 : errorsNested Schema : itemsType: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 Response Payload returned by endpoint:
{ "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" }, "id": "120099", "email": "jbutt@gmail.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" }] } }