# Quantiv API

Welcome to the Quantiv API documentation! 

The Quantiv API empowers developers with seamless access to powerful data-driven solutions. Our suite of APIs enables you to efficiently interact with key resources, automate processes, and enhance your applications with reliable insights.

Whether you're integrating property intelligence, optimizing lead quality assessments, or leveraging advanced data analytics, Quantiv provides the tools you need to drive smarter decisions and maximize efficiency.

Get started today and unlock the full potential of our APIs!

### 🧐 Overview
  
The Quantiv API is organized around REST principles, utilizing standard HTTP methods, response codes, and authentication. It accepts requests with a JSON body and returns responses in JSON format. The API only supports HTTPS-secured communication. Standard HTTP status codes are used to indicate request outcomes. Error responses include `error`, `statusCode`, and `message` fields for clear debugging.
### 🌐 Endpoint
  The Quantiv API uses a single endpoint for both sandbox and production environments.
   | Environment | Endpoint URL                            |
   |-------------|-----------------------------------------|
   | Sandbox    | [https://public-api.quantiv.io](https://public-api.quantiv.io) |
   | Production | [https://public-api.quantiv.io](https://public-api.quantiv.io) |

### 🔐 Authentication

You will be provided with two API keys. The key with the `sandbox` prefix should be used for requests to the sandbox environment, while the key with the `production` prefix should be used for requests to the production environment.  

The API key must be included in the `token` request header for each API request.

### 📝 Response Status Codes
  
The Quantiv API follows standard HTTP response codes to communicate the outcome of an API request. Generally, codes in the 200 range represent successful requests, codes in the 400 range indicate errors in the request, and codes in the 500 range denote server-side issues.

  | Status Code | Status Message        | Description                                    |
  |-------------|-----------------------|------------------------------------------------|
  | 200         | Success               | The request was successfully processed.        |
  | 400         | Bad Request           | The request was malformed or had invalid syntax. |
  | 401         | Unauthorized          | The provided authentication credentials were invalid. |
  | 404         | Not Found             | The requested resource could not be located.   |
  | 500         | Internal Server Error | An error occurred on the server while processing the request. |

### ⚠️ Business Errors

The Quantiv API returns a status code of **400 Bad Request** for business-related errors. The response will include the details of the error, as outlined in the table below.

  | Case                              | Error        | StatusCode | Message                                                           |
  |-----------------------------------|--------------|------------|-------------------------------------------------------------------|
  | Incorrect Payment Status         | Bad Request  | 400        | Account is paused due to failed payment. Contact Quantiv Admin.   |
  | Inactive API Product Triggered   | Bad Request  | 400        | Product is not activated. Contact Quantiv Admin.                  |
  | Reaching API Usage Limit         | Bad Request  | 400        | API Monthly Limit is reached. Contact Quantiv Admin.              |
  | Reaching $0 Account Balance      | Bad Request  | 400        | Insufficient Account Balance to process request. Contact Quantiv Admin. |


Version: 1.0.0

## Servers

```
https://public-api.quantiv.io
```

## Download OpenAPI description

 - [Quantiv API](https://docs.quantiv.io/_bundle/API/openapi.yaml)

## Lead Append Level 1

 - [GET /api/v1/address-info](https://docs.quantiv.io/api/openapi/lead-append-level-1/paths/~1api~1v1~1address-info/get.md)
## Lead Append Level 2

 - [GET /api/v1/address-info-v2](https://docs.quantiv.io/api/openapi/lead-append-level-2/paths/~1api~1v1~1address-info-v2/get.md)
## Buyer Insights

 - [GET /api/v1/buyer-insights](https://docs.quantiv.io/api/openapi/buyer-insights/paths/~1api~1v1~1buyer-insights/get.md)
## Lead Value - Roof

 - [GET /api/v1/roof-estimate](https://docs.quantiv.io/api/openapi/lead-value-roof/paths/~1api~1v1~1roof-estimate/get.md)
## GoSolar Index

 - [GET /api/v1/gosolar-index](https://docs.quantiv.io/api/openapi/gosolar-index/paths/~1api~1v1~1gosolar-index/get.md)
## Utility Bill

 - [GET /api/v1/utility-bill](https://docs.quantiv.io/api/openapi/utility-bill/paths/~1api~1v1~1utility-bill/get.md)
## EngagePro™ - Lead Widget

 - [POST /api/v1/roof-estimate-widget](https://docs.quantiv.io/api/openapi/engageprotm-lead-widget/paths/~1api~1v1~1roof-estimate-widget/post.md): Creates the EngagePro™ - Lead Widget configuration.
 - [PUT /api/v1/roof-estimate-widget/{referenceId}](https://docs.quantiv.io/api/openapi/engageprotm-lead-widget/paths/~1api~1v1~1roof-estimate-widget~1%7Breferenceid%7D/put.md): Updates the EngagePro™ - Lead Widget configuration.
 - [GET /api/v1/roof-estimate-widget/{referenceId}](https://docs.quantiv.io/api/openapi/engageprotm-lead-widget/paths/~1api~1v1~1roof-estimate-widget~1%7Breferenceid%7D/get.md): Retrieves the EngagePro™ - Lead Widget configuration.
 - [PATCH /api/v1/roof-estimate-widget/{referenceId}/upload-logos](https://docs.quantiv.io/api/openapi/engageprotm-lead-widget/paths/~1api~1v1~1roof-estimate-widget~1%7Breferenceid%7D~1upload-logos/patch.md): Uploads header and footer logos for the EngagePro™ - Lead Widget configuration.
## Widget Webhooks

 - [POST /api/v1/webhooks](https://docs.quantiv.io/api/openapi/widget-webhooks/paths/~1api~1v1~1webhooks/post.md): Creates a webhook to listen for events related to widgets.
 - [GET /api/v1/webhooks](https://docs.quantiv.io/api/openapi/widget-webhooks/paths/~1api~1v1~1webhooks/get.md): Retrieves all created webhooks.
 - [PATCH /api/v1/webhooks/{webhookId}](https://docs.quantiv.io/api/openapi/widget-webhooks/paths/~1api~1v1~1webhooks~1%7Bwebhookid%7D/patch.md): Updates existing webhook.
 - [DELETE /api/v1/webhooks/{webhookId}](https://docs.quantiv.io/api/openapi/widget-webhooks/paths/~1api~1v1~1webhooks~1%7Bwebhookid%7D/delete.md): Deletes existing webhook.
