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: string
Required: true
ID of report.
Header Parameters
X-CCAsset-Language
Type: string
The asset language of the request
Body Parameter
Root Schema : getReportData_request
Nested Schema : locations
Type: array
Array of object having various region IDs for shipping and billing location filters.
Nested Schema : siteIds
Type: array
List of site ids for site filter.
Nested Schema : items
Type: object
Nested Schema : regionIds
Type: array
Array having region IDs for shipping fiter.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getReportData_response
Nested Schema : items
Type: array
Report data for detailedOrderMetrics. Properties in the response are dynamically generated, will change depending upon the reportId.
Nested Schema : items
Type: object
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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