Personnel tickets
Import via CSV Fetching reports of savings
The personnel ticket system ("pbsys") is used to
- administer employees in the companies ("companies") involved in the personnel ticket agreement.
- calculate whether an employee is entitled to a personnel ticket and
- create the necessary ticket rights in the internal Entur systems for the users.
It has an API that is primarily used for internal users, but some endpoints are relevant for the companies. Specifically, at this time we expose endpoints for importing employees to support tax reporting.
CSV import
For those companies not yet prepared to connect directly to the REST api, we've created an option for CSV imports. Please see the following section for more information of the format.
Example of a valid csv file containing three employees is available here: Example csv.
The corresponding Excel file is here: Example xlsx
CSV import format
field name | notes | default value |
---|---|---|
employeeNo | Your internal employee number for this employee. | - |
companyId | Your company id in the pbsys system. This is not the same as your partner id. | - |
employmentTypeId | The type of employment. See Employment Types below. | - |
dateOfBirth | In format "yyyy-MM-dd": "1974-11-23" | - |
ssn | 5-digit ssn | - |
firstName | First name of employee | - |
surname | Surname of employee | - |
addressLine | Street address of employee | - |
postalCode | Postal code of employee | - |
abstainFromTicket | Whether this employee has opted out. Valid values are true and false | false |
hireStartDate | Date of hire. Format "yyyy-MM-dd", "1974-11-23" | - |
payType | The pay category. See Pay types below. | - |
hireEndDate | The day the employee no longer works for the company. Format as hireStartDate. | "" |
hireEndCause | The reason for end of hire. See End causes below. | "" |
disabilityGrade | The percent disability. This information is treated as sensitive personal data in our systems. A number from 0 to 100. | 0 |
disabilityFromDate | The day the disability is valid for personnel ticket purposes. Required if disabilityGrade > 0 | "" |
employmentPercentage | The degree of employment for this employee. A number from 0 to 100. | - |
employmentPercentageDate | The date the above employment percentage is valid for personnel ticket calculations. Format as hireDate. | "" |
paidPercentage | The percentage of pay this employee earns. This is optional, but in some cases must be supplied if it's different than the employmentPercentage. | |
leaveFromDate | If an employee is on leave, it may influence the personnel ticket calculations. Format as hireStartDate. | "" |
isDeleted | Whether this employee should be considered deleted in the pbsys system. Deleted employees are not issued new tickets and current tickets are withdrawn. Valid values are true or false. | false |
Note: Default = "-" means it is a required field.
Employment Types
These are the valid EmploymentTypes:
Id | Norwegian notes |
---|---|
F | Fast ansatt i stilling |
M | Midlertidig tilsatt i stilling |
T | Tilkallingsvikar/sesong |
U | Ukjent tjenesteforhold |
Categories
The categories field currently accepts these values:
code | value |
---|---|
1 | bronze ticket |
2 | silver ticket |
Pay types
Id | norwegian notes |
---|---|
1 | Ukjent |
A | Aktiv stilling |
D | Delvis omsorgspermisjon |
E | Red. arbeidstid etter AML 46A |
F | Fødselspermisjon |
L | Lånt ut til annen enhet |
M | Perm. for militær/siviltj |
N | Perm. for annen stilling i NSB |
O | Omsorgspermisjon uten lønn |
P | Militær/siviltj. uten lønn |
R | Studiepermisjon uten lønn |
S | Studiepermisjon m/lønn |
T | Tjenestegj. i høyere stilling |
U | Permisjon m/uførepensjon |
V | Delvis uførepermisjon |
W | Delvis overgang til AFP |
X | Permisjon, annet u/lønn |
End causes
code | Norwegian notes |
---|---|
A | Overg. alderspensj. (kode 341) |
B | Slutt v/overg til AS (kode 350) |
D | Dødsfall (aksjonskode 320) |
E | Egen oppsigelse (kode 310+330) |
F | Overg. AFP/FTP (kode 349) |
I | Oppsagt v/innskr. (kode 352) |
M | Mangler årsaksangivelse |
O | Slutt l/opplæring (kode 353) |
S | Særaldersgrense (kode 345) |
T | Dødsfall, tj.ulykke (kode 321) |
U | Uførepensj./Opps. v/sykd. (kode 361) |
V | Slutt 6 mnd lønn (kode 354) |
X | Slutt annen årsak (kode 350) |
Y | Ventelønn 30 års tjeneste |
Z | Avskjed (kode 351) |
Reports
A major reason for the personnel ticket system is tracking the travels for tax purposes.
We've exposed a single endpoint for fetching this report, detailed in the API documentation. If the report is not yet made, it will return 404. To start generating report and get generation progress call the same uri with POST, see Api documentation
The contents are on this format, a comma-separated CSV with these fields:
companyId,employeeNo,ssn,saving,fromDate,toDate,employeeStatus
3,1234,14104512345,230.00,2020-02-01,2020-02-29,P
3,1233,23047854321,1102.00,2020-02-01,2020-02-29,A
Where the fields have this meaning:
Field | Format | Meaning | Comment |
---|---|---|---|
companyId | int | Internal ID of the company in question. See list below. | This is useful for those clients with access to multiple companies. |
employeeNo | string | Employee Number for this row as supplied by the company | Note: This may not be correct. Some companies reuse employee numbers when an employee retires, and in that case, the administration may have assigned a unique number or 0 here for those pensioners. This may be negative in those cases. |
ssn | string (11 digits) | Social security number for the employee | Some pensioners are registered without full social security number. In those cases, the format is birthdate (ddMMyy) + "00000". |
saving | string (xxxxx.xx) | Savings for the given month | Any refunds have been subtracted, so this may occasionally become negative for a month. |
fromDate | ISO string (yyyy-MM-dd) | first date in report, inclusive | |
toDate | ISO string (yyyy-MM-dd) | last date in report, inclusive | |
employeeStatus | One character, "P", "A" or "E" | Active employee, Pensioner or bereaved (Etterlatt) | This is determined based on whether we have a registered termination code |
Companies
This is the list of company ids used for both import and export:
Company name | Companyid |
---|---|
BaneNOR | 4 |
BaneService | 29 |
CargoNet | 16 |
Entur | 40 |
Flytoget | 1 |
Gjøvikbanen | 31 |
Go-Ahead Norge | 45 |
Jernbaneforbundet | 10 |
Mantena | 18 |
Lokførerskolen | 27 |
Norske Tog | 41 |
SJ Norge | 46 |
Spordrift | 43 |
Agilia | 14 |
Vy Ansatte | 3 |