Connecting to the API
https://cdx.dealerbuilt.com/0.99a/Api.svc
.
SOAP client libraries are available for most programming languages. If you're developing in .NET,
just add a service reference to the API endpoint in Visual Studio. Other client frameworks might
ask for the service definition file (WSDL).
Authentication
Send your username and password in a WS-Security UsernameToken.
C# example:
var client = new StandardApiClient();
var credentials = client.ClientCredentials.UserName;
credentials.UserName = "myusername";
credentials.Password = "mypassword";
client.PushRepairOrders(ros);
Example request
Your SOAP client library should do most of the work of generating a request. Here's an example request, including HTTP headers, SOAP headers, and SOAP body:
POST /0.99a/Api.svc HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://cdx.dealerbuilt.com/Api/0.99/IStandardApi/PullDealsByDealNumber"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: cdx.dealerbuilt.com:443
Content-Length: 1287
<soapenv:Envelope xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns="http://cdx.dealerbuilt.com/Api/0.99/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-29" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>myusername</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">mypassword</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">bLW62fQBaMG77CELiw11dg==</wsse:Nonce>
<wsu:Created>2016-01-22T18:14:02.430Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns:PullDealsByDealNumber>
<ns:storeId>10</ns:storeId>
<ns:dealNumbers>
<arr:long>132079</arr:long>
</ns:dealNumbers>
</ns:PullDealsByDealNumber>
</soapenv:Body>
</soapenv:Envelope>
Integration IDs: source, company, store, service location
The integration IDs are API identifiers for a dealership, similar to dealer numbers.
- Source ID
- Identifies a dealer database. Used for database-level APIs, like customers and customer vehicles.
- Company ID
- Identifies an accounting company. Used for accounting APIs, like general ledger and accounts payable.
- Store ID
- Identifies a dealership rooftop. Used for sales APIs, like deals and inventory.
- Service Location ID
- Identifies a service department. Used for service APIs, like ROs and parts.
The IDs form a one-to-many hierarchy. Each dealer group has one or more sources. Each source has one or more companies. Each company has one or more stores. Each store has one or more service locations.
Some of our dealer groups have a separate database (source) for each store, some have all stores in one database, and some dealer groups have a mix.
Testing
DealerBuilt provides integration IDs for a test environment where you can push and pull test data.
These free tools are very handy for testing and debugging:
- SoapUI
- A nice user interface for creating and running test requests. SoapUI can read our service definition file (WSDL) and create sample requests for all API operations.
- Fiddler
- A proxy server for debugging requests. Set Fiddler as your proxy and it will show a human-readable view of your raw request data.