NATS4 API Set Affiliate Information

From TMM Wiki
Revision as of 10:26, 10 April 2009 by TMMLonny (talk | contribs) (New page: {{NATS4 Manual}} To modify/set an affiliates information you must make a SOAP call with the following parameters: <pre> <?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers

To modify/set an affiliates information you must make a SOAP call with the following parameters:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
	<SOAP-ENV:Body>
		<tns:set_aff_informations xmlns:tns="urn:natsapiadmin_wsdl">
			<loginid xsi:type="xsd:int">6</loginid>
			<firstname xsi:type="xsd:string">FirstName</firstname>
			<lastname xsi:nil="true" xsi:type="xsd:string"/>
			<email xsi:nil="true" xsi:type="xsd:string"/>
			<company xsi:nil="true" xsi:type="xsd:string"/>
			<url xsi:type="xsd:string">REMOVE</url>
			<tel xsi:nil="true" xsi:type="xsd:string"/>
			<icq xsi:nil="true" xsi:type="xsd:string"/>
			<aim xsi:nil="true" xsi:type="xsd:string"/>
			<msn xsi:nil="true" xsi:type="xsd:string"/>
			<address1 xsi:nil="true" xsi:type="xsd:string"/>
			<address2 xsi:nil="true" xsi:type="xsd:string"/>
			<city xsi:nil="true" xsi:type="xsd:string"/>
			<state xsi:nil="true" xsi:type="xsd:string"/>
			<country xsi:nil="true" xsi:type="xsd:string"/>
			<zip_code xsi:nil="true" xsi:type="xsd:string"/>
			<tax_id_or_ssn xsi:nil="true" xsi:type="xsd:string"/>
		</tns:set_aff_informations>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If you want to remove a field you can pass in the string REMOVE and the field will be removed. The following fields have this ability:

  • Company
  • URL
  • Tel
  • ICQ
  • AIM
  • MSN
  • Address2
  • tax_id_or_ssn

You will get a response similar to:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
	<SOAP-ENV:Body>
		<ns1:set_aff_informationsResponse xmlns:ns1="urn:natsapiadmin_wsdl">
			<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Set_aff_informations[1]">
				<item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Set_aff_informations[1]">
					<item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Set_aff_informations[0]">
					</item>
				</item>
			</return>
		</ns1:set_aff_informationsResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The response contains one parameters named result. If the modification was successful then result will be 1. If it was not successful then the result will be 0.