Variations

Variation sales by date

Returns sales over time for a single variation in the selected period.
Date buckets use the store timezone.

GET /api/v1/store/variations/{variation}/by-date

Variation sales by date

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/variations/{VARIATION}/by-date' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "meta": {
    "resource_link": "https://app.metorik.com/products/4822"
  },
  "resource": {
    "product_id": 4822,
    "title": "Metorik Hoodie",
    "sku": null,
    "resource_link": "https://app.metorik.com/products/4822",
    "variation": {
      "variation_id": 9912,
      "name": "Black - Medium",
      "sku": "MTK-HOODIE-BLK-M"
    }
  },
  "totals": {
    "gross_items_sold": 1,
    "items_refunded": 0,
    "net_items_sold": 1,
    "gross_sales": 40,
    "total_refunds": 0,
    "net_sales": 40,
    "orders_count": 1,
    "net_orders": 1
  },
  "data": [
    {
      "date": "2026-03-25",
      "label": "25 Mar",
      "gross_items_sold": 1,
      "items_refunded": 0,
      "net_items_sold": 1,
      "gross_sales": 40,
      "total_refunds": 0,
      "net_sales": 40,
      "orders_count": 1,
      "net_orders": 1
    }
  ]
}

No response description.

Authorizations

  • Authorization string required header

    Generate a store API key from the store's Metorik API settings in Metorik, and choose the scopes needed for the endpoints you want to call.

Path Parameters

  • variation integer required

    The variation ID. Example: 9912

Query Parameters

  • end_date string required

    End date in the store timezone using YYYY-MM-DD format. Example: 2026-02-28

  • group_by string enum

    Time interval for grouping the results. Example: day

  • start_date string required

    Start date in the store timezone using YYYY-MM-DD format. Example: 2026-02-01

Headers

  • Accept string required

    Response format header. Example: application/json

Response

application/json
  • meta object
    + Show Child Attributes
    • resource_link string
  • resource object
    + Show Child Attributes
    • product_id integer
    • title string
    • sku string nullable
    • resource_link string
    • variation object
      + Show Child Attributes
      • variation_id integer
      • name string
      • sku string
  • totals object
    + Show Child Attributes
    • gross_items_sold integer
    • items_refunded integer
    • net_items_sold integer
    • gross_sales integer
    • total_refunds integer
    • net_sales integer
    • orders_count integer
    • net_orders integer
  • data[] object array
    + Show Child Attributes
    • date string
    • label string
    • gross_items_sold integer
    • items_refunded integer
    • net_items_sold integer
    • gross_sales integer
    • total_refunds integer
    • net_sales integer
    • orders_count integer
    • net_orders integer