Summary

The GC API Services encompass a suite of API calls designed for underwriting. These services allow client users to access a variety of analytics at a location level of detail. The REST API analyses fall into three broad categories.

  • Technical Pricing

  • Hazard Lookups

  • Accumulation

Our RESTful API suite enables communication between Guy Carpenter and your application or website using HTTP requests. Transmitted request and response data content is formatted as JSON, using UTF-8 encoding and URL encoded values.

REST API SERVICES

Guy Carpenter uses the REST based services to access the API resources for its various analyses. This involves a two-step process:

1) Retrieve a valid access_token from the Authentication service

2) Use the access_token to access the desired analyses.

Additional background on the API services:

  • APIs are accessed via a named URL that response to one or more standard HTTP methods (GET, PUT, POST, DELETE)

  • Request and Response bodies are encored as JSON objects

  • Process is secured using HTTPS

GEOCODING

If the latitude and longitude of a location are not known, the address fields must be sent in the request. The Precisely Spectrum Enterprise geocoding service is used to geocode a location automatically at the backend in the API. However, the latitude and longitude cannot be returned due to contract restrictions. Please contact your account rep to look into more options if latitude and longitude are required in the API response.

  • The additional fields to be used to allow API to geocode in absence of latitude and longitude values from the client: AddressLine1, AddressLine2, AddressLine3, City, PostalCode, StateCode, CountryCode

  • The order of the address elements is important, otherwise either geocoder wouldn’t geocode or it would geocode at postal/city resolution.

  • If AddressLine1 is not provided or left blank, geocoding occurs at postal code level and AddressLine2, AddressLine3, AddressLine4 are ignored.

  • This service only returns the MatchCodeDescription in the response under location in addition to the metrics returned by the API.

PRE-REQUISITES

Prior to attempting these steps, you should receive the following from Guy Carpenter:

a) Client Id and Client Secret

b) Service Account Username and Password

c) Base URL for the Authentication service and Other API(s)

RETREIVING AN ACCESS_TOKEN

Use the following information mentioned below to retrieve an access token from the Authentication service.

BaseURL: [Base URL of Token API provided by GC]

Action: POST

Content-Type: application/x-www-form-urlencoded

Parameters:

  • grant_type: password

  • scope: openid profile

  • username: [Service Account Username provided by GC]

  • password: [Service Account Password provided by GC]

  • client_id: [Unique Client Id provided by GC]

  • client_secret: [Unique Client Secret Provided by GC, different from account password listed above]

When you submit the above to the URL, you should receive a response with the access_token. This access_token is valid for next 60 minutes. Use the access_token to access the available analyses (Modeled Loss Estimate, Accumulation, Hazard).

Responses:

Code
Status
Definition/Possible Cause

200

OK

The request was successful and a valid response returned

400

Bad Request

Validation error or wrong parameters

500

Internal Server Error

An unexpected condition has occurred

access_token

The access token issued by the authorization server

expires_in

Length of time the token is valid in seconds; Default is 3600

token_type

The type of token issued; BearerToken