Introduction
The Mobile Tech RX API Integration allows for the creation of Lead objects within the Mobile Tech RX platform. Lead objects are reviewed by Mobile Tech RX users and can ultimately be converted into Estimates.
Additionally, pricing estimates can be obtained for vehicle damage, which can ultimately be processed into the Leads system.
Each integration with the Mobile Tech RX API has access to an Integration object. This object contains integration specific configurations.
Authentication
Using the API key
curl https://api.mobiletechrx.io/pricing/5fd78f09b022b2b9468b4749 \
-u ${API_KEY}:
All requests to the Mobile Tech RX API require a key in the Authorization header using Basic authentication, or an access token using Bearer authentication. Access tokens can be obtained using an API key.
Note: Basic authentication requires the API key to be encoded to base64.
Keys are typically 64 byte alphanumeric strings, and can be obtained by contacting Mobile Tech RX.
Each key is bound to a single API Integration.
Obtaining an Access Token
Obtaining an Access Token
curl -X POST 'https://api.mobiletechrx.io/authentication/tokens' \
-u ${API_KEY}:
Response JSON
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnQiOiI1ZmQyYzMzNmM0MGUwNDAwMjkxNDY0Y2IiLCJ0b2tlbiI6Inl6d1NJcGNxdWhkc1o2cUl4T2NFUnVITCIsImlhdCI6MTYyNzA1MzA3MSwiZXhwIjoxNjI3MDU2NjcxfQ.i2wV_Vwr2krjGCMY6WTdUFJMk__1U1oamwMTf4ywIzE"
}
Alternatively, a short lived access tokens can be used to access limited amounts of API endpoints. To obtain an access token, a POST request to /authentication/token using an API key must be completed first.
Using an Access Token
Using an Access Token
curl -X POST 'https://api.mobiletechrx.io/leads' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbnQiOiI1ZmQyYzMzNmM0MGUwNDAwMjkxNDY0Y2IiLCJ0b2tlbiI6Inl6d1NJcGNxdWhkc1o2cUl4T2NFUnVITCIsImlhdCI6MTYyNzA1MzA3MSwiZXhwIjoxNjI3MDU2NjcxfQ.i2wV_Vwr2krjGCMY6WTdUFJMk__1U1oamwMTf4ywIzE' \
-H 'Content-Type: application/json' \
-d '{}'
Response JSON
{
"pricing": {
"_id": "60facdd1cdf3021dc815fd9d",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-07-23T14:10:25.134Z"
}
}
To use an access token instead of an API key, include the access token in the Authorization header with the Bearer prefix.
Note: API Requests using access tokens do not have complete access to all MTRX endpoints. Access tokens are also valid for a limited amount of time.
Integrations
Available Endpoints
GET /integrations
PUT /integrations/:id
The Integration resource contains each integration's various configurations. Integrations are bound to the authenticated API key.
Integration Attributes
Example JSON
{
"integration": {
"_id": "5fd2c336c40e0400291464cb",
"name": "Example Integration",
"webhooks": [
{
"event": "leadClaimed",
"url": "https://example.org/webhooks"
}
]
}
}
| Attribute | Description |
|---|---|
| _id | Unique identifier. |
| name | Name for the integration |
| webhooks.event | The event type to trigger a webhook for. See webhook events for more info. |
| webhooks.url | The url to request when the event is triggered. |
Webhooks
Webhooks can be configured to be requested when certain events are triggered. The URLs that are triggered can be modified by updating the Integration object.
Currently available events:
| Event | Description |
|---|---|
| leadClaimed | Triggers when a lead has been claimed by a Mobile Tech RX company. |
| pricingComplete | Triggers when a Pricing request has completed. |
The provided webhook URL be requested with a POST containing that resource's data.
Get Integration
GET /integrations
Example Request
curl 'https://api.mobiletechrx.io/integrations' \
-u '${API_KEY}:'
JSON Response
{
"integration": {
"_id": "5fd2c336c40e0400291464cb",
"name": "Example Integration",
"webhooks": [
{
"event": "leadClaimed",
"url": "https://example.org/webhooks"
}
]
}
}
Retrieves the Integration object associated with the authenticated API key.
Update Integration
PUT /integrations/:id
Example Request
curl -X PUT 'https://api.mobiletechrx.io/integrations' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"webhooks": [{
"event": "leadClaimed",
"url": "https://new.example.org/webhooks"
}]
}'
JSON Response
{
"integration": {
"_id": "5fd2c336c40e0400291464cb",
"name": "Example Integration",
"webhooks": [
{
"event": "leadClaimed",
"url": "https://new.example.org/webhooks"
}
]
}
}
Updates the values for the Integration.
| Attribute | Description | Type |
|---|---|---|
| webhooks.event | The event type to trigger a webhook for. See webhook events for more info. | string |
| webhooks.url | The url to request when the event is triggered. | string |
Pricing
Available Endpoints
POST /pricing
GET /pricing/:id
GET /pricing/:id/upload
The Pricing API is used to obtain pricing estimates for damage on a vehicle. There are two methods of obtaining pricing estimates: by providing photos, or by providing quantitative data describe the damage.
If providing photos, the pricing does not immediately return a result. Once a photo has been uploaded, calculation automatically begins. As results are calculated, the photo's status updates, and any configured webhooks are triggered.
If quantitative data is provided, a result is immediately calculated and returned.
Pricing Attributes
Example JSON
{
"pricing": {
"_id": "6058b89befaf738c0d580729",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:32:43.406Z",
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 22500
}
]
},
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 46000
}
]
},
"photos": [
{
"status": "completed",
"name": "test1",
"output": "https://mtrx-pricing-output-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058b89befaf738c0d580729/api_EeteI8zpT0XXYfONlJcWC8Lnv0ReIb7esUuaai4gej7FnxVC.jpg",
"key": "api_EeteI8zpT0XXYfONlJcWC8Lnv0ReIb7esUuaai4gej7FnxVC.jpg",
"inferences": [
{
"amount": 44151
}
]
}
]
}
}
| Attribute | Description |
|---|---|
| _id | Unique identifier for the Pricing object. |
| integration | The unique identifier of the Integration that the pricing object belongs to. |
| dateCreated | ISO Date of the date/time the Pricing object was created. |
| vehicle.vin | Vin number for the vehicle. |
| vehicle.year | Year number for the vehicle. |
| vehicle.make | Make name for the vehicle. |
| vehicle.model | Model name for the vehicle. |
| hail.matrix | The matrix name being used when calculating Hail estimates. |
| hail.panels.name | The name of the panel being assessed. See Panels. |
| hail.panels.count | Precise number of hail dents on the panel. |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. |
| hail.panels.severity | Severity of the hail damage: dime, nickel, quarter, half. |
| priceADent.matrix | The matrix name being used when calculating Price-a-Dent estimates. |
| priceADent.panels.name | The name of the panel being assessed. See Panels. |
| priceADent.panels.length | Length of dent in inches. |
| priceADent.panels.depth | Depth of dent: 0 (shallow), 1 (medium), 2 (deep). |
| photos.status | The status reflecting the photo's state during calculation: waiting, pending, processing, completed. |
| photos.name | User provided name representing the photo. |
| photos.key | Auto-generated filename for the photo. |
| photos.inferences.amount | The estimated cost to repair the detected damage in USD cents. |
| photos.output | A fully qualified URL to the rendered photo outlining the detected vehicle damage. |
Using Photos to Estimate Prices
Using photos to calculate a price estimate is a multi-step process that involves creating a Pricing object, uploading photos, and waiting for results.
Step 1: Creating a Pricing Object
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"vehicle": {
"vin": "2C3CCACG5CH278240",
"make": "Toyota",
"model": "Sienna",
"year": 2016
}
}'
Step 1: JSON Response
{
"pricing": {
"_id": "6058b8fcefaf738c0d5807e3",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:34:20.625Z",
"vehicle": {
"vin": "1J4RR5GT2BC512008",
"year": 2009,
"make": "Ford",
"model": "F-150"
}
}
}
Step 1: Creating a Pricing Object
First a Pricing object must be initialized with any vehicle data. For more info, see Creating a Pricing Object.
Step 2: Request an Upload Request
curl -X GET 'https://api.mobiletechrx.io/pricing?contentType=image/jpeg&name=example_name' \
-u '${API_KEY}:'
Step 2: JSON Response
{
"signedPutUrl": "https://mtrx-pricing-input-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058b8fcefaf738c0d5807e3/api_7Ho0MMgrPqgLcFxYbaGQmDMqgSrMIeFWYTPMmeqt6BZuN8aX.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1616427588&Signature=kGIhRWnYKuM8FvyvcAkqRxpOarA%3D",
"pricing": {
"_id": "6058b8fcefaf738c0d5807e3",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:34:20.625Z",
"vehicle": {
"vin": "1J4RR5GT2BC512008",
"year": 2009,
"make": "Ford",
"model": "F-150"
},
"photos": [
{
"status": "waiting",
"name": "example_name",
"key": "api_7Ho0MMgrPqgLcFxYbaGQmDMqgSrMIeFWYTPMmeqt6BZuN8aX.jpg"
}
]
}
}
Step 2: Request an Upload Request
Next, retrieve a signed PUT request to use for uploading. See Retrieving a Photo Upload Request for more info.
Step 3: Upload Photo
curl -L -X PUT 'https://mtrx-pricing-input-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058b8fcefaf738c0d5807e3/api_7Ho0MMgrPqgLcFxYbaGQmDMqgSrMIeFWYTPMmeqt6BZuN8aX.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1616427588&Signature=kGIhRWnYKuM8FvyvcAkqRxpOarA%3D' \
-H 'Content-Type: image/jpeg' \
--data-binary 'damage.jpg'
Step 3: Upload Photo
Use the signedPutRequest from Step 2 to upload the photo. The signedPutRequest is only valid temporarily, and it is recommended to upload as soon as possible.
Step 4: Wait For Results
Once the calculation is complete, the pricingCompleted webhook will be triggered. The complete Pricing object will be sent to the configured webhook.
Alternatively, the Pricing object may be polled using Retrieving a Pricing Request, and checking for photos.status to equal "completed".
Once calculated, the photos.inferences array is populated. Each array item represents a piece of damage that has been detected. The resulting computed amount in cents can be found in photos.inferences.amount. A photo outlining the detected damage is also rendered, and a URL can be found at photos.output.
Using Dent Data to Estimate Prices
Example Request
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1
}
]
}
}'
Response JSON
{
"pricing": {
"_id": "6058b944efaf738c0d580828",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:35:32.276Z",
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 46000
}
]
}
}
}
To obtain a price estimate for a dent using data to describe the dent, populate the pricing.priceADent fields when creating a Pricing object. See below for a description of each field.
The result will be added to pricing.priceADent.amount in cents in the response.
| Attribute | Description | Type |
|---|---|---|
| priceADent.panels.name | Required. The name of the panel being assessed. See Panels. | string |
| priceADent.panels.length | Required. Length of dent in inches. Allowable values varies by priceADent.matrix. |
number |
| priceADent.panels.depth | Required. Depth of dent: 0, 1, or 2. (shallow, medium, or deep) |
number |
| priceADent.matrix | The matrix name being used when calculating Price-a-Dent estimates. Defaults to paul_kordon. |
string |
Allowable Matrix Values
The following values includes all possible values for priceADent.matrix, and the corresponding allowed values for priceADent.length.
| padMatrix | panel.priceADent.length |
|---|---|
| paul_kordon | Whole numbers between [1, 30]. |
| daniel_gromm_moto_matrix | Whole numbers between [1, 6]. |
| specialty | Whole numbers between [1, 30]. |
| dave_schaulat_wholesale | Whole numbers between [2, 12]. |
| tactical_dent | 0.75 1.5 2 2.5 3 3.5 4 4.5 5.5 6.5 8 9 10 |
Using Hail Data to Estimate Prices
Example Request
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"severity": "nickel",
"range": {
"min": 18,
"max": 25
}
}
]
}
}'
Response JSON
{
"pricing": {
"_id": "6058b972efaf738c0d580853",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:36:18.433Z",
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 22500
}
]
}
}
}
To obtain a price estimate for a hail damage, populate the pricing.hail fields when creating a Pricing object. See below for a description of each field.
The result will be added to pricing.hail.amount in cents in the response.
Either hail.count or hail.range must be provided. If both are provided, hail.count is used.
| Attribute | Description | Type |
|---|---|---|
| hail.panels.name | Required. The name of the panel being assessed. See Panels. | string |
| hail.panels.severity | Required. Severity of the hail damage: dime, nickel, quarter, half. |
number |
| hail.panels.count | Precise count of hail dents on the panel. Integer values between [1, 400]. |
number |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. Integer values between [1, 399]. |
number |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. Integer values between [2, 400]. |
number |
| hail.matrix | The matrix name being used when calculating Hail estimates. | string |
Allowable Matrix Values
The following values can be used for hail.matrix:
| Value |
|---|
| american_family |
| solutionworks |
| dent_concepts |
| drp_extended |
| dentsmart |
| dent_wizard |
| erie_us |
| farmers |
| geico |
| pdr_linx |
| liberty_mutual |
| drp |
| standard |
| nationwide |
| progressive |
| state_farm |
| specialty |
Creating a Pricing Object
POST /pricing
Example Request
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"vehicle": {
"vin": "2C3CCACG5CH278240",
"make": "Toyota",
"model": "Sienna",
"year": 2016
},
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1
}
]
},
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"severity": "nickel",
"range": {
"min": 18,
"max": 25
}
}
]
}
}'
Response JSON
{
"pricing": {
"_id": "6058b9d3efaf738c0d5808bb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:37:55.120Z",
"vehicle": {
"vin": "2C3CCACG5CH278240",
"year": 2016,
"make": "Toyota",
"model": "Sienna"
},
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 22500
}
]
},
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 46000
}
]
}
}
}
Creates a new Pricing object. The Pricing API currently supports multiple types of pricing: using photos, using price-a-dent data, and using hail damage data.
Attributes
| Attribute | Description | Type |
|---|---|---|
| vehicle.vin | Vin number for the vehicle. | string |
| vehicle.year | Year number for the vehicle. | number |
| vehicle.make | Make name for the vehicle. | string |
| vehicle.model | Model name for the vehicle. | string |
| hail.matrix | The matrix name being used when calculating Hail estimates. | string |
| hail.panels.name | The name of the panel being assessed. See Panels. | string |
| hail.panels.count | Precise number of hail dents on the panel. | number |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. | number |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. | number |
| hail.panels.severity | Severity of the hail damage: dime, nickel, quarter, half. |
string |
| priceADent.matrix | The matrix name being used when calculating Price-a-Dent estimates. | string |
| priceADent.panels.name | The name of the panel being assessed. See Panels. | string |
| priceADent.panels.length | Length of dent in inches. | number |
| priceADent.panels.depth | Depth of dent: 0 (shallow), 1 (medium), 2 (deep). |
number |
| photos.name | User provided name representing the photo. | string |
| photos.key | Auto-generated filename for the photo. | string |
Retrieving a Pricing Request
GET /pricing/:id
Example Request
curl 'https://api.mobiletechrx.io/pricing/6058b9d3efaf738c0d5808bb' \
-u '${API_KEY}:'
Response JSON
{
"pricing": {
"_id": "6058b9d3efaf738c0d5808bb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:37:55.120Z",
"vehicle": {
"vin": "2C3CCACG5CH278240",
"year": 2016,
"make": "Toyota",
"model": "Sienna"
},
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 22500
}
]
},
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 46000
}
]
}
}
}
This endpoint retrieves a Pricing request by _id.
Retrieving a Photo Upload Request
GET /pricing/:id/upload
Example request
curl 'https://api.mobiletechrx.io/pricing/6058b9d3efaf738c0d5808bb/upload?contentType=image/jpeg' \
-u '${API_KEY}:'
Response JSON
{
"signedPutUrl": "https://mtrx-pricing-input-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058b9d3efaf738c0d5808bb/api_ptD8WgwaTGN5kmcoX5f0chgAK1Mpz0lP8itv5PaERkNjxaIC.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1616427817&Signature=tYcT%2B24XMcblJ4%2FyIPycw%2FqMF0c%3D",
"pricing": {
"_id": "6058b9d3efaf738c0d5808bb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:37:55.120Z",
"vehicle": {
"vin": "2C3CCACG5CH278240",
"year": 2016,
"make": "Toyota",
"model": "Sienna"
},
"hail": {
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 22500
}
]
},
"priceADent": {
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 46000
}
]
},
"photos": [
{
"status": "waiting",
"name": "example_name",
"key": "api_ptD8WgwaTGN5kmcoX5f0chgAK1Mpz0lP8itv5PaERkNjxaIC.jpg"
}
]
}
}
This endpoint retrieves a signed PUT request into an AWS S3 bucket. This request can be used to upload photos directly to the Mobile Tech RX S3 bucket.
An entry in pricing.photos will also be added upon making this request. The value for pricing.photos.status will initially be waiting. Once the photo has been uploaded, the status will change to pending. As soon as the calculation begins, the status will change to processing. Finally, once the calculation is complete, the status will update to completed, and any configured pricingCompleted webhook will be triggered.
| Query Parameter | Description |
|---|---|
| contentType | Required. The content type of the photo being uploaded: image/jpeg or image/png. |
| panel | The panel included in the photo. See Panels. |
| name | User provided name to attach to the photo for future reference. |
Leads
Available Endpoints
POST /leads
GET /leads/:id
PUT /leads/:id
GET /leads/:id/upload
POST /leads/submit
DELETE /leads/:id
Leads contain data describing damage on a vehicle as well as customer (client) information. Leads can be placed in a marketplace for eligible Mobile Tech RX companies to claim. Leads can also be marked as being available only to a specific Mobile Tech RX company.
Leads are not available to be claimed until they are submitted.
Lead Attributes
Example JSON
{
"lead": {
"_id": "6058b605efaf738c0d5800e6",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"hail": {
"total": 12500,
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 12500
}
]
},
"priceADent": {
"total": 60000,
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 50000
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 10000
}
]
},
"detail": {
"packages": [{
"name": "Example package",
"description": "This is an example description for a package.",
"amount": 30000
}],
"services": [{
"name": "Example service",
"description": "This is an example description for a service.",
"amount": 10000
}]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 72500,
"dateCreated": "2021-03-22T15:21:41.635Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"hail",
"priceADent"
]
}
}
| Attribute | Description |
|---|---|
| _id | Unique identifer. |
| client.name | Name of the client managing the vehicle. |
| client.phone | Client phone number. |
| client.email | Client email address. |
| client.street | Client street address. |
| client.city | Client city. |
| client.state | Client state. |
| client.zip | Client zip. |
| vehicle.year | Year number for the vehicle. |
| vehicle.make | Name of the make for the vehicle. |
| vehicle.model | Name of the model for the vehicle. |
| vehicle.vin | Vehicle's VIN number. |
| photos.panel | Panel name of the photo. See Panels. |
| photos.name | User provided name to attach to the photo for future reference. |
| photos.key | Auto-generated filename for the photo. |
| priceADent.matrix | The matrix name that was used to calculate the amount. |
| priceADent.panels.name | Panel name for the PriceADent damage. See Panels. |
| priceADent.panels.length | Length of dent in inches. |
| priceADent.panels.depth | Depth of dent: 0 (shallow), 1 (medium), 2 (deep). |
| priceADent.panels.amount | The amount to repair the panel in USD cents. |
| hail.matrix | The matrix name that was used to calculate the amount. |
| hail.panels.name | Panel name for the Hail damage. See Panels. |
| hail.panels.count | Precise number of hail dents on the panel. |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. |
| hail.panels.severity | Severity of the hail damage: dime, nickel, quarter, half. |
| hail.panels.amount | The amount to repair the panel in USD cents. |
| detail.packages.name | The name of the detail package. |
| detail.packages.description | A description of the detail package. |
| detail.packages.amount | The USD amount of the cost for the package. |
| detail.services.name | The name of the detail service. |
| detail.services.description | A description of the detail service. |
| detail.services.amount | The USD amount of the cost for the service. |
| notes | Notes about the vehicle, viewable by the Mobile Tech RX companies. |
| claimedBy | The Mobile Tech RX company that has claimed the Lead. |
| integration | The Integration ID that owns the Lead. |
| targetCompany | The Mobile Tech RX company that has the capability to claim the Lead. |
| total | The total USD amount in cents for the Lead. |
| dateCreated | The ISO date/time when the Lead was created. |
| status | The status of the Lead: incomplete, available, claimed, completed. |
| location.coordinates | The coordinates where the vehicle resides. [longitude, latitude] |
Panels
The string values below represent all the allowed values for vehicle panel names when working with Leads and Pricing objects.
| Value | Description |
|---|---|
| entire_vehicle | Entire vehicle. |
| front_bumper | Front bumper. |
| cowl | Cowl. |
| hood | Hood. |
| lt_fender | Left fender. |
| rt_fender | Right fender. |
| lt_front_door | Left front door. |
| rt_front_door | Right front door. |
| lt_roof_rail | Left roof rail. |
| rt_roof_rail | Right roof rail. |
| roof | Roof. |
| rt_rear_door | Right rear door. |
| lt_rear_door | Left rear door. |
| lt_cab_corner | Left cab corner. |
| rt_cab_corner | Right cab corner. |
| lt_quarter | Left quarter. |
| rt_quarter | Right quarter. |
| lt_bedside | Left bedside. |
| rt_bedside | Right bedside. |
| hatch | Hatch. |
| tailgate | Tailgate. |
| trunk | Trunk. |
| rear_bumper | Rear bumper. |
Creating a Lead
POST /leads
Example Request
curl -X POST 'https://api.mobiletechrx.io/leads' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"client": {
"name": "Fred Wilson",
"city": "San Antonio",
"state": "TX",
"street": "123 Main St",
"zip": "78704"
},
"vehicle": {
"make": "Ford",
"model": "F-150",
"year": 2009
},
"priceADent": {
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 10000
}
]
},
"photos": [
{
"key": "g0jBBNLfPzDKGOsjbkazgrLgyEVbU6AvAQbK7U9dADAB5Ndd.jpg",
"name": "example_name"
}
]
}'
Response JSON
{
"lead": {
"_id": "6058ab7d47de44709c07aeb2",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Ford",
"model": "F-150"
},
"priceADent": {
"total": 10000,
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 10000
}
]
},
"photos": [
{
"name": "example_name",
"key": "g0jBBNLfPzDKGOsjbkazgrLgyEVbU6AvAQbK7U9dADAB5Ndd.jpg"
}
],
"integration": "5fd2c336c40e0400291464cb",
"total": 10000,
"dateCreated": "2021-03-22T14:36:44.529Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"priceADent"
]
}
}
Creates a new Lead. All fields are optional for creation.
If location.coordinates is not provided, and client address data is provided, the location.coordinates will be calculated automatically.
| Attribute | Description | Type |
|---|---|---|
| client.name | Name of the client managing the vehicle. | string |
| client.phone | Client phone number. | string |
| client.email | Client email address. | string |
| client.street | Client street address. | string |
| client.city | Client city. | string |
| client.state | Client state. | string |
| client.zip | Client zip. | string |
| notes | Notes on the vehicle, viewable by the Mobile Tech RX companies. | string |
| vehicle.year | Year number for the vehicle. | number |
| vehicle.make | Name of the make for the vehicle. | string |
| vehicle.model | Name of the model for the vehicle. | string |
| vehicle.vin | Vehicle's VIN number. | string |
| photos.name | User provided name to attach to the photo for future reference. | string |
| photos.key | Auto-generated filename for the photo. Any photos.key values obtained from the Pricing API can be included here to re-use photos. |
string |
| priceADent.matrix | The matrix name that was used to calculate the amount. | string |
| priceADent.panels.name | Panel name for the PriceADent damage. See Panels. | string |
| priceADent.panels.length | Length of dent in inches. | number |
| priceADent.panels.depth | Depth of dent: 0 (shallow), 1 (medium), 2 (deep). |
number |
| priceADent.panels.amount | The amount to repair the panel in USD cents. | number |
| hail.matrix | The matrix name that was used to calculate the amount. | string |
| hail.panels.name | Panel name for the Hail damage. See Panels. | string |
| hail.panels.count | Precise number of hail dents on the panel. | number |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. | number |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. | number |
| hail.panels.severity | Severity of the hail damage: dime, nickel, quarter, half. |
string |
| hail.panels.amount | The amount to repair the panel in USD cents. | number |
| detail.packages.name | The name of the detail package. | string |
| detail.packages.description | A description of the detail package. | string |
| detail.packages.amount | The USD amount of the cost for the package. | number |
| detail.services.name | The name of the detail service. | string |
| detail.services.description | A description of the detail service. | string |
| detail.services.amount | The USD amount of the cost for the service. | number |
| targetCompany | The Mobile Tech RX company that has the capability to claim the Lead. | string |
| total | The total USD amount in cents for the Lead. | number |
| location.coordinates | The coordinates where the vehicle resides. [longitude, latitude] |
[number] |
Retrieving a Lead
GET /leads/:id
Example Request
curl 'https://api.mobiletechrx.io/leads/6058ac0f47de44709c07aeb3' \
-u '${API_KEY}:'
Response JSON
{
"lead": {
"_id": "6058ac0f47de44709c07aeb3",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2016,
"make": "Honda",
"model": "Civic"
},
"hail": {
"total": 12500,
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 12500
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 12500,
"dateCreated": "2021-03-22T14:39:10.677Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"hail"
]
}
}
Retrieves an existing Lead by it's _id.
Updating a Lead
PUT /leads/:id
Example Request
curl -X PUT 'https://api.mobiletechrx.io/leads/60182d7f4a0f030d41204831' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
--data-raw '{
"client": {
"zip": "78735"
},
"photos": [
{
"key": "g0jBBNLfPzDKGOsjbkazgrLgyEVbU6AvAQbK7U9dADAB5Ndd.jpg",
"name": "example_name"
},
{
"key": "mt9H81aIOTqIg6UuVVNOv1cVm7ocRvR6EKBl6ShJdkUeVdSm.jpg",
"name": "example_name_2"
}
]
}'
Response JSON
{
"lead": {
"_id": "6058b2e0efaf738c0d57ef99",
"client": {
"zip": "78735"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"hail": {
"total": 12500,
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 12500
}
]
},
"priceADent": {
"total": 60000,
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 50000
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 10000
}
]
},
"photos": [
{
"name": "example_name",
"key": "g0jBBNLfPzDKGOsjbkazgrLgyEVbU6AvAQbK7U9dADAB5Ndd.jpg"
},
{
"name": "example_name_2",
"key": "mt9H81aIOTqIg6UuVVNOv1cVm7ocRvR6EKBl6ShJdkUeVdSm.jpg"
}
],
"integration": "5fd2c336c40e0400291464cb",
"total": 72500,
"dateCreated": "2021-03-22T15:08:15.447Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"hail",
"priceADent"
]
}
}
Updates an existing Lead.
| Attribute | Description | Type |
|---|---|---|
| client.name | Name of the client managing the vehicle. | string |
| client.phone | Client phone number. | string |
| client.email | Client email address. | string |
| client.street | Client street address. | string |
| client.city | Client city. | string |
| client.state | Client state. | string |
| client.zip | Client zip. | string |
| notes | Notes on the vehicle, viewable by the Mobile Tech RX companies. | string |
| vehicle.year | Year number for the vehicle. | number |
| vehicle.make | Name of the make for the vehicle. | string |
| vehicle.model | Name of the model for the vehicle. | string |
| vehicle.vin | Vehicle's VIN number. | string |
| photos.name | User provided name to attach to the photo for future reference. | string |
| photos.key | Auto-generated filename for the photo. Any photos.key values obtained from the Pricing API can be included here to re-use photos. |
string |
| priceADent.matrix | The matrix name that was used to calculate the amount. | string |
| priceADent.panels.name | Panel name for the PriceADent damage. See Panels. | string |
| priceADent.panels.length | Length of dent in inches. | number |
| priceADent.panels.depth | Depth of dent: 0 (shallow), 1 (medium), 2 (deep). |
number |
| priceADent.panels.amount | The amount to repair the panel in USD cents. | number |
| hail.matrix | The matrix name that was used to calculate the amount. | string |
| hail.panels.name | Panel name for the Hail damage. See Panels. | string |
| hail.panels.count | Precise number of hail dents on the panel. | number |
| hail.panels.range.min | Lower bound for the number of hail dents on the panel. | number |
| hail.panels.range.max | Upper bound for the number of hail dents on the panel. | number |
| hail.panels.severity | Severity of the hail damage: dime, nickel, quarter, half. |
string |
| hail.panels.amount | The amount to repair the panel in USD cents. | number |
| detail.packages.name | The name of the detail package. | string |
| detail.packages.description | A description of the detail package. | string |
| detail.packages.amount | The USD amount of the cost for the package. | number |
| detail.services.name | The name of the detail service. | string |
| detail.services.description | A description of the detail service. | string |
| detail.services.amount | The USD amount of the cost for the service. | number |
| total | The total USD amount in cents for the Lead. | number |
| targetCompany | The Mobile Tech RX company that has the capability to claim the Lead. | string |
| location.coordinates | The coordinates where the vehicle resides. [longitude, latitude] |
[number] |
Retrieving an Upload Request
GET /leads/:id/vehicles/:id/upload
Example Request
curl 'https://api.mobiletechrx.io/leads/5fdd16c2fdd8e1147a510906/vehicles/5fdd16c6fdd8e1147a510908/upload?contentType=image/jpeg' \
-u '${API_KEY}:'
Response JSON
{
"signedRequestUrl": "https://mobiletechrxus.s3.amazonaws.com/Panel_5fd2c336c40e0400291464cb_1608325190920.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1608325490&Signature=NyWB6Rt1ufQj%2F3MAOzshiYR3IqU%3D"
}
This endpoint retrieves a signed PUT request into an AWS S3 bucket. This request can be used to upload photos.
An entry in vehicle.photos will also be added for the respective pricing object.
| Query Parameter | Description |
|---|---|
| contentType | Required. The content type of the photo being uploaded: image/jpeg or image/png. |
| panel | The panel included in the photo. See Panels. |
| name | User provided name to attach to the photo for future reference. |
Submitting a Lead
POST /leads/:id/submit
Example Request
curl -X POST 'https://api.mobiletechrx.io/leads/6058b319efaf738c0d57f544/submit' \
-u '${API_KEY}:'
Response JSON
{
"lead": {
"_id": "6058b319efaf738c0d57f544",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"hail": {
"total": 12500,
"matrix": "farmers",
"panels": [
{
"name": "lt_roof_rail",
"range": {
"min": 18,
"max": 25
},
"severity": "nickel",
"amount": 12500
}
]
},
"priceADent": {
"total": 60000,
"matrix": "specialty",
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 50000
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 10000
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 72500,
"dateCreated": "2021-03-22T15:09:12.787Z",
"status": "available",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"hail",
"priceADent"
]
}
}
Submitting a Lead marks the Lead as available to be claimed. If targetCompany is set, the Lead will be made available only to that specific Mobile Tech RX company. Otherwise, the Lead will be made available to the Mobile Tech RX marketplace.
No body parameters are used on this request.
To be submitted, the Lead requires a total, location.coordinates, and client data.
Deleting a Lead
DELETE /leads/:id
Example Request
curl -X POST 'https://api.mobiletechrx.io/leads/6058b347efaf738c0d57fae6/delete' \
-u '${API_KEY}:'
Response JSON
{
"lead": {
"_id": "6058b347efaf738c0d57fae6",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"integration": "5fd2c336c40e0400291464cb",
"total": 0,
"dateCreated": "2021-03-22T15:09:58.881Z",
"status": "deleted",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": []
}
}
Marks the Lead as deleted.
This endpoint can only be used on Leads with a status of available or incomplete.
Example Workflows
In this section, we've done our best to include common example workflows, and how to interact with our API.
Estimating Price With Photos, Sending to Marketplace for Repair
This workflow starts by creating a Pricing object. Then photos of damage are uploaded. Next, a Lead is created using the Pricing data. Finally, the Lead is submitted and made available to the marketplace to be claimed.
Step 1: Initialize a Pricing Object
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:'
Step 1: Response JSON
{
"pricing": {
"_id": "6058ba3befaf738c0d5808cb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:39:39.141Z"
}
}
Step 1: Initialize a Pricing Object
First create a Pricing object. We will use this Pricing object to track the progress of pricing calculations.
Step 2: Request for a Signed Photo Upload Request
curl 'https://api.mobiletechrx.io/pricing/6058ba3befaf738c0d5808cb/upload?contentType=image/jpeg&name=front_1' \
-u '${API_KEY}:'
Step 2: Response JSON
{
"signedPutUrl": "https://mtrx-pricing-input-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058ba3befaf738c0d5808cb/api_tJNUr4gyqWCF7Gkhxbaf4EgENfhr1DTfsdoDicNkGV1tftZb.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1616427894&Signature=Th0JJlS%2F93u1GQm%2FAkykdnDZEl4%3D",
"pricing": {
"_id": "6058ba3befaf738c0d5808cb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:39:39.141Z",
"photos": [
{
"status": "waiting",
"name": "example_name",
"key": "api_tJNUr4gyqWCF7Gkhxbaf4EgENfhr1DTfsdoDicNkGV1tftZb.jpg"
}
]
}
}
Step 2: Request for a Signed Photo Upload Request
Next we, request for a signed PUT request to use for uploading. This signed PUT request allows uploading directly to the Mobile Tech RX S3 bucket. In this example, we provide the name query parameter of front_1. The name parameter is optional, and is only used to track specific photos using a user provided identifier.
The value for pricing.photos.status will be waiting until the photo is uploaded.
Step 3: Upload the Photo
curl -L -X PUT 'https://mtrx-pricing-input-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058ba3befaf738c0d5808cb/api_tJNUr4gyqWCF7Gkhxbaf4EgENfhr1DTfsdoDicNkGV1tftZb.jpg?AWSAccessKeyId=AKIAINXIPOD7ZSAR7ODQ&Content-Type=image%2Fjpeg&Expires=1616427894&Signature=Th0JJlS%2F93u1GQm%2FAkykdnDZEl4%3D' \
-H 'Content-Type: image/jpeg' \
--data-binary 'front_1.jpg'
Step 3: Upload the Photo
In this step, the photo is uploaded using the signedPutRequest from Step 2.
Once uploaded, the value of pricing.photos.status will change to pending. Once the calculation begins, the value will change to processing.
Note: Steps 2 and 3 may be repeated for additional photos.
Step 4: Polling for Results
curl 'https://api.mobiletechrx.io/pricing/6058ba3befaf738c0d5808cb' \
-u '${API_KEY}:'
Step 4: Response JSON
{
"pricing": {
"_id": "6058ba3befaf738c0d5808cb",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:39:39.141Z",
"photos": [
{
"status": "completed",
"name": "example_name",
"output": "https://mtrx-pricing-output-prod.s3.amazonaws.com/5fd2c336c40e0400291464cb/6058ba3befaf738c0d5808cb/api_tJNUr4gyqWCF7Gkhxbaf4EgENfhr1DTfsdoDicNkGV1tftZb.jpg",
"key": "api_tJNUr4gyqWCF7Gkhxbaf4EgENfhr1DTfsdoDicNkGV1tftZb.jpg",
"inferences": [
{
"amount": 23296
},
{
"amount": 45394
}
]
}
]
}
}
Step 4: Wait For Completion
During this step, results can either be polled for, or a webhook can be configured for the event pricingCompleted. This webhook will be triggered as soon as pricing is completed for the photo: pricing.photos.status will be set to completed.
Pricing amount estimates for each detected damage will be set in pricing.photos.inferences.amount, and pricing.photos.output will hold the URL of a rendered photo outlining the detected damage.
Step 5: Create a Lead Using the Returned Data
curl -X POST 'https://api.mobiletechrx.io/leads' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"client": {
"name": "Fred Wilson",
"city": "San Antonio",
"state": "TX",
"street": "123 Main St",
"zip": "78704"
},
"vehicle": {
"make": "Honda",
"model": "Civic",
"year": 2009
},
"priceADent": {
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 23296
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 45394
}
]
}
}'
Step 5: Response JSON
{
"lead": {
"_id": "6058b6eaefaf738c0d5800ec",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"priceADent": {
"total": 68690,
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 23296
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 45394
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 68690,
"dateCreated": "2021-03-22T15:25:29.438Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"priceADent"
]
}
}
Step 5: Create a Lead Using the Returned Data
This step creates a Lead which includes the two amounts from the Pricing results from Step 4. We also include Client information.
Since photos were already uploaded, the same key can be used, so uploading twice is not necessary.
Step 6: Submit the Lead to the Marketplace
curl -X POST 'https://api.mobiletechrx.io/leads/6058b6eaefaf738c0d5800ec/submit' \
-u '${API_KEY}:'
Step 6: Response JSON
{
"lead": {
"_id": "6058b6eaefaf738c0d5800ec",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "San Antonio",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Honda",
"model": "Civic"
},
"priceADent": {
"total": 68690,
"panels": [
{
"name": "hood",
"length": 2,
"depth": 1,
"amount": 23296
},
{
"name": "hood",
"length": 1,
"depth": 1,
"amount": 45394
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 68690,
"dateCreated": "2021-03-22T15:25:29.438Z",
"status": "available",
"location": {
"type": "Point",
"coordinates": [
-98.49402909999999,
29.4259424
]
},
"services": [
"priceADent"
]
}
}
Step 6: Submit the Lead to the Marketplace
By submitting the Lead, the lead.status changes to available.
The Lead is now available for eligible Mobile Tech RX vendors within 25 miles of the Lead client.
During this time the Lead can be deleted, but once the Lead has been claimed (lead.status will be claimed) the Lead cannot be deleted.
When the Lead has been claimed, the leadClaimed webhook will be triggered.
Estimating Price With Dent Data, Sending to Preferred Vendor for Repair
This workflow starts with a Price-a-Dent price estimate. Then a Lead is created using the price data. The Lead's targetCompany is set to a specific Mobile Tech RX vendor. Finally, the Lead is submitted and made available to be claimed.
Step 1: Request a New Price Estimate
curl -X POST 'https://api.mobiletechrx.io/pricing' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"priceADent": {
"matrix": "paul_kordon",
"panels": [
{
"name": "roof",
"length": 1,
"depth": 1
},
{
"name": "roof",
"length": 2,
"depth": 2
}
]
}
}'
Step 1: Response JSON
{
"pricing": {
"_id": "6058bafbefaf738c0d580973",
"integration": "5fd2c336c40e0400291464cb",
"dateCreated": "2021-03-22T15:42:50.951Z",
"priceADent": {
"matrix": "paul_kordon",
"panels": [
{
"name": "roof",
"length": 1,
"depth": 1,
"amount": 17768
},
{
"name": "roof",
"length": 2,
"depth": 2,
"amount": 26780
}
]
}
}
}
Step 1: Request a New Price Estimate
First, request a price estimate by Using Dent Data to Estimate Prices with priceADent data. This will immediately return an estimate in USD cents. The estimate per panel will be the value of pricing.priceADent.amount.
Determine if the price estimate is acceptable. If so, proceed to the next step.
Step 2: Create a New Lead Using the Price Estimate Data
curl -X POST 'https://api.mobiletechrx.io/leads' \
-u '${API_KEY}:' \
-H 'Content-Type: application/json' \
-d '{
"client": {
"name": "Fred Wilson",
"city": "Austin",
"state": "TX",
"street": "123 Main St",
"zip": "78704"
},
"vehicle": {
"make": "Ford",
"model": "F-150",
"year": 2009
},
"priceADent": {
"panels": [
{
"name": "roof",
"length": 1,
"depth": 1,
"amount": 17768
},
{
"name": "roof",
"length": 2,
"depth": 2,
"amount": 26780
}
]
},
"targetCompany": "5e5096d8a931774bd4c98491"
}'
Step 2: Response JSON
{
"lead": {
"_id": "6058b597efaf738c0d5800d6",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Ford",
"model": "F-150"
},
"priceADent": {
"total": 44548,
"panels": [
{
"name": "roof",
"length": 1,
"depth": 1,
"amount": 17768
},
{
"name": "roof",
"length": 2,
"depth": 2,
"amount": 26780
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 44548,
"dateCreated": "2021-03-22T15:19:50.898Z",
"status": "incomplete",
"location": {
"type": "Point",
"coordinates": [
-97.7597581,
30.3073604
]
},
"targetCompany": "5e5096d8a931774bd4c98491",
"services": [
"priceADent"
]
}
}
Step 2: Create a New Lead Using the Price Estimate Data
The next step is to Create a New Lead from the Pricing Object.
Optionally, include any additional information you would like to set on the newly created Lead object.
We also set targetCompany to "5e5096d8a931774bd4c98491". When submitted, the Lead will be available only to that specific Mobile Tech RX company.
Note: this step only creates the Lead in our system. To make the Lead available to be claimed, see the next step to submit the Lead.
Step 3: Submit the Lead To Be Claimed
curl -X POST 'https://api.mobiletechrx.io/leads/6058b597efaf738c0d5800d6/submit' \
-u '${API_KEY}:'
Step 3: Response JSON
{
"lead": {
"_id": "6058b597efaf738c0d5800d6",
"client": {
"name": "Fred Wilson",
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"zip": "78704"
},
"vehicle": {
"year": 2009,
"make": "Ford",
"model": "F-150"
},
"priceADent": {
"total": 44548,
"panels": [
{
"name": "roof",
"length": 1,
"depth": 1,
"amount": 17768
},
{
"name": "roof",
"length": 2,
"depth": 2,
"amount": 26780
}
]
},
"integration": "5fd2c336c40e0400291464cb",
"total": 44548,
"dateCreated": "2021-03-22T15:19:50.898Z",
"status": "available",
"location": {
"type": "Point",
"coordinates": [
-97.7597581,
30.3073604
]
},
"targetCompany": "5e5096d8a931774bd4c98491",
"services": [
"priceADent"
]
}
}
Step 3: Submit the Lead to the Preferred Vendors
By submitting the Lead, the lead.status changes to available.
The Lead is now available for the Mobile Tech RX vendor that is specified in lead.targetCompany.
During this time the Lead can be deleted, but once the Lead has been claimed (lead.status will be claimed) the Lead cannot be deleted.
When the Lead has been claimed, the leadClaimed webhook will be triggered.