Update an employee

"Alias" of Course User. Updates employee using PUT.

Request

PUT https://www.kursguiden.no/api/v2/customers/:id/employees/:id

For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.

Parameters

Name Required Value Description
firstname required string Firstname
lastname required string Lastname
email required string E-mail
gender optional string Default is null
  • Male = Male
  • Female = Female
phone optional string Phone
date_of_birth optional string Format: yyyy-mm-dd
nationality optional string Default is NO
  • AF = Afghanistan
  • AL = Albania
  • DZ = Algeria
  • AS = American Samoa
  • AD = Andorra
  • AO = Angola
  • AI = Anguilla
  • AG = Antigua and Barbuda
  • AR = Argentina
  • AM = Armenia
  • AW = Aruba
  • AU = Australia
  • AT = Austria
  • AZ = Azerbaijan
  • BS = Bahamas, The
  • BH = Bahrain
  • BD = Bangladesh
  • BB = Barbados
  • BY = Belarus
  • BE = Belgium
  • BZ = Belize
  • BJ = Benin
  • BM = Bermuda
  • BT = Bhutan
  • BO = Bolivia
  • BA = Bosnia and Herzegovina
  • BW = Botswana
  • BR = Brazil
  • VG = British Virgin Islands
  • BN = Brunei
  • BG = Bulgaria
  • BF = Burkina Faso
  • BI = Burundi
  • KH = Cambodia
  • CM = Cameroon
  • CA = Canada
  • CV = Cape Verde
  • KY = Cayman Islands
  • CF = Central African Republic
  • TD = Chad
  • CL = Chile
  • CN = China
  • CX = Christmas Island
  • CC = Cocos (Keeling) Islands
  • CO = Colombia
  • KM = Comoros
  • CG = Congo
  • CD = Congo, DR
  • CK = Cook Islands
  • CR = Costa Rica
  • HR = Croatia
  • CU = Cuba
  • CW = Curaçao
  • CY = Cyprus
  • CZ = Czech Republic
  • CI = Côte d'Ivoire
  • DK = Denmark
  • DJ = Djibouti
  • DM = Dominica
  • DO = Dominican Republic
  • TL = East Timor
  • EC = Ecuador
  • EG = Egypt
  • SV = El Salvador
  • GQ = Equatorial Guinea
  • ER = Eritrea
  • EE = Estonia
  • ET = Ethiopia
  • FK = Falkland Islands (Islas Malvinas)
  • FO = Faroe Islands
  • FM = Federated States of Micronesia
  • FJ = Fiji
  • FI = Finland
  • FR = France
  • GF = French Guiana
  • PF = French Polynesia
  • GA = Gabon
  • GM = Gambia
  • GE = Georgia
  • DE = Germany
  • GH = Ghana
  • GI = Gibraltar
  • GR = Greece
  • GL = Greenland
  • GD = Grenada
  • GP = Guadeloupe (Fr.)
  • GU = Guam
  • GT = Guatemala
  • GG = Guernsey
  • GN = Guinea
  • GW = Guinea-Bissau
  • GY = Guyana
  • HT = Haiti
  • HN = Honduras
  • HK = Hong Kong
  • HU = Hungary
  • IS = Iceland
  • IN = India
  • ID = Indonesia
  • IR = Iran
  • IQ = Iraq
  • IE = Ireland
  • IM = Isle of Man
  • IL = Israel
  • IT = Italy
  • JM = Jamaica
  • JP = Japan
  • JE = Jersey
  • JO = Jordan
  • KZ = Kazakhstan
  • KE = Kenya
  • KI = Kiribati
  • XK = Kosovo
  • KW = Kuwait
  • KG = Kyrgyzstan
  • LA = Laos
  • LV = Latvia
  • LB = Lebanon
  • LS = Lesotho
  • LR = Liberia
  • LY = Libya
  • LI = Liechtenstein
  • LT = Lithuania
  • LU = Luxembourg
  • MO = Macau
  • MK = Macedonia
  • MG = Madagascar
  • MW = Malawi
  • MY = Malaysia
  • MV = Maldives
  • ML = Mali
  • MT = Malta
  • MH = Marshall Islands
  • MQ = Martinique (Fr.)
  • MR = Mauritania
  • MU = Mauritius
  • MX = Mexico
  • MD = Moldova
  • MC = Monaco
  • MN = Mongolia
  • ME = Montenegro
  • MS = Montserrat
  • MA = Morocco
  • MZ = Mozambique
  • MM = Myanmar
  • NA = Namibia
  • NR = Nauru
  • NP = Nepal
  • NL = Netherlands
  • AN = Netherlands Antilles
  • NC = New Caledonia
  • NZ = New Zealand
  • NI = Nicaragua
  • NE = Niger
  • NG = Nigeria
  • NU = Niue
  • NF = Norfolk Island
  • MP = Northern Mariana Islands
  • KP = North Korea
  • NO = Norway
  • OM = Oman
  • PK = Pakistan
  • PW = Palau
  • PS = Palestinian Territories
  • PA = Panama
  • PG = Papua New Guinea
  • PY = Paraguay
  • PE = Peru
  • PH = Philippines
  • PN = Pitcairn Islands
  • PL = Poland
  • PT = Portugal
  • PR = Puerto Rico
  • QA = Qatar
  • RE = Reunion (Fr.)
  • RO = Romania
  • RU = Russia
  • RW = Rwanda
  • SH = Saint Helena
  • KN = Saint Kitts and Nevis
  • LC = Saint Lucia
  • VC = Saint Vincent and the Grenadines
  • WS = Samoa
  • SM = San Marino
  • ST = Sao Tome and Principe
  • SA = Saudi Arabia
  • SN = Senegal
  • RS = Serbia
  • SC = Seychelles
  • SL = Sierra Leone
  • SG = Singapore
  • SX = Sint Maarten
  • SK = Slovakia
  • SI = Slovenia
  • SB = Solomon Islands
  • SO = Somalia
  • ZA = South Africa
  • GS = South Georgia and the South Sandwich Islands
  • KR = South Korea
  • SS = South Sudan
  • ES = Spain
  • LK = Sri Lanka
  • SD = Sudan
  • SR = Suriname
  • SZ = Swaziland
  • SE = Sweden
  • CH = Switzerland
  • SY = Syria
  • TW = Taiwan
  • TJ = Tajikistan
  • TZ = Tanzania
  • TH = Thailand
  • TG = Togo
  • TK = Tokelau
  • TO = Tonga
  • TT = Trinidad and Tobago
  • TN = Tunisia
  • TR = Turkey
  • TM = Turkmenistan
  • TC = Turks and Caicos Islands
  • TV = Tuvalu
  • UG = Uganda
  • UA = Ukraine
  • AE = United Arab Emirates
  • GB = United Kingdom
  • UY = Uruguay
  • US = USA
  • UZ = Uzbekistan
  • VU = Vanuatu
  • VA = Vatican City
  • VE = Venezuela
  • VN = Vietnam
  • VI = Virgin Islands
  • EH = Western Sahara
  • YE = Yemen
  • ZM = Zambia
  • ZW = Zimbabwe
national_identification_number optional string National identification number
position optional string Position
company_employee_number optional string company_employee_number
home_address_1 optional string Home address, line 1
home_address_2 optional string Home address, line 2
home_address_3 optional string Home address, line 3
home_zipcode optional string Home address, zipcode
home_city optional string Home address, city
home_country optional string Default is NO
  • AF = Afghanistan
  • AL = Albania
  • DZ = Algeria
  • AS = American Samoa
  • AD = Andorra
  • AO = Angola
  • AI = Anguilla
  • AG = Antigua and Barbuda
  • AR = Argentina
  • AM = Armenia
  • AW = Aruba
  • AU = Australia
  • AT = Austria
  • AZ = Azerbaijan
  • BS = Bahamas, The
  • BH = Bahrain
  • BD = Bangladesh
  • BB = Barbados
  • BY = Belarus
  • BE = Belgium
  • BZ = Belize
  • BJ = Benin
  • BM = Bermuda
  • BT = Bhutan
  • BO = Bolivia
  • BA = Bosnia and Herzegovina
  • BW = Botswana
  • BR = Brazil
  • VG = British Virgin Islands
  • BN = Brunei
  • BG = Bulgaria
  • BF = Burkina Faso
  • BI = Burundi
  • KH = Cambodia
  • CM = Cameroon
  • CA = Canada
  • CV = Cape Verde
  • KY = Cayman Islands
  • CF = Central African Republic
  • TD = Chad
  • CL = Chile
  • CN = China
  • CX = Christmas Island
  • CC = Cocos (Keeling) Islands
  • CO = Colombia
  • KM = Comoros
  • CG = Congo
  • CD = Congo, DR
  • CK = Cook Islands
  • CR = Costa Rica
  • HR = Croatia
  • CU = Cuba
  • CW = Curaçao
  • CY = Cyprus
  • CZ = Czech Republic
  • CI = Côte d'Ivoire
  • DK = Denmark
  • DJ = Djibouti
  • DM = Dominica
  • DO = Dominican Republic
  • TL = East Timor
  • EC = Ecuador
  • EG = Egypt
  • SV = El Salvador
  • GQ = Equatorial Guinea
  • ER = Eritrea
  • EE = Estonia
  • ET = Ethiopia
  • FK = Falkland Islands (Islas Malvinas)
  • FO = Faroe Islands
  • FM = Federated States of Micronesia
  • FJ = Fiji
  • FI = Finland
  • FR = France
  • GF = French Guiana
  • PF = French Polynesia
  • GA = Gabon
  • GM = Gambia
  • GE = Georgia
  • DE = Germany
  • GH = Ghana
  • GI = Gibraltar
  • GR = Greece
  • GL = Greenland
  • GD = Grenada
  • GP = Guadeloupe (Fr.)
  • GU = Guam
  • GT = Guatemala
  • GG = Guernsey
  • GN = Guinea
  • GW = Guinea-Bissau
  • GY = Guyana
  • HT = Haiti
  • HN = Honduras
  • HK = Hong Kong
  • HU = Hungary
  • IS = Iceland
  • IN = India
  • ID = Indonesia
  • IR = Iran
  • IQ = Iraq
  • IE = Ireland
  • IM = Isle of Man
  • IL = Israel
  • IT = Italy
  • JM = Jamaica
  • JP = Japan
  • JE = Jersey
  • JO = Jordan
  • KZ = Kazakhstan
  • KE = Kenya
  • KI = Kiribati
  • XK = Kosovo
  • KW = Kuwait
  • KG = Kyrgyzstan
  • LA = Laos
  • LV = Latvia
  • LB = Lebanon
  • LS = Lesotho
  • LR = Liberia
  • LY = Libya
  • LI = Liechtenstein
  • LT = Lithuania
  • LU = Luxembourg
  • MO = Macau
  • MK = Macedonia
  • MG = Madagascar
  • MW = Malawi
  • MY = Malaysia
  • MV = Maldives
  • ML = Mali
  • MT = Malta
  • MH = Marshall Islands
  • MQ = Martinique (Fr.)
  • MR = Mauritania
  • MU = Mauritius
  • MX = Mexico
  • MD = Moldova
  • MC = Monaco
  • MN = Mongolia
  • ME = Montenegro
  • MS = Montserrat
  • MA = Morocco
  • MZ = Mozambique
  • MM = Myanmar
  • NA = Namibia
  • NR = Nauru
  • NP = Nepal
  • NL = Netherlands
  • AN = Netherlands Antilles
  • NC = New Caledonia
  • NZ = New Zealand
  • NI = Nicaragua
  • NE = Niger
  • NG = Nigeria
  • NU = Niue
  • NF = Norfolk Island
  • MP = Northern Mariana Islands
  • KP = North Korea
  • NO = Norway
  • OM = Oman
  • PK = Pakistan
  • PW = Palau
  • PS = Palestinian Territories
  • PA = Panama
  • PG = Papua New Guinea
  • PY = Paraguay
  • PE = Peru
  • PH = Philippines
  • PN = Pitcairn Islands
  • PL = Poland
  • PT = Portugal
  • PR = Puerto Rico
  • QA = Qatar
  • RE = Reunion (Fr.)
  • RO = Romania
  • RU = Russia
  • RW = Rwanda
  • SH = Saint Helena
  • KN = Saint Kitts and Nevis
  • LC = Saint Lucia
  • VC = Saint Vincent and the Grenadines
  • WS = Samoa
  • SM = San Marino
  • ST = Sao Tome and Principe
  • SA = Saudi Arabia
  • SN = Senegal
  • RS = Serbia
  • SC = Seychelles
  • SL = Sierra Leone
  • SG = Singapore
  • SX = Sint Maarten
  • SK = Slovakia
  • SI = Slovenia
  • SB = Solomon Islands
  • SO = Somalia
  • ZA = South Africa
  • GS = South Georgia and the South Sandwich Islands
  • KR = South Korea
  • SS = South Sudan
  • ES = Spain
  • LK = Sri Lanka
  • SD = Sudan
  • SR = Suriname
  • SZ = Swaziland
  • SE = Sweden
  • CH = Switzerland
  • SY = Syria
  • TW = Taiwan
  • TJ = Tajikistan
  • TZ = Tanzania
  • TH = Thailand
  • TG = Togo
  • TK = Tokelau
  • TO = Tonga
  • TT = Trinidad and Tobago
  • TN = Tunisia
  • TR = Turkey
  • TM = Turkmenistan
  • TC = Turks and Caicos Islands
  • TV = Tuvalu
  • UG = Uganda
  • UA = Ukraine
  • AE = United Arab Emirates
  • GB = United Kingdom
  • UY = Uruguay
  • US = USA
  • UZ = Uzbekistan
  • VU = Vanuatu
  • VA = Vatican City
  • VE = Venezuela
  • VN = Vietnam
  • VI = Virgin Islands
  • EH = Western Sahara
  • YE = Yemen
  • ZM = Zambia
  • ZW = Zimbabwe
work_address_1 optional string Work address, line 1
work_address_2 optional string Work address, line 2
work_address_3 optional string Work address, line 3
work_zipcode optional string Work address, zipcode
work_city optional string Work address, city
invoice_address_1 optional string Invoice address, line 1
invoice_address_2 optional string Invoice address, line 2
invoice_address_3 optional string Invoice address, line 3
invoice_zipcode optional string Invoice address, zipcode
invoice_city optional string Invoice address, city
email_invoice optional string E-mail for invoices
external_id optional string External ID
status optional integer Default is 1 ("Employed")
  • 1 = Employed
  • 2 = Notice period
  • 3 = Leave of absence
  • 4 = Former employee

Example code in PHP

$post_params = array();
$post_params['firstname'] = 'Hanne';
$post_params['lastname'] = 'Hansen';
$post_params['email'] = 'hannee.hansen@example.com';
$post_params['phone'] = '1';
$post_params['gender'] = 'Male';
$post_params['status'] = '1';
$post_params['date_of_birth'] = '2012-08-18';
$post_params['nationality'] = 'NO';
$post_params['home_country'] = 'NO';
$request_url = 'https://www.kursguiden.no/api/v2/customers/:id/employees/:id';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_params));

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'X-API-Key: {your-api-key}',
  'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

{
    "employee_id": 289345
}

Unsuccessful response sample:

{
    "error": "Wrong API Key"
}      
© 2024 FrontCore