Skip to content

Mockup Statistics

Understanding the volume of generated mockups is crucial for monitoring your account usage. This page provides an overview of how you can track and retrieve these statistics.

There are two primary methods to determine the number of mockups generated:

1. Via Merchrocket API (Real-time Usage Headers)

For most endpoints related to credit usage, Merchrocket provides real-time information directly in the response headers. This is the fastest way to check your current monthly status.

For more details on these headers, see the Credits & Usage documentation.

2. Via Merchrocket API (Historical Data)

If you need to retrieve historical data or current statistics for a specific period, you can query the Merchrocket API directly. This is the recommended method for generating reports or building dashboards.

You can retrieve statistics for a specific year directly via the API.

For more details, please refer to the API documentation.

3. Via Webhooks

For real-time tracking, you can process incoming webhook notifications. This allows your system to maintain its own count as mockups are being generated without needing to poll the API.

Alternatively, you can determine the number of generated mockups directly from the webhook payload once a mockup task is completed. The webhook payload includes a statistics object with the countPerMonth value, representing the total count for the current month:

json
  "statistics": {
    "countPerMonth": 28
  }

For more information on the payload structure, see the Webhook documentation.