NATS4 API Set Affiliate Information
From TMM Wiki
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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.