### API Versioning Example Source: https://apidocs.marketcheck.com/index Shows how to specify a particular API version for a request by including the 'x-version' header. This allows access to specific features or versions of the API. ```curl curl --location --request GET 'mc-api.marketcheck.com/v2/search/car/active?api_key={{api_key}}' \ --header 'x-version: V4.1.0' ``` -------------------------------- ### Access API with Access Token Source: https://apidocs.marketcheck.com/index Demonstrates how to make a GET request to an API endpoint using the obtained OAuth 2.0 access token. The token should be included in the Authorization header as a Bearer token. ```curl curl --location --request GET https://mc-api.marketcheck.com/oauth/v2/search/car/active \ --header "Authorization: Bearer " ``` -------------------------------- ### Marketcheck API - General Information Source: https://apidocs.marketcheck.com/index Provides general information about the Marketcheck API, including introduction, authentication, versioning, and error handling. ```APIDOC Marketcheck API General Information: Introduction: https://apidocs.marketcheck.com/#intro Sign up & Authentication Testing via Postman API Versioning Deprecation Policy and Lifecycle API Status & Downtime Notifications Getting Support Base Path & Requests Mocking the API General Errors When not to use the API? ``` -------------------------------- ### Marketcheck API Authentication and Usage Source: https://apidocs.marketcheck.com/index This section details how to authenticate with the Marketcheck API using an API key. It explains that the API key should be included as a query string parameter named 'api_key'. Users can generate their API key after signing up and subscribing to a package on the Marketcheck developer portal. ```APIDOC Sign up & Authentication: You can sign-up for the API subscription at our developer portal - http://www.marketcheck.com/automotive After Signing up you'd need to subscribe to one of packages. Packages and Rate limits: For Plans and pricing please visit https://www.marketcheck.com/pricing All paid packages have unlimited access at the rate limits listed on the pricing page. If you run over the rate limit for your subscribed package then you'll get an error response from the API with HTTP status code 429 and and error message that would look something like this - { code: 429, message: "API rate limit exceeded" } It's also a good practice to handle these failures in your system and attempt a retrial on the API call. The API hits that return a spike arrest violation are not charged for as of now. Authentication: There are two ways to authenticate - with simple api_key token in query string or with OAuth 2.0 access token. 1. API key The Developer API uses token based authentication. You have to include the token in the querystring of every request. The token parameter is named as `api_key` Each Marketcheck API user can generate API key and can have only a single valid API key per account. To generate an API token, please Sign up at our developer portal at http://www.marketcheck.com/automotive Once signed up you will have to subscribe to one of the paid packages. After that you can retrive the generated API key token from "My Account > API > API KEYS" ``` -------------------------------- ### Marketcheck API Base Path and Headers Source: https://apidocs.marketcheck.com/index Specifies the required headers and the base path for all Marketcheck API calls. ```APIDOC Base Path & Requests: Headers: Key | Value ---|--- Content-Type | "application/json" Base Path All Marketcheck API calls are served under the base path of _/v2_. ``` -------------------------------- ### Marketcheck API General Errors Source: https://apidocs.marketcheck.com/index Lists common HTTP status codes, error messages, and their descriptions encountered when using the Marketcheck API. ```APIDOC General Errors: HTTP Status Code | Error Message | Description ---|---|--- 401 | Invalid authentication credentials | When credentials (API key/ Oauth token) is invalid. 403 | This API endpoint is not accessible within your subscribed package | When attempting to access an endpoint that is not permitted within your subscribed package. 403 | Forbidden | When trying to access an API outside the set origins or allowed endpoints restricted by your account admin. 404 | no Route matched with those values | When attempting to access incorrect endpoints. 429 | API rate limit exceeded | If you run over the rate limit for your subscribed package. 500 | Something went wrong | Server side issue ``` ```json { "message": "no Route matched with those values" } ``` -------------------------------- ### Marketcheck API - Heavy Equipments (US) Endpoints Source: https://apidocs.marketcheck.com/index Provides access to search and data retrieval functionalities for heavy equipment (Yellow Metal) in the US. Includes inventory searches, listing details, and dealer information. ```APIDOC Heavy Equipments / Yellow Metal (US) API Endpoints: Inventory Search: Description: Search active inventory for Heavy equipment. Listing Details: Description: Get one entire listing with all the details to show on VDP. Auto-complete: Description: Auto suggest or complete the users half finished input. Dealer: Description: Search all the Heavy equipment dealerships in US with their sites, address and contact information. ``` -------------------------------- ### Marketcheck API - Recreational Vehicles (US) Endpoints Source: https://apidocs.marketcheck.com/index Provides access to search and data retrieval functionalities for recreational vehicles (RVs) in the US. Includes inventory searches, listing details, and dealer information. ```APIDOC Recreational Vehicles (US) API Endpoints: Inventory Search: Description: Search active inventory for RVs. Listing Details: Description: Get one entire listing with all the details to show on VDP. Auto-complete: Description: Auto suggest or complete the users half finished input. Dealer: Description: Search all the RV dealerships in US with their sites, address and contact information. ``` -------------------------------- ### Marketcheck API - Cars (US & Canada) Endpoints Source: https://apidocs.marketcheck.com/index Provides access to various search and data retrieval functionalities for cars in the US and Canada. Includes inventory searches, listing details, VIN decoding, market statistics, and recall information. ```APIDOC Cars (US & Canada) API Endpoints: Inventory Search: Description: Search active inventory across all dealers in US and Canada. Dealer Active Inventory: Description: Special purpose search API for dealer inventory syndication. Private Party Search: Description: Search cars for sale by individuals or private parties in US and Canada. Auction Inventory Search: Description: Search all auctioned cars for sale. Recent Inventory Search: Description: Search last 90 days inventory from all dealers. Listing Details: Description: Get one entire listing with all the details to show on VDP. Auto-complete: Description: Auto suggest or complete the users half finished input. Cached Images: Description: Fetch car images, cached by Marketcheck of all the listings it has crawled. VIN History: Description: Get all the historic listings for a VIN that Marketcheck has. Dealer: Description: Search all the car dealerships in US and Canada with their sites, address and contact information. VIN Decoder: Description: Decode a 17 digit VIN to get its specs. Enhanced VIN Decoder: Description: Decode a 17 digit VIN to get more detailed specs. Market Days Supply (MDS): Description: Get market supply remaining of a car segment based on its sales in last 45 days. Sales Stats: Description: Get inferred car sales figures and stats for last 90 days. Stats: Description: Get stats on cars for sale right now. Popular Cars: Description: Get most popular cars and their sales statistics on national and local levels for US and Canadian car market. Recalls: Description: Get recall information on a VIN (if any). OEM Incentives: Description: Get car leasing, finance or cash back incentives offered by OEMs to car buyers. ``` -------------------------------- ### Generate OAuth 2.0 Access Token Source: https://apidocs.marketcheck.com/index Generates a short-lived OAuth 2.0 access token by exchanging API key and API secret for a token. This is a prerequisite for accessing protected API resources. ```curl curl --location --request POST \ 'https://mc-api.marketcheck.com/oauth2/token' \ --header 'Content-Type: application/json' \ --data-raw '{ "grant_type": "client_credentials", "client_id": "your_api_key", "client_secret": "your_client_secret" }' ``` -------------------------------- ### Marketcheck API - Motorcycles (US) Endpoints Source: https://apidocs.marketcheck.com/index Provides access to search and data retrieval functionalities for motorcycles in the US. Includes inventory searches, listing details, and dealer information. ```APIDOC Motorcycles (US) API Endpoints: Inventory Search: Description: Search active inventory for Motorcycles. Listing Details: Description: Get one entire listing with all the details to show on VDP. Auto-complete: Description: Auto suggest or complete the users half finished input. Dealer: Description: Search all the motorcycles dealerships in US with their sites, address and contact information. ``` -------------------------------- ### Marketcheck API Deprecation Lifecycle Source: https://apidocs.marketcheck.com/index Explains the key dates in the API deprecation lifecycle: Deprecation Date and Sunset Date. ```APIDOC Deprecation Lifecycle: * Deprecation Date : The date on which the feature or endpoint is marked as deprecated. * Sunset Date : The date on which the feature or endpoint is permanently removed. ``` -------------------------------- ### Marketcheck API Deprecation Notice Headers Source: https://apidocs.marketcheck.com/index Details the headers included in responses when accessing deprecated API versions or endpoints, providing information about deprecation and sunset dates. ```APIDOC Deprecation Notice Headers: * deprecation : The timestamp indicating when the endpoint was officially deprecated. * sunset : The timestamp specifying when the endpoint will be retired. * link : A URL directing to the deprecation section of the API documentation for further details. ``` -------------------------------- ### API Rate Limit Exceeded Error Source: https://apidocs.marketcheck.com/index This JSON structure represents the error response when the API rate limit is exceeded. It includes a status code and a descriptive message. Developers should implement retry mechanisms for such responses. ```json { code: 429, message: "API rate limit exceeded" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.