POST api/v2/addressbook/contacts

This method adds multiple contacts to the system. The system checks that the mobile numbers and email address are valid and if the validation is requested, the system will send a message to the contact to check the details are correct.

Request Information

URI Parameters

None.

Body Parameters

Either xml or json request.

Collection of TwoSms.CustomerPortalRole.API.AddressBooks.AddressBookLite
NameDescriptionTypeAdditional information
FirstName

The first name of the contact.

string

Required

LastName

The last name of the contact.

string

Required

MobilePhone

The mobile / cell number of thet contact.

string

Required

EmailAddress

The email address of the contact.

string

Required

Password

The password of the contact.

string

None.

LoginType

The type of authentication the contact uses when reading an SMS+ message.

integer

None.

VetoValidation

Determines if the contact should not be validated if true.

boolean

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "LegacyPersonNumber": 1,
    "FirstName": "sample string 4",
    "LastName": "sample string 5",
    "MobilePhone": "sample string 6",
    "EmailAddress": "sample string 7",
    "Password": "sample string 8",
    "LoginType": 9,
    "VetoValidation": true
  },
  {
    "LegacyPersonNumber": 1,
    "FirstName": "sample string 4",
    "LastName": "sample string 5",
    "MobilePhone": "sample string 6",
    "EmailAddress": "sample string 7",
    "Password": "sample string 8",
    "LoginType": 9,
    "VetoValidation": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfAddressBookLite xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <AddressBookLite>
    <FirstName>sample string 4</FirstName>
    <LastName>sample string 5</LastName>
    <MobilePhone>sample string 6</MobilePhone>
    <EmailAddress>sample string 7</EmailAddress>
    <Password>sample string 8</Password>
    <LoginType>9</LoginType>
    <VetoValidation>true</VetoValidation>
    <PersonNumber>1</PersonNumber>
    <DateCreated>2018-10-23T02:44:05.2011321+01:00</DateCreated>
    <DateModified>2018-10-23T02:44:05.2011321+01:00</DateModified>
    <LastModifiedBy>sample string 2</LastModifiedBy>
    <OwnerAccountID>df34639f-f05c-4700-b574-8914edeb4c47</OwnerAccountID>
    <LegacyPersonNumber>1</LegacyPersonNumber>
  </AddressBookLite>
  <AddressBookLite>
    <FirstName>sample string 4</FirstName>
    <LastName>sample string 5</LastName>
    <MobilePhone>sample string 6</MobilePhone>
    <EmailAddress>sample string 7</EmailAddress>
    <Password>sample string 8</Password>
    <LoginType>9</LoginType>
    <VetoValidation>true</VetoValidation>
    <PersonNumber>1</PersonNumber>
    <DateCreated>2018-10-23T02:44:05.2011321+01:00</DateCreated>
    <DateModified>2018-10-23T02:44:05.2011321+01:00</DateModified>
    <LastModifiedBy>sample string 2</LastModifiedBy>
    <OwnerAccountID>df34639f-f05c-4700-b574-8914edeb4c47</OwnerAccountID>
    <LegacyPersonNumber>1</LegacyPersonNumber>
  </AddressBookLite>
</ArrayOfAddressBookLite>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Details of the last contact that has been created.

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.AddressBooks.AddressBookLite
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.AddressBooks.AddressBookLite

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "LegacyPersonNumber": 1,
      "FirstName": "sample string 4",
      "LastName": "sample string 5",
      "MobilePhone": "sample string 6",
      "EmailAddress": "sample string 7",
      "Password": "sample string 8",
      "LoginType": 9,
      "VetoValidation": true
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfAddressBookLite xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <FirstName>sample string 4</FirstName>
      <LastName>sample string 5</LastName>
      <MobilePhone>sample string 6</MobilePhone>
      <EmailAddress>sample string 7</EmailAddress>
      <Password>sample string 8</Password>
      <LoginType>9</LoginType>
      <VetoValidation>true</VetoValidation>
      <PersonNumber>1</PersonNumber>
      <DateCreated>2018-10-23T02:44:05.2203805+01:00</DateCreated>
      <DateModified>2018-10-23T02:44:05.2203805+01:00</DateModified>
      <LastModifiedBy>sample string 2</LastModifiedBy>
      <OwnerAccountID>219affb8-842d-4412-8040-7b3ef601c157</OwnerAccountID>
      <LegacyPersonNumber>1</LegacyPersonNumber>
    </Detail>
  </ResponseData>
</ResponseOfAddressBookLite>