Getting Started
Base URL
All API requests to Marquatica should use the following base URL:
Authentication Methods
The Marquatica API uses two different authentication methods depending on which API you're using. Choose the appropriate method based on the API you're calling.
Method 1: X-API-Token (Legacy APIs)
The Dealer Locator API and Lead Submission API use token-based authentication via the X-API-Token header.
Getting Your Token
Your API token is provided by your Marquatica account administrator. Keep this token secure and never expose it publicly.
Example Request
curl -H "X-API-Token: your_api_token_here" \
"https://api.marquatica.com/dealer-locator?brand=your_brand&postal_code=90210&country=US"
your_api_token_here with your actual API token and your_brand with your brand slug, both provided by your administrator.
Method 2: JWT Bearer Token (Warranty API v1)
The Warranty API (v1) uses JWT Bearer token authentication. This requires a three-step process: login, use the token, and refresh when needed.
Step 1: Login to Get Tokens
First, authenticate with your email and password to receive access and refresh tokens:
curl -X POST https://api.marquatica.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com", "password": "yourpassword"}'
The response will contain:
| Field | Description |
|---|---|
access_token |
JWT token for API requests (expires in 1 hour) |
refresh_token |
Token used to obtain a new access token (expires in 30 days) |
Step 2: Use the Access Token
Include the access token in the Authorization header for API requests:
curl -H "Authorization: Bearer <Token>" \
"https://api.marquatica.com/api/v1/warranty"
Step 3: Refresh Your Token
When your access token expires (after 1 hour), use the refresh token to obtain a new one:
curl -X POST https://api.marquatica.com/api/v1/auth/refresh \
-H "Content-Type: application/json" \
-d '{"refresh_token": "<Token>"}'
| Token Type | Expiration |
|---|---|
| Access Token | 1 hour |
| Refresh Token | 30 days |
Your First API Call
Let's walk through a complete example using the Dealer Locator API to find nearby dealers.
The Request
Find dealers near postal code 90210 in the United States for your brand:
curl -H "X-API-Token: your_api_token_here" \
"https://api.marquatica.com/dealer-locator?brand=your_brand&postal_code=90210&country=US"
Expected Response
{
"success": true,
"nearest_dealer": {
"dealer_id": 15,
"name": "Buxton Marine Sales, L.P.",
"address": "1566 North Stemmons Frwy",
"city": "Lewisville",
"state": "TX",
"postal_code": "75067",
"country": "USA",
"phone": "555-0365",
"email": "info@buxtonmarine.com",
"website": "https://www.buxtonmarine.com",
"distance_miles": 1232.9
}
}
Understanding the Response
| Field | Description |
|---|---|
success |
Boolean indicating whether the request was successful |
nearest_dealer |
Object containing the dealer information |
dealer_id |
Unique identifier for the dealer in the Marquatica system |
distance_miles |
Distance from the requested postal code to the dealer's location |
What's Next?
Now that you've made your first API call, explore the complete documentation for each API:
- Dealer Locator API - Find dealers by location and brand
- Lead Submission API - Submit new leads for processing
- Warranty API - Manage warranty information
- Errors, Codes & Rate Limits - Error handling and rate limiting information