POST api/loyalty2/member

Creates and provides member. Give member in body. If the given member has a CustomerNumber assigned, this number will be used.

Request Information

URI Parameters

None.

Body Parameters

The member to create.

MemberInsertModel
NameDescriptionTypeAdditional information
CustomerNumber

The customer number of the member. Must be UNIQUE within a club (if passed-in)! If this number is zero on creation of a member, the system will auto-generate the "next free number" within club. If a number is provided and unique, the system will take the provided one.

integer

Range: inclusive between 0 and 9,22337203685478E+18

CreationShop

Shop of creation

string

Max length: 30

User

User name. Must be UNIQUE within a club.

string

Max length: 100

Password

Password

string

Max length: 100

ClubId

The ID of the club.

integer

Required

Range: inclusive between 1 and 2147483647

EngineId

The ID of the Loyalty engine, to which the member shall be assigned. See "...api/loyalty2/engine/club/engines" for fetching all engines of a club. Also see "...Help/ResourceModel?modelName=EngineTypeIdentifier" to understand the type identifiers of engines.

integer

Required

Range: inclusive between 1 and 2147483647

FirstName

First name

string

Max length: 450

LastName

Last name

string

Max length: 450

Address

Address

string

Max length: 500

PostalCode

Postal code

string

Max length: 50

City

City

string

Max length: 500

Country

Country

string

Max length: 500

Gender

Gender

string

Max length: 1

Valid values: "M","F",null

BirthDate

Date of birth. Date-only / no UTC.

date

None.

Email

Email

string

Max length: 200

Phone

Phone number

string

Max length: 50

ReceiptByEmail

0 = Receive nothing 1 = Receive by both email and mobile 2 = Receive by email only 3 = Receive by mobile only

integer

None.

Notes

Additional notes

string

Max length: -1

IsActive

(Not)active identifier

boolean

Range: inclusive between false and true

Created

The creation date and time of the member in Coordinated Universal Time (UTC) Set by the system, if left empty.

date

None.

SignedUp

The sign-up date and time of the member in Coordinated Universal Time (UTC)

date

None.

DefaultShop

Default store

integer

None.

SocialSecurityNr

Social and serurity number

string

None.

TermsConditionsApproved

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerNumber": 1,
  "CreationShop": "sample string 2",
  "User": "sample string 3",
  "Password": "sample string 4",
  "ClubId": 5,
  "EngineId": 6,
  "FirstName": "sample string 7",
  "LastName": "sample string 8",
  "Address": "sample string 9",
  "PostalCode": "sample string 10",
  "City": "sample string 11",
  "Country": "sample string 12",
  "Gender": "sample string 13",
  "BirthDate": "2025-05-04T05:41:11.0598371+02:00",
  "Email": "sample string 14",
  "Phone": "sample string 15",
  "ReceiptByEmail": 16,
  "Notes": "sample string 17",
  "IsActive": true,
  "Created": "2025-05-04T05:41:11.0598371+02:00",
  "SignedUp": "2025-05-04T05:41:11.0598371+02:00",
  "DefaultShop": 1,
  "SocialSecurityNr": "sample string 18",
  "TermsConditionsApproved": true
}

application/xml, text/xml

Sample:
<MemberInsertModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PublicAPI.Models">
  <Address>sample string 9</Address>
  <BirthDate>2025-05-04T05:41:11.0598371+02:00</BirthDate>
  <City>sample string 11</City>
  <ClubId>5</ClubId>
  <Country>sample string 12</Country>
  <Created>2025-05-04T05:41:11.0598371+02:00</Created>
  <DefaultShop>1</DefaultShop>
  <Email>sample string 14</Email>
  <EngineId>6</EngineId>
  <FirstName>sample string 7</FirstName>
  <Gender>sample string 13</Gender>
  <IsActive>true</IsActive>
  <LastName>sample string 8</LastName>
  <Notes>sample string 17</Notes>
  <Phone>sample string 15</Phone>
  <PostalCode>sample string 10</PostalCode>
  <ReceiptByEmail>16</ReceiptByEmail>
  <SignedUp>2025-05-04T05:41:11.0598371+02:00</SignedUp>
  <SocialSecurityNr>sample string 18</SocialSecurityNr>
  <TermsConditionsApproved>true</TermsConditionsApproved>
  <CreationShop>sample string 2</CreationShop>
  <CustomerNumber>1</CustomerNumber>
  <Password>sample string 4</Password>
  <User>sample string 3</User>
</MemberInsertModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'MemberInsertModel'.

Response Information

Resource Description

Member
NameDescriptionTypeAdditional information
Id

Id for this loyalty member

integer

None.

CustomerNumber

The customer number of the member.

integer

None.

CreationShop

Shop of creation

string

Max length: 30

User

User name

string

None.

Password

Password

string

None.

Modified

The date and time of the last change to the member in Coordinated Universal Time (UTC)

date

None.

IsDeleted

boolean

None.

ClubId

The ID of the club.

integer

Required

Range: inclusive between 1 and 2147483647

EngineId

The ID of the Loyalty engine, to which the member shall be assigned. See "...api/loyalty2/engine/club/engines" for fetching all engines of a club. Also see "...Help/ResourceModel?modelName=EngineTypeIdentifier" to understand the type identifiers of engines.

integer

Required

Range: inclusive between 1 and 2147483647

FirstName

First name

string

Max length: 450

LastName

Last name

string

Max length: 450

Address

Address

string

Max length: 500

PostalCode

Postal code

string

Max length: 50

City

City

string

Max length: 500

Country

Country

string

Max length: 500

Gender

Gender

string

Max length: 1

Valid values: "M","F",null

BirthDate

Date of birth. Date-only / no UTC.

date

None.

Email

Email

string

Max length: 200

Phone

Phone number

string

Max length: 50

ReceiptByEmail

0 = Receive nothing 1 = Receive by both email and mobile 2 = Receive by email only 3 = Receive by mobile only

integer

None.

Notes

Additional notes

string

Max length: -1

IsActive

(Not)active identifier

boolean

Range: inclusive between false and true

Created

The creation date and time of the member in Coordinated Universal Time (UTC) Set by the system, if left empty.

date

None.

SignedUp

The sign-up date and time of the member in Coordinated Universal Time (UTC)

date

None.

DefaultShop

Default store

integer

None.

SocialSecurityNr

Social and serurity number

string

None.

TermsConditionsApproved

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "CustomerNumber": 2,
  "CreationShop": "sample string 3",
  "User": "sample string 4",
  "Password": "sample string 5",
  "Modified": "2025-05-04T05:41:11.12233+02:00",
  "IsDeleted": true,
  "ClubId": 7,
  "EngineId": 8,
  "FirstName": "sample string 9",
  "LastName": "sample string 10",
  "Address": "sample string 11",
  "PostalCode": "sample string 12",
  "City": "sample string 13",
  "Country": "sample string 14",
  "Gender": "sample string 15",
  "BirthDate": "2025-05-04T05:41:11.12233+02:00",
  "Email": "sample string 16",
  "Phone": "sample string 17",
  "ReceiptByEmail": 18,
  "Notes": "sample string 19",
  "IsActive": true,
  "Created": "2025-05-04T05:41:11.12233+02:00",
  "SignedUp": "2025-05-04T05:41:11.12233+02:00",
  "DefaultShop": 1,
  "SocialSecurityNr": "sample string 20",
  "TermsConditionsApproved": true
}

application/xml, text/xml

Sample:
<MemberViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PublicAPI.Models">
  <Address>sample string 11</Address>
  <BirthDate>2025-05-04T05:41:11.12233+02:00</BirthDate>
  <City>sample string 13</City>
  <ClubId>7</ClubId>
  <Country>sample string 14</Country>
  <Created>2025-05-04T05:41:11.12233+02:00</Created>
  <DefaultShop>1</DefaultShop>
  <Email>sample string 16</Email>
  <EngineId>8</EngineId>
  <FirstName>sample string 9</FirstName>
  <Gender>sample string 15</Gender>
  <IsActive>true</IsActive>
  <LastName>sample string 10</LastName>
  <Notes>sample string 19</Notes>
  <Phone>sample string 17</Phone>
  <PostalCode>sample string 12</PostalCode>
  <ReceiptByEmail>18</ReceiptByEmail>
  <SignedUp>2025-05-04T05:41:11.12233+02:00</SignedUp>
  <SocialSecurityNr>sample string 20</SocialSecurityNr>
  <TermsConditionsApproved>true</TermsConditionsApproved>
  <CreationShop>sample string 3</CreationShop>
  <CustomerNumber>2</CustomerNumber>
  <Id>1</Id>
  <IsDeleted>true</IsDeleted>
  <Modified>2025-05-04T05:41:11.12233+02:00</Modified>
  <Password>sample string 5</Password>
  <User>sample string 4</User>
</MemberViewModel>