Summary

The Shop API is designed to provide consumers with common workflows that orchestrate calls to multiple services to facilitate shopping for insurance products from Great American Insurance Group.

Environment Base URLs
Environment External URL

UAT

https://uat01.api.gaig.com/shop

PROD

https://prod01.api.gaig.com/shop

Authorization

All endpoints on this API are secured with OAuth 2.0, using the client_credentials grant type.

Environment External URL

DEV

https://dev01.api.gaig.com/oauth/token

UAT

https://uat01.api.gaig.com/oauth/token

PROD

https://prod01.api.gaig.com/oauth/token

Example HTTP Request
POST /oauth/token HTTP/1.1
Authorization: Basic {{base64 encoded clientId:clientSecret}}
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
Example HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "api_product_list_json": [
    "issuance-dev",
    "rating-dev"
  ],
  "token_type": "Bearer",
  "access_token": "",
  "expires_in": 3599,
}
Authorization Response Fields
Field Type Description

api_product_list_json

array

Array of strings indicating the authorities granted to the client.

token_type

string

This value should be placed in the Authorization header for API requests.

Authorization: {{token_type}} {{access_token}}

access_token

string

This value should be placed in the Authorization header for API requests.

Authorization: {{token_type}} {{access_token}}

expires_in

number

The time in seconds when the access token will expire.

Dynamic Documentation

/api/endpoints

Call this endpoint first to determine which endpoints are available to you, as a consumer. This API serves multiple business divisions, and a variety of complex insurance products. Therefore, not all endpoints apply to all consumers.

Example HTTP Request
GET /api/endpoints HTTP/1.1
Authorization: Bearer {{access_token}}
Example HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json

{
    "endpoints": [
        "/api/example1",
        "/api/example2"
    ]
}

/api/docs

Call this endpoint to get specific request and response body details, which can vary based on factors such as the consumer, business division and product. The /api/docs endpoint provides dynamic documentation based on those factors.

Determine the request body required by an endpoint.

Example HTTP Request
POST /api/docs HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
    "type": "request",
    "endpoint": "/api/example1",
    "format": "json",
    "scope": {
        "state": "OH"
    }
}

Determine the response body returned by an endpoint.

Example HTTP Request
POST /api/docs HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
    "type": "response",
    "endpoint": "/api/example1",
    "format": "json"
}
Request Body Fields
Field Type Required Description

type

string

true

Valid values: request, response

endpoint

string

true

One of the available API endpoints.

format

string

true

Valid values: json, details

scope

object

false

Additional scoping necessary for the request.

/api/mediaTypes

Returns the Media Types that are supported by any endpoints that produce output other than application/json. Use one of these Media Types in the Accept header of the endpoint to indicate your preference. For pdf, use Media Type Accept: application/pdf,application/json

Example HTTP Request
GET /api/mediaTypes HTTP/1.1
Authorization: Bearer {{access_token}}
Example HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json

{
    "/api/newBusiness/documents": [
        "application/json",
        "application/pdf,application/json"
    ]
}
Additional Required fields

Note: Depending on which endpoint you are getting information for, requests to /api/docs may also require a product field and/or specific fields within the scope object that are not mentioned above. If not provided in the request, valid values will be returned in a 400 response.

New Business Endpoints

The New Business workflow API is designed to provide a flexible way for consumers to integrate with the various phases of the process to book new business.

Each integration with the New Business workflow API may be unique to your use case, but the basic workflow is as follows:

Determine Appetite

/api/newBusiness/appetite

Check Eligibility

/api/newBusiness/eligibility

Provide a Submission Application

/api/newBusiness/application

Request Pricing information

/api/newBusiness/pricing

Retrieve Documents

/api/newBusiness/documents

Submit your intent to bind/issue a policy

/api/newBusiness/submit

The contact you have with Great American can provide more details on how your particular workflow operates. This will include which endpoints have been made available to you (also available via /api/endpoints), which order you should call them, and any other use-case specific details.

/api/newBusiness/appetite

The appetite endpoint is used to allow searching appetite information for a given product. For example, it could be used to determine if a particular class code is accepting requests for new business in a particular state.

The examples below are just a skeleton of what you will need to submit in a request and what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Request

POST /api/newBusiness/appetite HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "product": {}
}

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "product": {}
}

/api/newBusiness/eligibility

The eligibility endpoint is used to orchestrate calls to the Risk Selection service to create or update a questionnaire for a given product. Most of the questions are to determine eligibility, but some may be used to collect information that will be used to facilitate pricing and/or to augment your submission application.

The examples below are just a skeleton of what you will need to submit in a request and what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Request

POST /api/newBusiness/eligibility HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "riskSelection": {}
}

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789,
    "status": "ACCEPT",
    "workflowControl": "CONTINUE"
  },
  "riskSelection": {}
}

/api/newBusiness/application

The application endpoint is used to send a submission application, which includes details about the insured and any other entities, such as locations, property, etc., which require coverage.

The examples below are just a skeleton of what you will need to submit in a request and what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Request

POST /api/newBusiness/application HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "application": {}
}

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": "1621536205649999999"
  },
  "submission": {}
}

/api/newBusiness/pricing

This endpoint is used to acquire pricing information.

If your integration with Shop includes the /api/newBusiness/eligibility and /api/newBusiness/application endpoints, then all that is needed in the request is your newBusiness.id. Shop will leverage the answers to eligibility questions you provided as well as information from your submission application.

Example HTTP Request

POST /api/newBusiness/pricing HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789
  }
}

The example below is just a skeleton of what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789,
    "status": "ACCEPT",
    "workflowControl": "CONTINUE",
    "pricingType": "BINDABLE_QUOTE"
  },
  "rating": {}
}

/api/newBusiness/documents

This endpoint is used to get documents relating to your new business submission. Please call /api/mediaTypes to see what media types can be returned. When your application makes a request to /api/newBusiness/documents, set the HTTP Accept header using one of the listed media types and the document will be returned in that format.

The documents field is to provide one or more document types. To see which document types are available, use /api/docs and provide the format field with the value details.

Example HTTP Request for JSON Quote Letter

POST /api/newBusiness/documents HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/json

{
  "newBusiness": {
    "id": 1234567890123456789
  },
  "documents": [
    "quoteLetter"
  ]
}

The example below is just a skeleton of what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789,
    "status": "ACCEPT",
    "workflowControl": "CONTINUE",
    "pricingType": "BINDABLE_QUOTE"
  },
  "documents": {}
}

Example HTTP Request for PDF Quote Letter, the response is PDF file.

POST /api/newBusiness/documents HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json
Accept: application/pdf,application/json

{
  "newBusiness": {
    "id": 1234567890123456789
  },
  "documents": [
    "quoteLetter"
  ]
}

/api/newBusiness/submit

This endpoint allows you to submit your intent to book the business based on the information you have submitted, and the pricing information you have received.

If your integration with Shop includes the /api/newBusiness/eligibility, /api/newBusiness/application, and /api/newBusiness/pricing endpoints, then all that is needed in the request is your newBusiness.id.

Example HTTP Request

POST /api/newBusiness/submit HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789
  }
}

The example below is just a skeleton of what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789,
    "status": "ACCEPT",
    "workflowControl": "CONTINUE",
    "pricingType": "BINDABLE_QUOTE"
  },
  "submission": {}
}

/api/newBusiness

This endpoint returns all data you have previously received when calling any of the other New Business endpoints.

Example HTTP Request

POST /api/newBusiness HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789
  }
}

The example below is just a skeleton of what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "newBusiness": {
    "id": 1234567890123456789,
    "status": "ACCEPT",
    "workflowControl": "CONTINUE"
  },
  "riskSelection": {},
  "submission": {},
  "rating": {},
  "documents": {}
}

Pricing Endpoints

/api/pricingIndication

This endpoint is used to orchestrate calls to the Rating and Risk Selection services.

The examples below are just a skeleton of what you will need to submit in a request and what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Request

POST /api/pricingIndication HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "rating": {}
}

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "rating": {},
  "risk-selection": {}
}

/api/pricingDetail

This endpoint is used to orchestrate calls to the Rating and Risk Selection services after you have received a pricing indication from /api/pricingIndication.

The examples below are just a skeleton of what you will need to submit in a request and what you will see in the response. Please call the /api/docs endpoint mentioned above to see a more complete request/response model.

Example HTTP Request

POST /api/pricingDetail HTTP/1.1
Authorization: Bearer {{access_token}}
Content-Type: application/json

{
  "rating": {},
  "risk-selection": {}
}

Example HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "rating": {},
  "risk-selection": {}
}