# Download budgets as JSON

**GET** `https://api.zoined.com/v2/download/budgets?limit=1000&offset=0&year=2018&label=forecast&metric=sales`

Endpoint: GET /v2/download/budgets
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Query parameters:

  - `limit` (number)
    How many entries to return

  - `offset` (number)
    Which offset to return data from

  - `year` (number)
    Returns budgets for given year(s) only

  - `label` (string)
    Returns budgets with given label(s) only

  - `metric` (string)
    Returns budgets for given metric(s) only

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.
**Headers**
- `Content-Type: application/json`

## Response 200 fields (application/json):

  - `year` (number, required)
    Year this budget entry refers to
    Example: 2019

  - `month` (number)
    Month this budget entry refers to. Either month or week must be specified.
    Example: 1

  - `week` (number)
    Week this budget entry refers to. Either month or week must be specified.
    Example: 12

  - `day` (number)
    Optional day this budget entry refers to
    Example: 1

  - `hour` (number)
    Optional hour this budget refers to. Day must be also specified if hour is specified.
    Example: 12

  - `label` (string)
    Label (type) this budget has
    Example: forecast

  - `dimensions` (object, required)
    Key-value pairs of dimensions and values for entry
    Example: {}

  - `metrics` (object, required)
    Key-value pairs of metric values for given time and dimensions
    Example: {}

## Response 400:

  - `400` (unknown)
    Invalid or malformed request.
**Headers**
- `Content-Type: application/json`

## Response 400 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 401:

  - `401` (unknown)
    Missing or invalid authorization token in header
**Headers**
- `Content-Type: application/json`

## Response 401 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Unauthorized

## Response 500:

  - `500` (unknown)
    Internal error or exception
**Headers**
- `Content-Type: application/json`

## Response 500 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 200 examples:

  - `response` (unknown)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 500 examples:

  - `response` (unknown)

