PATCH api/v2/addressbook/contacts

Updates the details of all the contacts specified in the request.

Request Information

URI Parameters

None.

Body Parameters

A list of contacts to be updated. Each contact must contain it's personnumber as well as at least one other parameter to update. Maximum of 1000 contacts per request.

Collection of TwoSms.CustomerPortalRole.API.AddressBooks.AddressBookEntryDetail
NameDescriptionTypeAdditional information
EmailAddress

The email address of the address book entry to be modified.

string

None.

FirstName

The first name of the address book entry to be modified.

string

None.

LastName

The last name of the address book entry to be modified.

string

None.

MobilePhone

The mobile phone of the address book entry to be modified. In full international format e.g. +1xxxxxxxxxx

string

None.

PersonNumber

The ID of the address book entry.

integer

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "EmailAddress": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "MobilePhone": "sample string 4",
    "Password": "sample string 5",
    "PersonNumber": 6
  },
  {
    "EmailAddress": "sample string 1",
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "MobilePhone": "sample string 4",
    "Password": "sample string 5",
    "PersonNumber": 6
  }
]

application/xml, text/xml

Sample:
<ArrayOfAddressBookEntryDetail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <AddressBookEntryDetail>
    <EmailAddress>sample string 1</EmailAddress>
    <FirstName>sample string 2</FirstName>
    <LastName>sample string 3</LastName>
    <MobilePhone>sample string 4</MobilePhone>
    <Password>sample string 5</Password>
    <PersonNumber>6</PersonNumber>
  </AddressBookEntryDetail>
  <AddressBookEntryDetail>
    <EmailAddress>sample string 1</EmailAddress>
    <FirstName>sample string 2</FirstName>
    <LastName>sample string 3</LastName>
    <MobilePhone>sample string 4</MobilePhone>
    <Password>sample string 5</Password>
    <PersonNumber>6</PersonNumber>
  </AddressBookEntryDetail>
</ArrayOfAddressBookEntryDetail>

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 'System.Collections.Generic.List`1[[TwoSms.CustomerPortalRole.API.AddressBooks.AddressBookEntryDetail, TwoSms.CustomerPortalRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.

Response Information

Resource Description

TwoSms.CustomerPortalRole.API.Misc.ResponseOfSystem.Object
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfSystem.Object

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": {}
  }
}

application/xml, text/xml

Sample:
<ResponseOfObject 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 />
  </ResponseData>
</ResponseOfObject>