getReportData
post
/ccadmin/v1/reports/{id}
Get Report Data. Returns the report data as a list of records from a given reportId and other report filtering criteria details . Records are represented as a map with property name and value. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueID of report.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Body Parameter
Root Schema : getReportData_request
{
"metric":"orders",
"productIds":[
"xprod2103",
"xprod2056"
],
"locations":[
{
"regionIds":[
"CA-NU",
"CA-QC",
"AF-BDG",
"AF-BGL"
],
"type":"shipping"
},
{
"regionIds":[
"IN-AP",
"IN-AS",
"AL-DI",
"AL-DR"
],
"type":"billing"
}
],
"siteIds":[
"siteUS"
],
"timeFrame":"last30days"
}
- chart
-
Type:
booleanReturn results in chart format - couponCodes
-
Type:
stringCoupon ids as comma separted string. - groupBy
-
Type:
stringGroup values by 'day', 'month', etc. - locations
-
Type:
arraylocationsAdditional Properties Allowed:Array of object having various region IDs for shipping and billing location filters. - metric
-
Type:
stringMetric of the reporting module. - priceListGroups
-
Type:
stringPricelist groups as comma separted string. - productIds
-
Type:
booleanProducts IDs for product filter. - promotionIds
-
Type:
stringPromotion ids as comma separted string. - promotionTypeId
-
Type:
stringPromotion type id - siteIds
-
Type:
arraysiteIdsAdditional Properties Allowed:List of site ids for site filter. - timeFrame
-
Type:
stringTime frame for the reporting graph. - transactionCurrency
-
Type:
stringcurrency for the reporting graph.
Nested Schema : locations
Nested Schema : siteIds
Nested Schema : items
Type:
object- regionIds
-
Type:
arrayregionIdsAdditional Properties Allowed:Array having region IDs for shipping fiter. - type
-
Type:
stringType can be shipping or billing.
Nested Schema : regionIds
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getReportData_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:Report data for detailedOrderMetrics. Properties in the response are dynamically generated, will change depending upon the reportId.
Nested Schema : items
Nested Schema : items
Type:
object- averageOrderGrossRevenue
-
Type:
stringThe average value of the Gross Revenue obtained for the orders submitted. - averageOrderMarkdownDiscount
-
Type:
stringThe average value of the Markdown Discounts applied to the orders submitted. - averageOrderPromotionalDiscount
-
Type:
stringThe average value of the Promotional Discounts that were applied to the orders submitted. - averageOrderSize
-
Type:
stringThe average number of items/units sold contained in the orders submitted. - averageOrderValue
-
Type:
stringThe average value obtained for the orders submitted. - excludedTax
-
Type:
stringThe value of the tax (if tax is exclusive) applied to the orders submitted. - fullListPrice
-
Type:
stringThe total list price of items sold. Full List Price revenue excludes tax, shipping revenue and any promotional or markdown discounts applied to the order. - grossRevenue
-
Type:
stringThe amount of revenue gained from items sold for orders submitted. Gross Revenue excludes tax, shipping revenue and any promotional discounts applied to the order. It is calculated using the price a customer paid, regardless of whether this was the full list price or sale price. - includedTax
-
Type:
stringThe value of the tax (if tax is inclusive) applied to the orders submitted. - markdownDiscount
-
Type:
stringThe value of the discounts applied to orders submitted as a result of items/units being sold at a markdown price. Promotional discounts are not included. - netRevenue
-
Type:
stringThe total amount received as a result of orders submitted. Net Revenue consists of the Gross Revenue from your sales orders as well as shipping and tax revenue. Promotional discounts are then subtracted to provide this figure. - orders
-
Type:
stringThe Number of Orders submitted (where a payment has been authorized/approved/successfully processed). - promotionalDiscount
-
Type:
stringThe value of the promotional discounts applied to the orders submitted. - shipping
-
Type:
stringThe value of the shipping charges applied to the orders submitted. - unitsSold
-
Type:
stringNumber of Items/units sold in the orders submitted.
Example application/json
[
{
"includedTax":"",
"netRevenue":"",
"unitsSold":"",
"averageOrderValue":"",
"promotionalDiscount":"",
"averageOrderMarkdownDiscount":"",
"grossRevenue":"",
"markdownDiscount":"",
"averageOrderPromotionalDiscount":"",
"shipping":"",
"fullListPrice":"",
"excludedTax":"",
"averageOrderGrossRevenue":"",
"orders":"0",
"averageOrderSize":""
}
]
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|
|------------------|------------------|
|94028|emptyReportCacheParameters.|
|94027|getReportDataCacheFailed.|
|20213|errorListingPriceListGroups|
|94004|reportDataParseError.|
|20035|listHistoryProductsInternalError.|
|94003|Product filter transform error.|
|94069|Category Ids filter transform parsing error|
|20034|getListProductsInternalError.|
|94007|InvalidReportInput.|
|94064|Transaction currency filter transform error.|
|94063|Transaction currency filter parsing error.|
|94002|Location filter transform error.|
|94068|Category Ids filter parsing error|
|94001|Product filter parsing error.|
|94023|unconfiguredReportVaribaleError.|
|94000|Location filter parsing error.|
|94022|Failed to get OBIEE analysis.|
|94066|price list group filter transfrom error.|
|94021|Invalid OBIEE analysis.|
|94065|price list group filter parsing error.|
|20052|List colletions internal Error|
|94015|reportNotConfigured.|
|94014|Log off to OBIEE failed.|
|94019|chartDataNotSupported.|
|94018|reportDataNotSupported.|
|20185|invalidPriceListGroup|
|94073|Organization filter transform parsing error|
|94072|Organization filter parsing error|
|94013|getSessionFailed.|
|94012|getObieeDataFailed.|
|94034|Credential properties retrieval error.|
|94033|Credential properties not set error.|
|20205|invalidTransactionCurrency|
|94071|Category Types filter transform parsing error|
|94070|Category Types filter parsing error|
|30022|invalidSiteId|
|94074|Site Ids filter parsing error|
|94075|Site Ids filter transform parsing error|
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 Request:
{
"metric": "orders",
"productIds": [
"xprod2103",
"xprod2056"
],
"locations": [
{
"regionIds": [
"CA-NU",
"CA-QC",
"AF-BDG",
"AF-BGL"
],
"type": "shipping"
},
{
"regionIds": [
"IN-AP",
"IN-AS",
"AL-DI",
"AL-DR"
],
"type": "billing"
}
],
"siteIds": ["siteUS"],
"timeFrame": "last30days"
}
Sample Response Payload returned by endpoint:
[{
"includedTax": "",
"netRevenue": "",
"unitsSold": "",
"averageOrderValue": "",
"promotionalDiscount": "",
"averageOrderMarkdownDiscount": "",
"grossRevenue": "",
"markdownDiscount": "",
"averageOrderPromotionalDiscount": "",
"shipping": "",
"fullListPrice": "",
"excludedTax": "",
"averageOrderGrossRevenue": "",
"orders": "0",
"averageOrderSize": ""
}]