Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get sales metrics

Retrieves aggregated sales metrics for a specified date range. Returns hourly or daily granularity with order counts and sales totals grouped by currency.

GET/api/v1/{team_slug}/{app_slug}/orders/metrics
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
app_slugstringrequired

App slug

team_slugstringrequired

Team slug

Query parameters
start_datestringrequired

Start date (YYYY-MM-DD)

end_datestringrequired

End date (YYYY-MM-DD)

granularitystring

Granularity of the metrics (hour, day)

Responses
200

Sales metrics with order counts retrieved successfully

datainternal_pkg_webserver_v1.SalesMetricsDataResponserequired
Show properties
daily_metricsinternal_pkg_webserver_v1.DailySalesMetricResponse[]
Show properties
Array of internal_pkg_webserver_v1.DailySalesMetricResponse
daystring
order_countinteger
sales_by_currencyinternal_pkg_webserver_v1.SalesByCurrency[] | null
hourly_metricsinternal_pkg_webserver_v1.HourlySalesMetricResponse[]
Show properties
Array of internal_pkg_webserver_v1.HourlySalesMetricResponse
hourstring
order_countinteger
sales_by_currencyinternal_pkg_webserver_v1.SalesByCurrency[] | null
total_order_countinteger
total_sales_by_currencyinternal_pkg_webserver_v1.SalesByCurrency[] | null
Show properties
Array of internal_pkg_webserver_v1.SalesByCurrency
currency_codestring
total_compensated_salesnumber
total_sales_amountnumber
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid date format or missing parameters

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.enad.io/api/v1/string/string/orders/metrics?start_date=string&end_date=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "data": {
    "daily_metrics": [
      {
        "day": "string",
        "order_count": 0,
        "sales_by_currency": [
          {
            "currency_code": "string",
            "total_compensated_sales": 0,
            "total_sales_amount": 0
          }
        ]
      }
    ],
    "hourly_metrics": [
      {
        "hour": "string",
        "order_count": 0,
        "sales_by_currency": [
          {
            "currency_code": "string",
            "total_compensated_sales": 0,
            "total_sales_amount": 0
          }
        ]
      }
    ],
    "total_order_count": 0,
    "total_sales_by_currency": [
      {
        "currency_code": "string",
        "total_compensated_sales": 0,
        "total_sales_amount": 0
      }
    ]
  },
  "details": [
    "string"
  ],
  "success": true
}