General - Get one account

API Url

Load a singe account by id.

GET
http://localhost:16010/ProMarkREST/rest/General/accounts/{id}

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
idString

Unique account identifier.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    accountsObject[]

Collection of accounts.

      descriptionString

Account description.

      formatString

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

      idString

Unique account id.

      unitNumber[1-3]

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

  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": {
"accounts": [
{
"id": "N001",
"description": "Normal time",
"unit": 1,
"format": "HH:MM"
},
{
"id": "H001",
"description": "Holiday taken",
"unit": 2,
"format": ".2"
}
]
}
},
"errorCode": 0,
"errorMessage": ""
}