v1.0

Request & Response Examples

Complete examples for common DMV document generation scenarios.

Standard Vehicle Purchase

Example request for a basic vehicle purchase in Pennsylvania.

JSON Request
{ "DealerCode": "TEST1", "DealerName": "ABC Motors", "DealerAddress": "456 Auto Drive", "DealerCity": "Philadelphia", "DealerState": "PA", "DealerZipCode": "19104", "TransactionState": "PA", "TransactionType": "P", "TransactionCounty": "Philadelphia", "SaleDate": "2024-01-15", "VIN": "1HGCV1F34PA123456", "Year": 2023, "Make": "HONDA", "Model": "ACCORD", "BodyStyle": "4D", "GrossWeight": 3500, "VehicleType": "PV", "FuelType": "G", "Color": "Blue", "NewUsed": "U", "TitleState": "PA", "TitleStatus": "0", "OdometerReading": 15000, "OdometerBrand": "0", "OdometerDigits": "6", "PurchasePrice": 25000.00, "TradeInValue": 5000.00, "Rebate": 500.00, "BuyerLastName": "Smith", "BuyerFirstName": "John", "BuyerMiddleName": "A", "BuyerAddress": "123 Main Street", "BuyerCity": "Philadelphia", "BuyerState": "PA", "BuyerZipCode": "19103", "BuyerCounty": "Philadelphia", "BuyerPhone": "215-555-5678", "BuyerEmail": "john.smith@email.com", "BuyerType": "I", "PlateType": "REG", "TransferPlate": false, "RegistrationPeriod": 12 }
XML Response
<?xml version="1.0" encoding="utf-8"?> <ArrayOfDocumentHyperlink xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <DocumentHyperlink> <Name>MV-1 Title Application</Name> <URL>https://docsvc.autotitling.com/documents/mv1-abc123.pdf</URL> <Required>true</Required> <Category>Title</Category> <SortOrder>1</SortOrder> </DocumentHyperlink> <DocumentHyperlink> <Name>REV-336 Vehicle Sales Tax Return</Name> <URL>https://docsvc.autotitling.com/documents/rev336-def456.pdf</URL> <Required>true</Required> <Category>Tax</Category> <SortOrder>2</SortOrder> </DocumentHyperlink> <DocumentHyperlink> <Name>Odometer Disclosure Statement</Name> <URL>https://docsvc.autotitling.com/documents/odom-ghi789.pdf</URL> <Required>true</Required> <Category>Title</Category> <SortOrder>3</SortOrder> </DocumentHyperlink> <DocumentHyperlink> <Name>Power of Attorney</Name> <URL>https://docsvc.autotitling.com/documents/poa-jkl012.pdf</URL> <Required>false</Required> <Category>Title</Category> <SortOrder>4</SortOrder> </DocumentHyperlink> </ArrayOfDocumentHyperlink>

Lease Transaction

Example request for a vehicle lease with lessor/lessee information.

JSON Request
{ "DealerCode": "TEST1", "TransactionState": "CA", "TransactionType": "L", "SaleDate": "2024-01-20", "VIN": "5YJ3E1EA5PF123456", "Year": 2024, "Make": "TESLA", "Model": "MODEL 3", "VehicleType": "EV", "FuelType": "E", "NewUsed": "N", "MSRP": 45000.00, "PurchasePrice": 45000.00, "OdometerReading": 10, "OdometerBrand": "0", // Lessee (Customer) Information "LesseeLastName": "Johnson", "LesseeFirstName": "Sarah", "LesseeAddress": "789 Oak Avenue", "LesseeCity": "Los Angeles", "LesseeState": "CA", "LesseeZipCode": "90001", // Lessor (Leasing Company) Information "LessorName": "Tesla Leasing Inc", "LessorAddress": "3500 Deer Creek Road", "LessorCity": "Palo Alto", "LessorState": "CA", "LessorZipCode": "94304", // Lease Terms "LeaseMonthlyPayment": 499.00, "LeaseTerm": 36, "LeaseEndDate": "2027-01-20", // Buyer fields for title (Lessor is the buyer/owner) "BuyerLastName": "Tesla Leasing Inc", "BuyerFirstName": "", "BuyerAddress": "3500 Deer Creek Road", "BuyerCity": "Palo Alto", "BuyerState": "CA", "BuyerZipCode": "94304", "BuyerType": "B" }

Financed Purchase with Lienholder

Example request for a financed vehicle purchase with lienholder information.

JSON Request
{ "DealerCode": "TEST1", "TransactionState": "TX", "TransactionType": "P", "TransactionCounty": "Harris", "SaleDate": "2024-02-01", "VIN": "1FTFW1E50PFA12345", "Year": 2023, "Make": "FORD", "Model": "F-150", "BodyStyle": "CREW CAB", "VehicleType": "TR", "GrossWeight": 6500, "FuelType": "G", "NewUsed": "N", "MSRP": 55000.00, "PurchasePrice": 52000.00, "OdometerReading": 25, "OdometerBrand": "0", // Buyer Information "BuyerLastName": "Williams", "BuyerFirstName": "Michael", "BuyerAddress": "456 Texas Boulevard", "BuyerCity": "Houston", "BuyerState": "TX", "BuyerZipCode": "77001", "BuyerCounty": "Harris", "BuyerDLNumber": "12345678", "BuyerDLState": "TX", "BuyerType": "I", // Lienholder Information "LienholderName": "Ford Motor Credit Company", "LienholderAddress": "P.O. Box 650574", "LienholderCity": "Dallas", "LienholderState": "TX", "LienholderZipCode": "75265", "LienholderELTCode": "00080", "LienDate": "2024-02-01", // Insurance "InsuranceCompany": "State Farm", "InsurancePolicyNumber": "POL-123456789" }

cURL Examples

Command-line examples for testing the API.

Basic Request

curl -X POST \ "https://docsvc.autotitling.com/api/Process/RetrieveVehicleDocumentsByToken/YOUR_TOKEN" \ -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \ -H "Content-Type: application/json" \ -H "Accept: application/xml" \ -d '{ "DealerCode": "TEST1", "TransactionState": "PA", "TransactionType": "P", "VIN": "1HGCV1F34PA123456", "Year": 2023, "Make": "HONDA", "Model": "ACCORD", "VehicleType": "PV", "BuyerLastName": "Smith", "BuyerFirstName": "John", "BuyerAddress": "123 Main Street", "BuyerCity": "Philadelphia", "BuyerState": "PA", "BuyerZipCode": "19103" }'

With Output to File

curl -X POST \ "https://docsvc.autotitling.com/api/Process/RetrieveVehicleDocumentsByToken/YOUR_TOKEN" \ -H "Authorization: Basic YOUR_BASE64_CREDENTIALS" \ -H "Content-Type: application/json" \ -H "Accept: application/xml" \ -d @request.json \ -o response.xml

Generate Base64 Credentials

# Generate Base64 credentials on macOS/Linux echo -n "username:password" | base64 # Or in one line with curl curl -X POST -u "username:password" \ "https://docsvc.autotitling.com/api/Process/RetrieveVehicleDocumentsByToken/YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d @request.json

Tip: Save your JSON request body to a file (e.g., request.json) and use -d @request.json for cleaner commands.

Processing the Response

Example code for parsing the XML response and displaying documents.

JavaScript Example

// Parse XML response and create document list function parseDocumentResponse(xmlString) { const parser = new DOMParser(); const xmlDoc = parser.parseFromString(xmlString, "text/xml"); const documents = xmlDoc.getElementsByTagName("DocumentHyperlink"); const docList = []; for (let doc of documents) { docList.push({ name: doc.getElementsByTagName("Name")[0]?.textContent, url: doc.getElementsByTagName("URL")[0]?.textContent, required: doc.getElementsByTagName("Required")[0]?.textContent === "true", category: doc.getElementsByTagName("Category")[0]?.textContent, sortOrder: parseInt(doc.getElementsByTagName("SortOrder")[0]?.textContent || "0") }); } // Sort by sortOrder docList.sort((a, b) => a.sortOrder - b.sortOrder); return docList; } // Render document checklist function renderDocumentChecklist(documents) { const required = documents.filter(d => d.required); const optional = documents.filter(d => !d.required); let html = '<div class="document-checklist">'; if (required.length > 0) { html += '<h3>Required Documents</h3><ul>'; required.forEach(doc => { html += \`<li> <input type="checkbox" id="\${doc.name}"> <a href="\${doc.url}" target="_blank">\${doc.name}</a> </li>\`; }); html += '</ul>'; } if (optional.length > 0) { html += '<h3>Optional Documents</h3><ul>'; optional.forEach(doc => { html += \`<li> <input type="checkbox" id="\${doc.name}"> <a href="\${doc.url}" target="_blank">\${doc.name}</a> </li>\`; }); html += '</ul>'; } html += '</div>'; return html; }