Get revenue statistics
Retrieve revenue statistics for a configurable date range. Returns revenue, order counts, average order amount, and other useful statistics.
/revenueSecurity
This operation accepts the following authorization requirements.
Request
Query parameters
startDatestring:dateStart date for the revenue calculation period (ISO 8601 datetime format). Defaults to 30 days ago if not provided.
endDatestring:dateEnd date for the revenue calculation period (ISO 8601 datetime format). Defaults to current time if not provided.
Response
Revenue statistics retrieved successfully.
revenuenumber:floatrequiredTotal revenue in cents from completed orders.
averageOrderAmountnumber:floatrequiredAverage order amount in cents (calculated from completed orders only).
totalOrdersintegerrequiredTotal number of orders (all statuses) in the date range.
placedOrdersintegerrequiredNumber of placed orders.
preparingOrdersintegerrequiredNumber of preparing orders.
completedOrdersintegerrequiredNumber of completed orders.
canceledOrdersintegerrequiredNumber of canceled orders.
startDatestring:daterequiredStart date of the revenue calculation period.
endDatestring:daterequiredEnd date of the revenue calculation period.
Bad request - invalid input parameters.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Unauthorized - authorization required.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Forbidden - insufficient permissions.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Internal server error.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.