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:
stringRequired:trueThe customer profile id.- q
Type:stringThe query string.- requireProfileDetail
Type:booleanThe flag indicating whether to fetch the profile detail.Header Parameters- X-CCOrganization
-
Type:
stringThe 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:
objectprofileDetailThe details of the customer profile - scheduledOrderHistory
-
Type:
objectscheduledOrderHistoryList of scheduled orders for the customer profile including the pagination properties.
Nested Schema : profileDetailType:objectThe details of the customer profile- daytimeTelephoneNumber
-
Type:
stringThe day time telephone number of the customer profile. -
Type:
stringEmail of the customer profile. - firstName
-
Type:
stringThe first name of the customer profile. - id
-
Type:
stringThe customer profile id. - lastName
-
Type:
stringLast name of the customer profile. - receiveEmail
-
Type:
stringFlag indicating whether the customer opted for receiving emails. - repositoryId
-
Type:
stringThe repository id of the customer profile record. - shippingAddress
-
Type:
objectshippingAddressThe default shipping address for the customer profile
Nested Schema : scheduledOrderHistoryType:objectList of scheduled orders for the customer profile including the pagination properties.- items
-
Type:
arrayitemsList of scheduled orders for the customer profile. - limit
-
Type:
integerThe batch size of the scheduled order records fetched together. - offset
-
Type:
integerThe start index of the list of scheduled order records fetched. - total
-
Type:
integerThe total number of scheduled orders fetched. - totalResults
-
Type:
integerThe total number of scheduled orders fetched.
Nested Schema : shippingAddressType:objectThe default shipping address for the customer profile- address1
-
Type:
stringThe address line 1 in the shipping address. - address2
-
Type:
stringThe address line 2 in the shipping address. - city
-
Type:
stringThe city in the shipping address record. - country
-
Type:
stringThe country in the shipping address record. - county
-
Type:
stringThe county in the shipping address. - firstName
-
Type:
stringThe first name in the shipping address. - lastName
-
Type:
stringThe last name in the shipping address. - phoneNumber
-
Type:
stringThe phone number in the shipping address. - postalCode
-
Type:
stringThe postal code in the shipping address. - repositoryId
-
Type:
stringThe repository id of the shipping address record. - state
-
Type:
stringThe state in the shipping address.
Nested Schema : itemsNested Schema : itemsType:object- createDate
-
Type:
stringScheduled Order creation date. - endDate
-
Type:
stringScheduled order end date. - executionStatusList
-
Type:
arrayexecutionStatusListThe list of executions from this scheduled order. - id
-
Type:
stringID of the scheduled order. - lastScheduledRun
-
Type:
stringLast scheduled run date of the scheduled order. - name
-
Type:
stringName of the Scheduled Order. - nextScheduledRun
-
Type:
stringNext scheduled run date of the scheduled order. - profileId
-
Type:
stringProfile ID of the shopper associated with the scheduled order. - repositoryId
-
Type:
stringRepository ID of the scheduled order. - schedule
-
Type:
objectscheduleSchedule of this scheduled order - startDate
-
Type:
stringScheduled Order start date. - state
-
Type:
stringThe state of the scheduled order. - templateOrderId
-
Type:
stringThe template order id.
Nested Schema : executionStatusListNested Schema : scheduleType:objectSchedule of this scheduled order- daysInMonth
-
Type:
arraydaysInMonthDays in a month this scheduled order has to be placed - daysOfWeek
-
Type:
arraydaysOfWeekDays in a week this scheduled order has to be placed - monthsInYear
-
Type:
arraymonthsInYearMonths in a year this scheduled order has to be placed - occurrenceInDay
-
Type:
integerThe number of times this scheduled order is placed in a day - weeksInMonth
-
Type:
arrayweeksInMonthWeeks in a month this scheduled order has to be placed
Nested Schema : itemsType:object- errorMessages
-
Type:
arrayerrorMessagesThe list of error messages for this execution. - executionDate
-
Type:
stringThe execution date. - id
-
Type:
stringID of the execution status. - orderId
-
Type:
stringOrder ID of the order submitted in that particular execution. - orderSubmitted
-
Type:
booleanThe boolean indicating whether the order has been submitted successfully during the execution. - orderTotal
-
Type:
numberOrder total. - repositoryId
-
Type:
stringThe 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:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAn optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errorsNested Schema : itemsType:object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe 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" }] } }