General - Get account postings for multiple employees

API Url

Used for loading daily and/or total account postings

GET
http://localhost:16010/ProMarkREST/rest/General/postings

Permissions: user

Query parameters

FieldTypeDescription
accountIdoptionalString

List of account IDs

empIdString

List of Employee Ids

filteroptionalString

Employee filter fields, values and conditions, in a json format.

fromoptionalDate

Account posting from this Date

periodProfileIdoptionalString

Period profile Id (Used only if from and to dates are not defined)

returnTypeoptionalNumber

Account postings type ( 0 = Get only total postings, 1 = Get only daily postings, 2 = Get both, default is 0).

tooptionalDate

Account posting till this Date

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    dailyPostingsObject[]

Collection of daily account postings.

      accountDescString

Account description

      accountFormatString

Account format ("HH:MM", "HH.CC", ".1", ".2" and so on).

      accountIdString

Account ID

      accountUnitNumber[1-3]

Accounts unit (1: hours, 2: days, 3: pieces).

      dateDate

Accounting post date

      empIdString

Employee ID.

      valueNumber

Posting value

    totalPostingsObject[]

Collection of total account postings.

      accountDescString

Account description

      accountFormatString

Account format ("HH:MM", "HH.CC", ".1", ".2" and so on).

      accountIdString

Account ID

      accountUnitNumber[1-3]

Accounts unit (1: hours, 2: days, 3: pieces).

      empIdString

Employee ID.

      totalNumber

Posting total per employee & account in the given 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": {
"dailyPostings": [
{
"empId": "798",
"date": "2017-05-15",
"accountId": "S002",
"accountDesc": "Shift Allowance AM!",
"unit": 1,
"format": "HH:MM",
"value": 27000
},
{
"empId": "798",
"date": "2017-05-15",
"accountId": "T001",
"accountDesc": "Normal hours",
"unit": 1,
"format": "HH:MM",
"value": 27000
},
{
"empId": "798",
"date": "2017-05-15",
"accountId": "T003",
"accountDesc": "Total Time",
"unit": 1,
"format": "HH:MM",
"value": 27000
},
{
"empId": "798",
"date": "2017-05-18",
"accountId": "S002",
"accountDesc": "Shift Allowance AM!",
"unit": 1,
"format": "HH:MM",
"value": 27000
},
{
"empId": "798",
"date": "2017-05-18",
"accountId": "T001",
"accountDesc": "Normal hours",
"unit": 1,
"format": "HH:MM",
"value": 27000
},
{
"empId": "798",
"date": "2017-05-18",
"accountId": "T003",
"accountDesc": "Total Time",
"unit": 1,
"format": "HH:MM",
"value": 27000
}
],
"totalPostings": [
{
"empId": "798",
"accountId": "S002",
"accountDesc": "Shift Allowance AM!",
"unit": 1,
"format": "HH:MM",
"total": 54000
},
{
"empId": "798",
"accountId": "T001",
"accountDesc": "Normal hours",
"unit": 1,
"format": "HH:MM",
"total": 54000
},
{
"empId": "798",
"accountId": "T003",
"accountDesc": "Total Time",
"unit": 1,
"format": "HH:MM",
"total": 54000
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.