latestOpenAPI 3.0.02026-08-105585620.8 KB

18e2f2e178dd

Reports API

Get statistics

Returns statistics for specified report types.

You need to specify the report types you want to retrieve in the report_types query parameter as a comma-separated list, e.g. report_types=sales_and_costs,profit.

Note: You cannot get statistics for a period longer than 6 months.

Example

To get statistics in the default currency of a store for sales_and_costs and profit reports for August 2022, you can use the following URL: https://api.printful.com/reports/statistics?report_types=sales_and_costs,profit&date_from=2022-08-01&date_to=2022-08-31.

Report types

Currently, the following report types are available:

Report typeDescription
sales_and_costsDetailed information on sales and costs grouped by date.
sales_and_costs_summaryShort information on sales and costs grouped by date.
printful_costsAmount paid to Printful for fulfillment and shipping.
profitProfit in the specified period.
total_paid_ordersThe number of paid orders in the specified period.
costs_by_amountInformation on costs by amount grouped by date.
costs_by_productInformation on costs grouped by product.
costs_by_variantInformation on costs grouped by variant.
average_fulfillment_timeAverage time it took Printful to fulfill your orders.

The response structure for the specific reports is documented in the response schema (result.store_statistics.[reportName]).

get/reports/statistics

Query parameters

date_fromstring date required
Example:2022-08-01

The beginning of the period to get the statistics from (date in Y-m-d format).

date_tostring date required
Example:2022-08-31

The end of the period to get the statistics from (date in Y-m-d format).

currencystring
Example:USD

The currency (3-letter code) to return the statistics in. You can also specify display_currency as the value to get the statistics in the account's display currency. The store currency will be used by default.

report_typesstring required
Example:sales_and_costs,profit

A comma-separated list of report types to be retrieved.

Headers

X-PF-Store-Idstring

Use this to specify which store you want to use (required only for account level token).

The store IDs can be retrieved with the Get basic information about stores endpoint.

Response

OK

codeinteger

Response status code 200

Example response

{
  "code": 200,
  "result": {
    "store_statistics": [
      {
        "currency": "USD"
      }
    ]
  }
}