Skip to content

Budgets

Budget end point allows you to upload budgets for individual metrics at the with selected level of granularity.

You can for example send daily budget per store and monthly forecasts per category for sales value.

Upload list of budget entries

Request

POST https://api.zoined.com/budgets/budget?dryRun=false&isoWeeks=true

Security
bearerAuth
Path
typestringrequired

Type for the budget. Currently supported types are budget and forecast.

Example:budget
Query
isoWeeksboolean

For weekly budgets whether to use ISO 8610 weeks or US weeks (default true).

Example:isoWeeks=true
dryRunbooleanrequired

Only validate the request without storing the data

Example:dryRun=false
Bodyapplication/json
Any of:
yearnumberrequired

Year this budget entry refers to

Example:2017
monthnumber

Month this budget entry refers to. Either month or week must be there.

Example:1
weeknumber

Week number this budget entry refers to. Either month or week must be there.

Example:12
daynumber

Optional day this budget entry refers to

Example:1
hournumber

Optional hour this budget refers to. Day must be also specified if hour is specified.

Example:1
dimensionsobjectrequired

Key-value pairs of dimensions and values for entry

metricsobjectrequired

Key-value pairs of metric values for given time and dimensions

curl -i -X POST \
  'https://zapi-api.zoined.com/_mock/budgets/budget?isoWeeks=true&dryRun=false' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "year": 2017,
    "month": 1,
    "week": 12,
    "day": 1,
    "hour": 1,
    "dimensions": {},
    "metrics": {}
  }'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
statusstringrequired

Status of the operation OK / Not OK

Example:"OK"
msgstringrequired

Message describing result of operation

Example:"1 entity added"
Response
{ "status": "OK", "msg": "1 entity added" }