![]() |
This method gets a list of Dealers that you have access to from your access code.
URL : http://webservice.dealerhub.net/dealerhub/WS/DealerHubV1.cfc?wsdl
Method : getdealers
Input Parameters :
XMLSecurity
XMLData
This method will be your first call after your receive your access codes from DealerHub staff. This webservice gives you a list of retailers you have access to, and it lists all the dealercodes that you will need to pass in your security calls.
There are always 2 parameters passed, these are both XML strings, and the first is XMLSecurity which holds the secuirty information, i.e your access code and the dealercode that you want to access the data for, and the second is the XML data you are going to pass in.
This webservice does not need any value in the XMLData parameter, you can pass it as an empty string.
This webservice method needs a DealerCode = 0 (zero) to be passed as this method is designed to give you your DealerCodes to use in other webservice methods.
If you need to view the information on how to format the XMLSecurity data string, please click here
Example output for a valid call:
<?xml version="1.0" encoding="UTF-8"?> <Resultset> <Dealer> <Dealer> <Dealer> </Resultset> |
Output :
Field Name | Field Type | Field Description |
---|---|---|
RID | Numeric | The retailer ID for this dealer |
DealerCode | String | The DealerCode is what you will pass to identity the dealer you want to read/write from on most webservice calls. This will need storing at your end. |
Brand | String | Manufactuer Brand this dealer primarily sells |
DealerName | String | Dealers Name |
Address1 | String | Dealer Postal Address Information |
Address1 | String | Dealer Postal Address Information |
Address1 | String | Dealer Postal Address Information |
Address2 | String | Dealer Postal Address Information |
Address3 | String | Dealer Postal Address Information |
Town | String | Dealer Postal Address Information |
State_County | String | Dealer Postal Address Information |
PostCode_ZIP | String | Dealer Postal Address Information |
Example output for an invalid call / or general error in a webservice call
<?xml version="1.0" encoding="UTF-8" ?> <ResultSet> <Error> <ErrorCode>2</ErrorCode> <ErrorInfo>No Data found </ErrorInfo> </Error> </ResultSet> |
There may be multiple errors returned in the XML packet, they are separated by <Error> blocks and each block contains an ErrorCode to allow you to do some processing logic on the numerical value returned, and an ErrorInfo which is used by the developer or administrator to visually see what the problem is with the submission.
Alternatively, you can call some of the webservices via URL variables or form posts. To call this via the URL, you can pass the variables as so :
http://webservice.dealerhub.net/dealerhub/WS/proxy/DealerHubV1.go?method=getdealer&accesscode={accesscodehere}