Lead API (1.0)

Download OpenAPI specification:Download

Introduction

Lead API allows an agent to view all the leads received for his/her agency offices.

Initially, the leads are received from Etuovi.com and they are viewing only. In the future, this API will be extended to manage leads arriving from several sources.

Contact

If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.

Error codes

Below is the summary of most common error codes included in the response's errorCode field.

HTTP status code Error code Meaning
400 BAD_REQUEST_PARAMETERS Invalid request with e.g. missing mandatory parameters.
400 BAD_REQUEST_BODY Invalid request body with e.g. missing mandatory fields.
400 VALUE_REQUIRED Mandatory value missing for the request.
400 INVALID_TYPE Invalid data type provided for the value in the request.
400 INVALID_STATUS Unable to perform the request operation due to invalid state.
401 UNAUTHORIZED Unauthorized request.
404 INVALID_ID Missing or invalid identifier.
404 INVALID_API_KEY Missing or invalid API key.
415 UNSUPPORTED_MEDIA_TYPE Unsupported media type.
500 TECHNICAL_ERROR A technical error has occurred.

Authentication

bearerAuth

Lead API is authenticated with Bearer tokens. Before calling the API endpoints, you first need to request an access token with POST method from the authentication endpoint.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Lead

Lead API allows an agent to view all the leads for his/her agency offices.

Fetch leads

An agent can fetch all the leads for his/her agency officies for the past three months.

Authorizations:
query Parameters
agentId
required
string <uuid>
Example: agentId=b0d2a485-6a73-468a-9acc-d8ce9b620b3d

A unique id which identifies the agent.

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes.

Responses

Response samples

Content type
application/json
{
  • "agentId": "fce8cfe4-7a3d-4a72-86bd-d5d7d653e7af",
  • "leads": [
    ]
}