PUT api/v{version}/player

Add new players to the system. The players require a given and last name. The system will check on the following properties to prevent duplicatates: - email - combination: given name, last name ,nationality, date of birth - (dartconnect) member id. The user will become active by default.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
version

string

None.

Body Parameters

Collection of CreatePlayerViewModel
NameDescriptionTypeAdditional information
Ref

Reference that is used to link the request and response data.

string

None.

FirstName

The given name of the player (required).

string

None.

LastName

The last name of the player (required).

string

None.

Nationality

The nationality, either the name or the country code

string

None.

Email

Player email address.

string

None.

DateOfBirth

THe date of birth of the player

date

None.

Gender

Gender of the player, default male. Female if no male.

string

None.

MemberId

The dart connect member if.

string

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Ref": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "Nationality": "sample string 4",
    "Email": "sample string 5",
    "DateOfBirth": "2023-09-30T04:51:15.2968549+02:00",
    "Gender": "sample string 6",
    "MemberId": "sample string 7"
  },
  {
    "Ref": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "Nationality": "sample string 4",
    "Email": "sample string 5",
    "DateOfBirth": "2023-09-30T04:51:15.2968549+02:00",
    "Gender": "sample string 6",
    "MemberId": "sample string 7"
  }
]

application/xml, text/xml

Sample:
<ArrayOfCreatePlayerViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DartStat.Web.Areas.Apiv2.Models">
  <CreatePlayerViewModel>
    <DateOfBirth>2023-09-30T04:51:15.2968549+02:00</DateOfBirth>
    <Email>sample string 5</Email>
    <FirstName>sample string 2</FirstName>
    <Gender>sample string 6</Gender>
    <LastName>sample string 3</LastName>
    <MemberId>sample string 7</MemberId>
    <Nationality>sample string 4</Nationality>
    <Ref>sample string 1</Ref>
  </CreatePlayerViewModel>
  <CreatePlayerViewModel>
    <DateOfBirth>2023-09-30T04:51:15.2968549+02:00</DateOfBirth>
    <Email>sample string 5</Email>
    <FirstName>sample string 2</FirstName>
    <Gender>sample string 6</Gender>
    <LastName>sample string 3</LastName>
    <MemberId>sample string 7</MemberId>
    <Nationality>sample string 4</Nationality>
    <Ref>sample string 1</Ref>
  </CreatePlayerViewModel>
</ArrayOfCreatePlayerViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CreatePlayerStatusResponse
NameDescriptionTypeAdditional information
Status

Response per player.

Collection of CreatePlayerStatus

None.

Message

Overall message

string

None.

Ok

Overall status

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Status": [
    {
      "Ok": true,
      "Message": "sample string 2",
      "Ref": "sample string 3",
      "Id": 1
    },
    {
      "Ok": true,
      "Message": "sample string 2",
      "Ref": "sample string 3",
      "Id": 1
    }
  ],
  "Message": "sample string 1",
  "Ok": true
}

application/xml, text/xml

Sample:
<CreatePlayerStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DartStat.Web.Areas.Apiv2.Models">
  <Message>sample string 1</Message>
  <Ok>true</Ok>
  <Status>
    <CreatePlayerStatus>
      <Id>1</Id>
      <Message>sample string 2</Message>
      <Ok>true</Ok>
      <Ref>sample string 3</Ref>
    </CreatePlayerStatus>
    <CreatePlayerStatus>
      <Id>1</Id>
      <Message>sample string 2</Message>
      <Ok>true</Ok>
      <Ref>sample string 3</Ref>
    </CreatePlayerStatus>
  </Status>
</CreatePlayerStatusResponse>