Hold Ctrl-tasten nede (Cmd-tasten på Mac).

Trykk på + for å forstørre eller - for å forminske.

Documentation

POST Membership

Overview

Method

API Endpoint

Description

POST

/api/v{version}/membership

Adds membership data

 

Resource Details

Resource Information

Response Format

JSON

Requires Authentication

Yes

 

Request Headers

 

Name

Required

Description

Example

1

ClubId

Yes

 

 

2

AuthorizationToken

Yes

 

 

 

 

Request Parameters

 

Name

Required

Description

Example

1

PersonId

Optional

If PersonId is known

1234

2

OrgId

Mandatory

NIF’s internal Organization ID for which membership is to be added. (club or branch)

1238

3

OrgType

Mandatory

NIF’s internal type enumeration to define the type of organization

 

4

StartDate

Mandatory

StartDate for Membership

"2019-06-07"

5

FirstName

Optional

Required if PersonId is not provided the system will ignore if PersonId is provided

"Ola"

6

LastName

Optional

Required if PersonId is not provided

The system will ignore if PersonId is provided

"Carter"

7

BirthDate

Optional

Required if PersonId is not provided

The system will ignore if PersonId is provided

"1980-07-05"

8

PostCode

Optional

Required if PersonId is not provided

The system will ignore if PersonId is provided

"879534"

9

Email

Optional

Either of Email or Mobile is Required if PersonId is not provided

The system will ignore if PersonId is provided

"helge.carter@nic.com"

10

MobilePhone

Optional

Either of Email or Mobile is Required if PersonId is not provided

System will ignore if PersonId is provided

"8556974521"

11

GenderId

Optional

Required if PersonId is not provided

System will ignore if PersonId is provided

2

12

SSN

Optional (when PersonId is supplied/Membership is being added for a foreign national)

Required if PersonId is not provided and Person is Norwegian

If provided person has to be Norwegian

The system will ignore if PersonId is provided

"7896-543-88"

13

CountryID

Optional (when PersonId is supplied/Membership is being added for a Norwegian citizen)

Required if PersonId is not provided  will ignore if PersonId is provided

3

17

AddressLIne1

Optional

First line of address

"Blålyngveien 898209 Fauske"

18

AddressLIne2

Optional

Second line of address

"Blålyngveien 898609 Oslo"

19

City

Optional

City of residence

"Oslo"

20

PrivatePhone

Optional

Private phone number

"7855398712"

21

WorkPhone

Optional

Work phone number

"7855398715"

22

IsSecretAddress

Optional

If the address is to be kept secret

1

23

IsSecretPrivatePhone

Optional

If the phone is to be kept secret

1

24

IsSecretWorkPhone

Optional

If the work phone is to be kept secret

1

25

IsSecretMobilePhone

Optional

If the mobile phone is to be kept secret

1

26

IsSecretEmail

Optional

If email is to be kept secret

1

27

IsApprovedPublishing

Optional

 

1

 

Response Codes

 

Code

Text

Description

1

200

Membership added

 

2

1001

Required parameters not passed

Either PersonId or a combination of (FirstName, LastName, BirthDate, PostCode, Email/MobilePhone) must be supplied.

3

1002

Invalid PersonId

 

4

1003

Multiple persons found matching the search criteria

 

5

1004

Either SSN or CountryId must be supplied when PersonId is not supplied

 

6

1005

Invalid SSN supplied

 

7

1006

Invalid Organization Id

 

8

1007

Start date cannot be past date

 

 

Request Example

{

   "personId": 1234987,

   "BranchOrgId": 1238,

   "startDate": "2019-06-07",

   "person": {

                        "firstName": "Helge",

                        "lastName": "Carter",

                        "birthDate": "1980-07-05",

                        "postCode": "879534",

                        "email": "helge.carter@nic.com",

                        "mobilePhone": "8556974521",

                        "genderId": 2,

                        "ssn": "22048956784",

                        "countryId": 3,

                        "citizenshipRegionId1": 34,

                        "addressLine1": "Blålyngveien 898209 Fauske",

                        "addressLine2": "Blålyngveien 898609 Oslo",

                        "city": "Oslo",

                        "privatePhone": "78553987",

                        "workPhone": "78553977",

                        "isSecretAddress": 1,

                        "isSecretWorkPhone": 1,

                        "isSecretMobilePhone": 1,

                        "isSecretEmail": 1,

                        "isApprovedPublishing": 1

            }

}

Response Example

{

   "personId": 1234987,

   "branchFunctionId": 68,

   "clubFunctionId": 89

}