Budgets - Get one budget

API Url

Use it to return a budget

GET
http://localhost:16010/ProMarkREST/web/System/Budgets/{id}/periods

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Path parameters

FieldTypeDescription
idNumber

Budget id.

Query parameters

FieldTypeDescription
contextIdoptionalString

Context id

contextTypeoptionalNumber

Context type 1: Department 2: Group 3: Approval group

fromoptionalDate

Start date for the budget periods

tooptionalDate

End date for the budget periods

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

    budgetPeriodsObject[]
      budgetIdString

The budget ID for which the period is created

      budgetValueNumber

The budget value.

      contextIdString

The parent id of the budget.

      contextTypeNumber

The parent type of the budget. 1: Department 2: Group 3: Approval group

      fromDate

Start date of the new period

      idNumber

The id of the period

      periodDaysObject[]

Array with information about the days in the period.

        actualValueNumber

The actual value for the day.

        calculatedValueNumber

The calculated value for the day.

        dayDate

Date of a day in period

        factorNumber

Factor of the day

        periodIdNumber

The id of the parent period

      rotationLengthNumber

The length of the period.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"dsBudgetPeriod": {
"budgetPeriods": [
{
"budgetId": "Budget1",
"id": 2164714649,
"from": "2020-05-21",
"rotationLength": 7,
"budgetValue": 2000.0,
"contextType": 1,
"contextId": "AMT",
"periodDays": [
{
"periodId": 2164714649,
"day": "2020-05-21",
"factor": 1.0,
"calculatedValue": 200.0
},
{
"periodId": 2164714649,
"day": "2020-05-22",
"factor": 1.0,
"calculatedValue": 200.0
},
{
"periodId": 2164714649,
"day": "2020-05-23",
"factor": 1.0,
"calculatedValue": 200.0
},
{
"periodId": 2164714649,
"day": "2020-05-24",
"factor": 1.0,
"calculatedValue": 200.0
}
]
}
]
}
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.