Budgets - Get one budget
API Url
Use it to return a budget
http://localhost:16010/ProMarkREST/web/System/Budgets/{id}/periods
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Path parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Budget id. |
Query parameters
| Field | Type | Description |
|---|---|---|
contextIdoptional | String | Context id |
contextTypeoptional | Number | Context type |
fromoptional | Date | Start date for the budget periods |
tooptional | Date | End date for the budget periods |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| budgetPeriods | Object[] | |
| budgetId | String | The budget ID for which the period is created |
| budgetValue | Number | The budget value. |
| contextId | String | The parent id of the budget. |
| contextType | Number | The parent type of the budget. |
| from | Date | Start date of the new period |
| id | Number | The id of the period |
| periodDays | Object[] | Array with information about the days in the period. |
| actualValue | Number | The actual value for the day. |
| calculatedValue | Number | The calculated value for the day. |
| day | Date | Date of a day in period |
| factor | Number | Factor of the day |
| periodId | Number | The id of the parent period |
| rotationLength | Number | The length of the period. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |