getReport
get
/ccagent/v1/agentReports/{id}
Get Report. Returns the data for displaying chart with order count and order value information with the id set as 'chartOrders'.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueReport Id.
Query Parameters
- endDate
-
Type:
stringRequired:trueEnd date in ISO format for displaying the data- priceGroupId
Type:stringRequired:truePriceListGroup Id- startDate
Type:stringRequired:trueStart date in ISO format for displaying the data
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getReport_response
- orderCountData
-
Type:
arrayorderCountDataAdditional Properties Allowed:Data for orders created on each day between the start date and end date - orderValueData
-
Type:
arrayorderValueDataAdditional Properties Allowed:Data for value of orders created on each day between the start date and end date
Nested Schema : orderCountData
Nested Schema : orderValueData
Nested Schema : items
Type:
object- count
-
Type:
integerThe number of orders created on the date - creationDate
-
Type:
stringCreation date of the order in ISO format.
Nested Schema : items
Type:
object- count
-
Type:
numberThe total value of all the orders created on the day - creationDate
-
Type:
stringCreation date of the order in ISO format.
Example application/json
{
"orderValueData":[
{
"count":0,
"creationDate":"2015-04-26T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-27T18:30:00.000Z"
},
{
"count":7701.98,
"creationDate":"2015-04-28T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-29T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-30T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-05-01T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-05-02T18:30:00.000Z"
}
],
"orderCountData":[
{
"count":0,
"creationDate":"2015-04-26T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-27T18:30:00.000Z"
},
{
"count":8,
"creationDate":"2015-04-28T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-29T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-04-30T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-05-01T18:30:00.000Z"
},
{
"count":0,
"creationDate":"2015-05-02T18:30:00.000Z"
}
],
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagent/v1/agentReports/chartOrders?startDate=2015-04-26T18%3A30%3A00.000Z&endDate=2015-05-03T18%3A30%3A00.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|
|------------------|------------------|
|50001|Generic Internal Error|
|200125|Blank input parameters.|
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:
arrayerrorsAdditional Properties Allowed:An 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:
{
"orderValueData": [
{
"count": 0,
"creationDate": "2015-04-26T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-27T18:30:00.000Z"
},
{
"count": 7701.98,
"creationDate": "2015-04-28T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-29T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-30T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-05-01T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-05-02T18:30:00.000Z"
}
],
"orderCountData": [
{
"count": 0,
"creationDate": "2015-04-26T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-27T18:30:00.000Z"
},
{
"count": 8,
"creationDate": "2015-04-28T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-29T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-04-30T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-05-01T18:30:00.000Z"
},
{
"count": 0,
"creationDate": "2015-05-02T18:30:00.000Z"
}
],
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccagent/v1/agentReports/chartOrders?startDate=2015-04-26T18%3A30%3A00.000Z&endDate=2015-05-03T18%3A30%3A00.000Z"
}]
}