Constructor
new CarfaxServer(sdk, serverUrl, opts)
Create a new Carfax instance.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdk |
ShelfNetwork
|
Parent SDK instance. |
||||||||||||||||||||
serverUrl |
string
|
Carfax URL. |
||||||||||||||||||||
opts |
Object
|
|
Classes
Methods
checkVin(vin) → {Promise.<JsonApiResponse>}
Free VIN check.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
vin |
string
|
Vehicle identification number. |
createDeposit(depositOptionId, platformIdopt) → {Promise}
Create deposit for top-up
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
depositOptionId |
|||
platformId |
<optional> |
Returns:
- Type:
-
Promise
createSubscription(opts) → {Promise.<JsonApiResponse>}
Create Carfax subscription.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
opts |
|
generatePromoCodes(quantity, expireAt) → {Promise}
Generate carfax promo-codes. Requires Admin's permissions.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number
|
Amount of codes to generate. |
expireAt |
string
|
Promo codes expiration date. |
Returns:
- Type:
-
Promise
getBalance(accountIdopt, platformIdopt) → {Promise.<JsonApiResponse>}
Get Carfax reports balance.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
accountId |
string
|
<optional> |
Requester account ID. |
platformId |
string
|
<optional> |
Platform ID. |
getDepositOptions(platformIdopt) → {Promise.<JsonApiResponse>}
Get Carfax reports deposit options for top up.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
platformId |
string
|
<optional> |
Platform ID. |
getDocumentUrl(documentId) → {string}
Get Carfax document URL.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
documentId |
string
|
Carfax report document ID |
Returns:
- Type:
-
string
Carfax report document URL.
getReportById(id, accessTokenopt) → {Promise.<JsonApiResponse>}
Get Carfax report by its ID.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string
|
Carfax report ID |
|
accessToken |
string
|
<optional> |
Use the report's access token. |
getReportsPage(queryopt) → {Promise.<JsonApiResponse>}
Get Carfax reports list page.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
query |
Object
|
<optional> |
Request query
|
getSubscription(subscriptionId) → {Promise.<JsonApiResponse>}
Get Carfax subscription by ID.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
subscriptionId |
string
|
Carfax subscription ID. |
getSubscriptionToken(subscriptionId) → {Promise.<JsonApiResponse>}
Get Carfax subscription token by subscription ID.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
subscriptionId |
string
|
Carfax subscription ID. |
invalidateSubscriptionToken(subscriptionId) → {Promise.<JsonApiResponse>}
Delete Carfax subscription token by subscription ID.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
subscriptionId |
string
|
Carfax subscription ID. |
requestReport(opts) → {Promise.<JsonApiResponse>}
Request Carfax report.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object
|
|
updateBalance(accountId, availableReports, platformIdopt) → {Promise.<JsonApiResponse>}
Update user Carfax reports balance. Allowed by admin only.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
accountId |
string
|
Target account ID. |
|
availableReports |
number
|
New balance value. |
|
platformId |
string
|
<optional> |
Platform ID. |
updateSubscription(subscriptionId, opts) → {Promise.<JsonApiResponse>}
Update Carfax subscription by ID.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
subscriptionId |
string
|
Carfax subscription ID. |
|||||||||
opts |
|