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 Response
Following model is returned when operation succeeds.
Body
Root Schema : listScheduledOrdersByProfile_response
Nested Schema : items
Type: array
The array of the Scheduled orders by the profile id.
Nested Schema : items
Type: object
Nested Schema : schedule
Type: object
The schedule of the Scheduled order.
Nested Schema : templateOrder
Type: object
The template order of the Scheduled order.
Nested Schema : daysOfWeek
Type: array
The days of week of the Scheduled order.
Nested Schema : monthsInYear
Type: array
The months in year of the Scheduled order.
Nested Schema : selectedDates
Type: array
The selected dates in a month in year for the Scheduled order.
Nested Schema : weeksInMonth
Type: array
The weeks in month of the Scheduled order.
Example 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 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|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"
    }]
  }
}