Gaya Logo

Data Mapping

Webhooks

API Reference

The Gaya API is organized around REST principles. It features predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Installation Guide

To test on the dev environment, please follow these steps:

  1. Download

  2. Download the latest build of the

  3. Install the downloaded Gaya browser extension on Google Chrome

    1. 3.1 Click on the extension icon in Google Chrome, and select "Manage extensions"

    2. 3.2 Enable Developer Mode by setting the Developer mode toggle to true

    3. 3.3 Click on "Load Unpacked" and select the unzipped extension file to upload it

  4. Pin the Gaya browser extension to your toolbar and log in using your Gaya account credentials

Authentication

An account with a registered email address and password is required to use the API. If you don't have an account, please contact [email protected] to request one.

API Location

The API is available at https://dev-api.gaya.ai. Responses are formatted and sent as JSON objects.

HTTP Verbs

The Gaya API uses HTTP verbs appropriate to each action.

VerbDescription
GETRetrieving resources
POSTCreating resources
PUTUpdating resources
DELETEDeleting resources

Error Handling

If an error occurs, whether on the server or client side, the error message(s) will be returned in an error object. For example:

{
    "status": 405,
    "name": "MethodNotAllowedError",
    "message": "The requested HTTP method is not allowed for this resource",
    "details": null
}

We use conventional HTTP response codes to indicate the success or failure of an API request.

In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx range indicate an error with Gaya's servers.

HTTP Status CodeDescription
200 - OKEverything worked as expected
201 - CreatedThe request was successful and a resource was created
202 - AcceptedThe request has been received and accepted for processing, but is not yet completed
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter
401 - UnauthorizedNo valid API key provided
403 - ForbiddenThe API key doesn't have permissions to perform the request
404 - Not FoundThe requested resource doesn't exist
405 - Method Not AllowedYou tried to access a resource with an invalid method
422 - Unprocessable EntityThe request was well-formed but was unable to be followed due to semantic errors
409 - ConflictThe request could not be completed due to a conflict with the current state of the target resource
429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests
500, 503 - Server ErrorsSomething went wrong on our end. (These are rare)

Entities and Fields

Entities are higher-level objects in our API that represent data like cars or customers that can have many attributes. Entities are categorized as either indexable or non-indexable based on how many times they can appear in a single context.

Fields are attributes of an entity. For example, a "car" entity might have fields like "make," "model," and "year".

Indexable entities

Indexable entities can appear multiple times in the same context. For example, a single insurance policy can cover multiple cars. Each car needs a unique index number (1, 2, 3, etc.) to identify it correctly. Each "Car" entity will have its own set of fields to store details about each car.

Special Note: The "household" entity is a unique indexable entity. The first household member is assumed to be the customer. Therefore, additional household entities start with index 2 (2, 3, 4, etc.).

Non-indexable entities

Non-indexable entities can only appear once in the same context. For example, there can only be one customer per insurance policy. Non-indexable entities are always referenced with the index number 1.

Entity TypeEntity NameIndex Requirement
IndexableHousehold2 or greater
IndexableCar1 or greater
IndexableLoss1 or greater
IndexableAccident/Violation1 or greater
IndexableAdditional Interest1 or greater
Non-indexableHome Coverage1
Non-indexableHome Policy1
Non-indexableCustomer1
Non-indexableAuto Commercial Insurance1
Non-indexableAuto Policy1
Non-indexableProperty1

Authentication Methods

When interacting with the Gaya API, you have several options for authenticating your API requests. The API provides two primary authentication methods:

Clipboard Records