Reports

Advertising costs by date

Returns advertising cost totals over time, including a breakdown for each
advertising method recorded in the selected date range. Responses are capped at
1500 time periods.

The meta.methods object maps each stable method ID used in totals.methods
and data[].methods to its display name.

GET /api/v1/store/reports/advertising-costs-by-date

Advertising costs by date

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/reports/advertising-costs-by-date' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "meta": {
    "report_link": "https://app.metorik.com/reports/profit#advertising-costs-by-date",
    "results_limited": false,
    "methods": {
      "google": "google",
      "facebook-123": "Facebook: Main Account"
    }
  },
  "totals": {
    "total": 4580.11,
    "methods": {
      "google": 3200,
      "facebook-123": 1380.11
    }
  },
  "data": [
    {
      "date": "2026-03-01",
      "total": 142.8,
      "methods": {
        "google": 100,
        "facebook-123": 42.8
      }
    }
  ]
}

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.

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
    • report_link string
    • results_limited boolean
    • methods object
      + Show Child Attributes
      • google string
      • facebook-123 string
  • totals object
    + Show Child Attributes
    • total number
    • methods object
      + Show Child Attributes
      • google integer
      • facebook-123 number
  • data[] object array
    + Show Child Attributes
    • date string
    • total number
    • methods object
      + Show Child Attributes
      • google integer
      • facebook-123 number