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 namenotesdefault value
employeeNoYour internal employee number for this employee.-
companyIdYour company id in the pbsys system. This is not the same as your partner id.-
employmentTypeIdThe type of employment. See Employment Types below.-
dateOfBirthIn format "yyyy-MM-dd": "1974-11-23"-
ssn5-digit ssn-
firstNameFirst name of employee-
surnameSurname of employee-
addressLineStreet address of employee-
postalCodePostal code of employee-
abstainFromTicketWhether this employee has opted out. Valid values are true and falsefalse
hireStartDateDate of hire. Format "yyyy-MM-dd", "1974-11-23"-
payTypeThe pay category. See Pay types below.-
hireEndDateThe day the employee no longer works for the company. Format as hireStartDate.""
hireEndCauseThe reason for end of hire. See End causes below.""
disabilityGradeThe percent disability. This information is treated as sensitive personal data in our systems. A number from 0 to 100.0
disabilityFromDateThe day the disability is valid for personnel ticket purposes. Required if disabilityGrade > 0""
employmentPercentageThe degree of employment for this employee. A number from 0 to 100.-
employmentPercentageDateThe date the above employment percentage is valid for personnel ticket calculations. Format as hireDate.""
paidPercentageThe percentage of pay this employee earns. This is optional, but in some cases must be supplied if it's different than the employmentPercentage.
leaveFromDateIf an employee is on leave, it may influence the personnel ticket calculations. Format as hireStartDate.""
isDeletedWhether 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:

IdNorwegian 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:

codevalue
1bronze ticket
2silver ticket

Pay types

Idnorwegian 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

codeNorwegian 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:

FieldFormatMeaningComment
companyIdintInternal ID of the company in question. See list below.This is useful for those clients with access to multiple companies.
employeeNostringEmployee Number for this row as supplied by the companyNote: 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.
ssnstring (11 digits)Social security number for the employeeSome pensioners are registered without full social security number. In those cases, the format is birthdate (ddMMyy) + "00000".
savingstring (xxxxx.xx)Savings for the given monthAny refunds have been subtracted, so this may occasionally become negative for a month.
fromDateISO string (yyyy-MM-dd)first date in report, inclusive
toDateISO string (yyyy-MM-dd)last date in report, inclusive
employeeStatusOne 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 nameCompanyid
BaneNOR4
BaneService29
CargoNet16
Entur40
Flytoget1
Gjøvikbanen31
Go-Ahead Norge45
Jernbaneforbundet10
Mantena18
Lokførerskolen27
Norske Tog41
SJ Norge46
Spordrift43
Agilia14
Vy Ansatte3