Reference for http://api.123-txt.com/Api123WCF.svc/rest/Contact/ByProp

Update contact properties by specifying the value of an existing property to search by.

Url: http://api.123-txt.com/Api123WCF.svc/rest/Contact/ByProp

HTTP Method: PUT

Message direction Format Body
Request Xml Example,Schema
Request Json Example
Response Xml Example,Schema
Response Json Example

The following is an example request Xml body:

<JsonApiContactUpdateByPropRequest xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.Requests">
  <Credentials>
    <Pass xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General">String content</Pass>
    <User xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General">String content</User>
  </Credentials>
  <Instructions>
    <JsonApiContactUpdateInstructionsByProp xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General">
      <Instructions>
        <JsonContactListUpdatePropertyInstruction>
          <DefId>1627aea5-8e0a-4371-9022-9b504344e724</DefId>
          <Delete>true</Delete>
          <Type>255</Type>
          <Value>String content</Value>
        </JsonContactListUpdatePropertyInstruction>
        <JsonContactListUpdatePropertyInstruction>
          <DefId>1627aea5-8e0a-4371-9022-9b504344e724</DefId>
          <Delete>true</Delete>
          <Type>255</Type>
          <Value>String content</Value>
        </JsonContactListUpdatePropertyInstruction>
      </Instructions>
      <SearchProperties>
        <JsonApiPropToSearch>
          <DefinitionId>1627aea5-8e0a-4371-9022-9b504344e724</DefinitionId>
          <Type>String</Type>
          <Value>String content</Value>
        </JsonApiPropToSearch>
        <JsonApiPropToSearch>
          <DefinitionId>1627aea5-8e0a-4371-9022-9b504344e724</DefinitionId>
          <Type>String</Type>
          <Value>String content</Value>
        </JsonApiPropToSearch>
      </SearchProperties>
    </JsonApiContactUpdateInstructionsByProp>
    <JsonApiContactUpdateInstructionsByProp xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General">
      <Instructions>
        <JsonContactListUpdatePropertyInstruction>
          <DefId>1627aea5-8e0a-4371-9022-9b504344e724</DefId>
          <Delete>true</Delete>
          <Type>255</Type>
          <Value>String content</Value>
        </JsonContactListUpdatePropertyInstruction>
        <JsonContactListUpdatePropertyInstruction>
          <DefId>1627aea5-8e0a-4371-9022-9b504344e724</DefId>
          <Delete>true</Delete>
          <Type>255</Type>
          <Value>String content</Value>
        </JsonContactListUpdatePropertyInstruction>
      </Instructions>
      <SearchProperties>
        <JsonApiPropToSearch>
          <DefinitionId>1627aea5-8e0a-4371-9022-9b504344e724</DefinitionId>
          <Type>String</Type>
          <Value>String content</Value>
        </JsonApiPropToSearch>
        <JsonApiPropToSearch>
          <DefinitionId>1627aea5-8e0a-4371-9022-9b504344e724</DefinitionId>
          <Type>String</Type>
          <Value>String content</Value>
        </JsonApiPropToSearch>
      </SearchProperties>
    </JsonApiContactUpdateInstructionsByProp>
  </Instructions>
</JsonApiContactUpdateByPropRequest>

The following is an example request Json body:

{
	"Credentials":{
		"Pass":"String content",
		"User":"String content"
	},
	"Instructions":[{
		"Instructions":[{
			"DefId":"1627aea5-8e0a-4371-9022-9b504344e724",
			"Delete":true,
			"Type":255,
			"Value":"String content"
		}],
		"SearchProperties":[{
			"DefinitionId":"1627aea5-8e0a-4371-9022-9b504344e724",
			"Type":0,
			"Value":"String content"
		}]
	}]
}

The following is an example response Xml body:

<ArrayOfJsonContactUpdateResponse xmlns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General">
  <JsonContactUpdateResponse>
    <ContactId>1627aea5-8e0a-4371-9022-9b504344e724</ContactId>
    <Reason>String content</Reason>
    <Updated>true</Updated>
  </JsonContactUpdateResponse>
  <JsonContactUpdateResponse>
    <ContactId>1627aea5-8e0a-4371-9022-9b504344e724</ContactId>
    <Reason>String content</Reason>
    <Updated>true</Updated>
  </JsonContactUpdateResponse>
</ArrayOfJsonContactUpdateResponse>

The following is an example response Json body:

[{
	"ContactId":"1627aea5-8e0a-4371-9022-9b504344e724",
	"Reason":"String content",
	"Updated":true
}]

The following is the request Xml Schema:

<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Contacts.JSON.Requests" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Contacts.JSON.Requests" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" />
  <xs:complexType name="JsonApiContactUpdateByPropRequest">
    <xs:sequence>
      <xs:element name="Credentials" nillable="true" xmlns:q1="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" type="q1:JsonUserApiCredentials" />
      <xs:element name="Instructions" nillable="true" xmlns:q2="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" type="q2:ArrayOfJsonApiContactUpdateInstructionsByProp" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonApiContactUpdateByPropRequest" nillable="true" type="tns:JsonApiContactUpdateByPropRequest" />
</xs:schema>

Additional request Xml Schemas:

<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="anyType" nillable="true" type="xs:anyType" />
  <xs:element name="anyURI" nillable="true" type="xs:anyURI" />
  <xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
  <xs:element name="boolean" nillable="true" type="xs:boolean" />
  <xs:element name="byte" nillable="true" type="xs:byte" />
  <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
  <xs:element name="decimal" nillable="true" type="xs:decimal" />
  <xs:element name="double" nillable="true" type="xs:double" />
  <xs:element name="float" nillable="true" type="xs:float" />
  <xs:element name="int" nillable="true" type="xs:int" />
  <xs:element name="long" nillable="true" type="xs:long" />
  <xs:element name="QName" nillable="true" type="xs:QName" />
  <xs:element name="short" nillable="true" type="xs:short" />
  <xs:element name="string" nillable="true" type="xs:string" />
  <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
  <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
  <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
  <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
  <xs:element name="char" nillable="true" type="tns:char" />
  <xs:simpleType name="char">
    <xs:restriction base="xs:int" />
  </xs:simpleType>
  <xs:element name="duration" nillable="true" type="tns:duration" />
  <xs:simpleType name="duration">
    <xs:restriction base="xs:duration">
      <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
      <xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
      <xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="guid" nillable="true" type="tns:guid" />
  <xs:simpleType name="guid">
    <xs:restriction base="xs:string">
      <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:attribute name="FactoryType" type="xs:QName" />
  <xs:attribute name="Id" type="xs:ID" />
  <xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>

<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:import namespace="http://schemas.datacontract.org/2004/07/Contacts.Enums" />
  <xs:complexType name="JsonUserApiCredentials">
    <xs:sequence>
      <xs:element minOccurs="0" name="Pass" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="User" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonUserApiCredentials" nillable="true" type="tns:JsonUserApiCredentials" />
  <xs:complexType name="ArrayOfJsonApiContactUpdateInstructionsByProp">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="JsonApiContactUpdateInstructionsByProp" nillable="true" type="tns:JsonApiContactUpdateInstructionsByProp" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfJsonApiContactUpdateInstructionsByProp" nillable="true" type="tns:ArrayOfJsonApiContactUpdateInstructionsByProp" />
  <xs:complexType name="JsonApiContactUpdateInstructionsByProp">
    <xs:sequence>
      <xs:element name="Instructions" nillable="true" type="tns:ArrayOfJsonContactListUpdatePropertyInstruction" />
      <xs:element name="SearchProperties" nillable="true" type="tns:ArrayOfJsonApiPropToSearch" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonApiContactUpdateInstructionsByProp" nillable="true" type="tns:JsonApiContactUpdateInstructionsByProp" />
  <xs:complexType name="ArrayOfJsonContactListUpdatePropertyInstruction">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="JsonContactListUpdatePropertyInstruction" nillable="true" type="tns:JsonContactListUpdatePropertyInstruction" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfJsonContactListUpdatePropertyInstruction" nillable="true" type="tns:ArrayOfJsonContactListUpdatePropertyInstruction" />
  <xs:complexType name="JsonContactListUpdatePropertyInstruction">
    <xs:sequence>
      <xs:element name="DefId" type="ser:guid" />
      <xs:element minOccurs="0" name="Delete" type="xs:boolean">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="Type" type="xs:unsignedByte" />
      <xs:element minOccurs="0" name="Value" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonContactListUpdatePropertyInstruction" nillable="true" type="tns:JsonContactListUpdatePropertyInstruction" />
  <xs:complexType name="ArrayOfJsonApiPropToSearch">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="JsonApiPropToSearch" nillable="true" type="tns:JsonApiPropToSearch" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfJsonApiPropToSearch" nillable="true" type="tns:ArrayOfJsonApiPropToSearch" />
  <xs:complexType name="JsonApiPropToSearch">
    <xs:sequence>
      <xs:element name="DefinitionId" type="ser:guid" />
      <xs:element name="Type" xmlns:q1="http://schemas.datacontract.org/2004/07/Contacts.Enums" type="q1:EnumContactPropDataTypes" />
      <xs:element name="Value" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonApiPropToSearch" nillable="true" type="tns:JsonApiPropToSearch" />
</xs:schema>

<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Contacts.Enums" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Contacts.Enums" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:simpleType name="EnumContactPropDataTypes">
    <xs:annotation>
      <xs:appinfo>
        <ActualType Name="unsignedByte" Namespace="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
      </xs:appinfo>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="String">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Long">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DateTime">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">3</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Decimal">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">4</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Guid">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">6</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="EnumContactPropDataTypes" nillable="true" type="tns:EnumContactPropDataTypes" />
</xs:schema>

<tns:schema targetNamespace="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2001/XMLSchema">
  <tns:element name="schema">
    <tns:complexType />
  </tns:element>
</tns:schema>

The following is the response Xml Schema:

<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Contacts.JSON.General" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="ArrayOfJsonContactUpdateResponse">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="JsonContactUpdateResponse" nillable="true" type="tns:JsonContactUpdateResponse" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfJsonContactUpdateResponse" nillable="true" type="tns:ArrayOfJsonContactUpdateResponse" />
  <xs:complexType name="JsonContactUpdateResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="ContactId" type="ser:guid" />
      <xs:element minOccurs="0" name="Reason" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="Updated" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="JsonContactUpdateResponse" nillable="true" type="tns:JsonContactUpdateResponse" />
</xs:schema>

Additional response Xml Schemas:

<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="anyType" nillable="true" type="xs:anyType" />
  <xs:element name="anyURI" nillable="true" type="xs:anyURI" />
  <xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
  <xs:element name="boolean" nillable="true" type="xs:boolean" />
  <xs:element name="byte" nillable="true" type="xs:byte" />
  <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
  <xs:element name="decimal" nillable="true" type="xs:decimal" />
  <xs:element name="double" nillable="true" type="xs:double" />
  <xs:element name="float" nillable="true" type="xs:float" />
  <xs:element name="int" nillable="true" type="xs:int" />
  <xs:element name="long" nillable="true" type="xs:long" />
  <xs:element name="QName" nillable="true" type="xs:QName" />
  <xs:element name="short" nillable="true" type="xs:short" />
  <xs:element name="string" nillable="true" type="xs:string" />
  <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
  <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
  <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
  <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
  <xs:element name="char" nillable="true" type="tns:char" />
  <xs:simpleType name="char">
    <xs:restriction base="xs:int" />
  </xs:simpleType>
  <xs:element name="duration" nillable="true" type="tns:duration" />
  <xs:simpleType name="duration">
    <xs:restriction base="xs:duration">
      <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
      <xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
      <xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="guid" nillable="true" type="tns:guid" />
  <xs:simpleType name="guid">
    <xs:restriction base="xs:string">
      <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:attribute name="FactoryType" type="xs:QName" />
  <xs:attribute name="Id" type="xs:ID" />
  <xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>

<tns:schema targetNamespace="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2001/XMLSchema">
  <tns:element name="schema">
    <tns:complexType />
  </tns:element>
</tns:schema>