PUT api/v1/addressbook/contacts/{contactID}

This method updates the contact details of the contact provided.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
contactID

The id that determines which contact will be modified.

string

Required

Body Parameters

Either xml or json request.

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

Max length: 8

LoginType

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

integer

None.

Validated

Determines if the contact should not be validated if true.

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "EmailAddress": "sample string 7",
  "FirstName": "sample string 4",
  "LastName": "sample string 5",
  "MobilePhone": "sample string 6",
  "LoginType": 9,
  "Password": "sample string 8",
  "Validated": true
}

application/xml, text/xml

Sample:
<AddressBookLite xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <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>
  <Validated>true</Validated>
  <PersonNumber>1</PersonNumber>
  <DateCreated>2024-03-29T05:14:49.6238724+00:00</DateCreated>
  <DateModified>2024-03-29T05:14:49.6238724+00:00</DateModified>
  <LastModifiedBy>sample string 2</LastModifiedBy>
  <OwnerAccountID>a07240e5-e0ef-4bb1-9fe5-ded98b93906b</OwnerAccountID>
  <LegacyPersonNumber>1</LegacyPersonNumber>
</AddressBookLite>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'TwoSms.CustomerPortalRole.API.AddressBooks.AddressBookLite'.

Response Information

Resource Description

The details of the actual modified contact.

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": {
      "EmailAddress": "sample string 7",
      "FirstName": "sample string 4",
      "LastName": "sample string 5",
      "MobilePhone": "sample string 6",
      "LoginType": 9,
      "Password": "sample string 8",
      "Validated": 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>
      <Validated>true</Validated>
      <PersonNumber>1</PersonNumber>
      <DateCreated>2024-03-29T05:14:49.6318638+00:00</DateCreated>
      <DateModified>2024-03-29T05:14:49.6318638+00:00</DateModified>
      <LastModifiedBy>sample string 2</LastModifiedBy>
      <OwnerAccountID>bf190f43-e6e7-4b50-90d2-413285a3e459</OwnerAccountID>
      <LegacyPersonNumber>1</LegacyPersonNumber>
    </Detail>
  </ResponseData>
</ResponseOfAddressBookLite>