STAT-API

Satisfy a required filter set

A few endpoints require a filter SET, not just any single filter. dfs.slates accepts only operator_id and date TOGETHER. Call it bare and the server returns a 400 ValidationError naming the accepted sets; supply both and it succeeds.

  1. 1. See the 400, then satisfy the set

    The first call omits the required set and is rejected; the second supplies operator_id + date.

    // dfs.slates requires the [operator_id, date] set — a bare call is a 400.
    try {
      await api.dfs.slates.list({ limit: 5 })
      console.log('unexpected: unfiltered slates call succeeded')
    } catch (err) {
      const e = err as { status?: number; body?: { message?: string } }
      console.log(`rejected (${e.status}): ${e.body?.message ?? 'missing required filter set'}`)
    }
    // Supply BOTH members of the set and the call is accepted.
    const slates = (await api.dfs.slates.list({ operator_id: 1, date: '2026-07-02' })).slates
    console.log(`operator 1 ran ${slates.length} slates on 2026-07-02`)