listScheduledOrdersByProfile
get
/ccstore/v1/scheduledOrders/current/scheduledOrders
List Scheduled Orders By Profile. It will return the list of all the scheduled orders for the current profile. Optionally takes the X-CCOrganization header to specify current Organization context of logged in user.
Request
Supported Media Types
- application/json
Query Parameters
- limit
-
Type:
integerlimit of the scheduled orders list.- offset
Type:integerOffset of the scheduled orders list.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root 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 : profileDetail
Type:
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 : scheduledOrderHistory
Type:
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 : shippingAddress
Type:
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 : items
Nested Schema : items
Type:
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 : executionStatusList
Nested Schema : schedule
Type:
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 : items
Type:
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 : errorMessages
Nested Schema : daysInMonth
Nested Schema : daysOfWeek
Nested Schema : monthsInYear
Nested Schema : weeksInMonth
Example application/json
{
"total":2,
"totalResults":2,
"offset":20,
"limit":10,
"items":[
{
"templateOrderId":"o10001",
"endDate":"10/01/2015",
"templateOrder":{
"state":"TEMPLATE"
},
"profileId":"user1",
"name":"testScheduleOrder",
"nextScheduledRun":"10/02/2015",
"Id":"sch001",
"state":"inactive",
"startDate":"10/01/2015"
},
{
"templateOrderId":"o10001",
"endDate":"10/01/2018",
"templateOrder":{
"state":"PENDING_APPROVAL_TEMPLATE"
},
"profileId":"user1",
"name":"testScheduleOrder",
"nextScheduledRun":"10/02/2017",
"Id":"sch002",
"state":"active",
"startDate":"10/01/2015"
},
{
"templateOrderId":"o10002",
"endDate":"10/01/2017",
"templateOrder":{
"state":"PENDING_PAYMENT_TEMPLATE"
},
"profileId":"user1",
"name":"testScheduleOrder",
"nextScheduledRun":"01/02/2017",
"Id":"sch003",
"state":"active",
"startDate":"10/01/2015"
}
]
}
Default Response
The error response
Body
Root Schema : errorModel
Type:
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 : errors
Nested Schema : items
Type:
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:
{
"total": 2,
"totalResults": 2,
"offset": 20,
"limit": 10,
"items": [
{
"templateOrderId": "o10001",
"endDate": "10/01/2015",
"templateOrder": {"state": "TEMPLATE"},
"profileId": "user1",
"name": "testScheduleOrder",
"nextScheduledRun": "10/02/2015",
"Id": "sch001",
"state": "inactive",
"startDate": "10/01/2015"
},
{
"templateOrderId": "o10001",
"endDate": "10/01/2018",
"templateOrder": {"state": "PENDING_APPROVAL_TEMPLATE"},
"profileId": "user1",
"name": "testScheduleOrder",
"nextScheduledRun": "10/02/2017",
"Id": "sch002",
"state": "active",
"startDate": "10/01/2015"
},
{
"templateOrderId": "o10002",
"endDate": "10/01/2017",
"templateOrder": {"state": "PENDING_PAYMENT_TEMPLATE"},
"profileId": "user1",
"name": "testScheduleOrder",
"nextScheduledRun": "01/02/2017",
"Id": "sch003",
"state": "active",
"startDate": "10/01/2015"
}
]
}