OnlineAPI
Click here for a complete list of operations.
GetRepUpline
This method will retrieve the upline by placement information for a given rep # in a genealogy type.
Input parameters:
RepDID: Rep # whose upline the client wishes to retrieve.
GenealogyType: Identifier # of the Genealogy Type. Consult ByDesign support for knowing the your enabled Genealogy Types and their identifiers.
Leves: Number of upline levels to return. Accepts NULL. NULL returns all upline levels.
Output Messages: This method will return a status message of the transaction. Besides, the output Success will return 1 or 0 if there was success or not, respectively.
INVALID_CREDENTIALS: Means that credentials are incorrect or invalid.
INSUFFICIENT_USER_RIGHTS: Means that credentials are correct but don't have the needed access rights to use this method.
INVALID_REPDID_PROVIDED: Means that provided Rep# was not found in the system.
INVALID_GENEALOGYTYPE: Occurs when GenealogyType has an invalid value.
REPDID_IS_REQUIRED: Occurs when Rep# is empty.
TRANSACTION_DISPATCHED_EXCEPTION: In case we get an error in the transaction, we will communicate that by this message.
NO_UPLINE_FOUND: This is not an error. Success output is set to 1. This message indicates that query was executed correctly but doesn't retrieve any upline.
SUCCESS: Means that API method retrieved upline info correctly.
Other Notes: Records are returned in ascending order.
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1 Host: api.securefreedom.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.securefreedom.com/GetRepUpline" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetRepUpline xmlns="http://www.securefreedom.com/"> <Credentials> <Username>string</Username> <Password>string</Password> <Token>string</Token> </Credentials> <RepDID>string</RepDID> <GenealogyType>int</GenealogyType> <Levels>int</Levels> </GetRepUpline> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetRepUplineResponse xmlns="http://www.securefreedom.com/"> <GetRepUplineResult> <RepUplineList> <RepUplineRecord> <RepDID>string</RepDID> <UplineLevel>int</UplineLevel> </RepUplineRecord> <RepUplineRecord> <RepDID>string</RepDID> <UplineLevel>int</UplineLevel> </RepUplineRecord> </RepUplineList> </GetRepUplineResult> </GetRepUplineResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1 Host: api.securefreedom.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetRepUpline xmlns="http://www.securefreedom.com/"> <Credentials> <Username>string</Username> <Password>string</Password> <Token>string</Token> </Credentials> <RepDID>string</RepDID> <GenealogyType>int</GenealogyType> <Levels>int</Levels> </GetRepUpline> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetRepUplineResponse xmlns="http://www.securefreedom.com/"> <GetRepUplineResult> <RepUplineList> <RepUplineRecord> <RepDID>string</RepDID> <UplineLevel>int</UplineLevel> </RepUplineRecord> <RepUplineRecord> <RepDID>string</RepDID> <UplineLevel>int</UplineLevel> </RepUplineRecord> </RepUplineList> </GetRepUplineResult> </GetRepUplineResponse> </soap12:Body> </soap12:Envelope>