Skip to content

Query data as JSON

Request

POST https://api.zoined.com/v2/query/table

Retrieve tabular data in JSON format (flat array with one element per group).

Security
bearerAuth
Bodyapplication/json
contextobject

Context for the queries

Example:
{ "locale": "en", "currency": "EUR" }
queryobject

Query parameters

Example:
{ "grouping": [ "day", "store" ], "metrics": [ "sales", "sales_margin" ], "filters": {}, "seriesType": "actual", "sort": [ "day" ], "limit": 1000, "offset": 0, "label": "forecast", "fillTimeSeries": true }
curl -i -X POST \
  https://zapi-api.zoined.com/_mock/v2/query/table \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "context": {
      "locale": "en",
      "currency": "EUR"
    },
    "query": {
      "grouping": [
        "day",
        "store"
      ],
      "metrics": [
        "sales",
        "sales_margin"
      ],
      "filters": {},
      "seriesType": "actual",
      "sort": [
        "day"
      ],
      "limit": 1000,
      "offset": 0,
      "label": "forecast",
      "fillTimeSeries": true
    }
  }'

Responses

Request has been processed successfully.

Headers
X-Zoined-Total-Itemsstring
Example:"30"
X-Zoined-Limitstring
Example:"1000"
X-Zoined-Offsetstring
Example:"0"
Bodyapplication/json
Array [
dimensionsobject

All dimensions from grouping list

metricsobject

Aggregated metric values for set of dimensions

sortobject

List of items (dimension and metrics from above) to be used for sorting

]
Response
[ { "dimensions": { … }, "metrics": { … }, "sort": { … } } ]