Ventia
Goals

List goals

GET
/goals

Lists the sales goals of your users, newest period first. Requires the goals:read scope.

Metric values of goals whose period has started are recomputed on every read, so they reflect progress up to now.

To get the goals whose period overlaps a date range, send lteStart with the end of the range and gteEnd with its start.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key sent as Authorization: Bearer <API_KEY>.

Query Parameters

page?integer

Page number (1-indexed). Defaults to 1.

Range1 <= value
Default1
limit?integer

Page size. Defaults to 10, maximum 50.

Range1 <= value <= 50
Default10
user?string

Only records of these user ids, separated by commas (any matches).

group?string

Only records of users in this group or any of its sub-groups.

periodType?string

One or more period types, separated by commas.

origin?string

One or more origins (manual, import, auto), separated by commas.

active?boolean

Only active (true) or inactive (false) goals.

reached?boolean

Only goals with every target reached (true) or not (false).

activeAt?string

Only goals whose period contains this date.

Formatdate-time
gteStart?string

Period starts on or after this date. Also supports gt, lt, lte and the end / createdAt fields (e.g. lteEnd, gteCreatedAt).

Formatdate-time
lteStart?string

Period starts on or before this date.

Formatdate-time
gteEnd?string

Period ends on or after this date.

Formatdate-time
sort?string

Sort field, prefixed with + or -. Defaults to -start.

Value in"+start""-start""+end""-end""+createdAt""-createdAt"

Response Body

OK

application/json; charset=utf-8
  1. response
[index: integer]?
curl -X GET 'https://api.getventia.com/api/v1.0/goals?page=1&limit=10&user=6234da84259c59d9a555c498&group=609b3cff61ffd5f1e446d234&periodType=monthly%2Cquarterly&origin=manual&active=true&reached=false&activeAt=2026-05-15T12%3A00%3A00.000Z&gteStart=2026-05-01T00%3A00%3A00.000Z&lteStart=2026-05-31T23%3A59%3A59.999Z&gteEnd=2026-05-01T00%3A00%3A00.000Z&sort=-start'
[  {    "_id": "6650f1c1ff61ffd5f1e44700",    "company": "609b3cff61ffd5f1e446d234",    "user": {      "_id": "6234da84259c59d9a555c498",      "name": "Ana",      "lastname": "Pérez",      "email": "ana@example.com"    },    "title": "Meta mayo",    "description": "Meta mensual del equipo comercial",    "periodType": "monthly",    "origin": "manual",    "active": true,    "start": "2026-05-01T03:00:00.000Z",    "end": "2026-06-01T02:59:59.999Z",    "timezone": "America/Montevideo",    "prize": "Bono de USD 200",    "metrics": [      {        "code": "sale",        "target": 10,        "value": 7,        "tiers": [          {            "target": 15,            "prize": "Bono de USD 400"          }        ]      },      {        "code": "tracing",        "target": 200,        "value": 184      }    ],    "notificationsStatus": {      "reached": false    },    "createdAt": "2026-04-28T14:00:00.000Z",    "updatedAt": "2026-05-24T18:21:01.000Z"  }]