REST API

If you choose to use the Agent REST API, you will be provided with a Client ID and Client Secret.   An access token must be obtained before your application can gain access to TriTech’s Stratus Agent M2M resources.

 

There are two endpoints for the REST API: 

 

http://api.agent.tritechsoft.com/api/token

https://api.agent.tritechsoft.com/api/allocate

 

The /api/token endpoint returns a JSON Web Token (JWT) which is required for the /api/allocate endpoint. It expects a  clientId and clientSecret to be provided and returns a token string.

 

  • You must have an active, valid account registered with TriTech to acquire a JWT.
  • The token must be used for the call to the /api/allocate endpoint.
  • The token has a valid lifetime of 86400 seconds; call /api/token on expiration to acquire a new one

 

 

The /api/token endpoint returns a JSON Web Token (JWT) which is required for the /api/allocate endpoint. It expects a clientId and clientSecret and returns a token string; see example below.

URL: https://api.agent.tritechsoft.com/api/token

HTTP Method: POST

Request Body:

{
‎"clientId":"string",
‎"clientSecret":"string"
}

       

Response: "ACCESS_TOKEN"

Response status codes:{

"200":{

"description":"OK",

},

"401":{

"description":"Unauthorized"

},

"500":{

"description":"Internal server error"

}

}

 

You must have an active, valid account registered with TriTech to acquire a JWT.

The token must be used for the call to the /api/allocate endpoint.

The token has a valid lifetime of 86400 seconds; call /api/token on expiration to acquire a new one.

URL: https://api.agent.tritechsoft.com/api/allocate

HTTP Method: POST

HTTP Header: 

"key": "Authorization",

"value": "Bearer ACCESS_TOKEN",

Request Body:

{

"effectiveDate": "string",

"lineOfBusiness": "string",

"sourceCity": "string",

"sourceState": "string",

"sourceStreet": "string",

"sourceZipCode": "string"

}

Response body:

{

"allocateAddressResult": {

"censusBlockID": "string",

"censusCountyCode": "string",

 "censusCountyName": "string",

 "cityCode": "string",

 "cityName": "string",

 "cityOrCounty": "string",

 "cityTaxRates": {

 "casualty": 0,

 "fire": 0,

 "flatFee": 0,

 "health": 0,

 "inlandMarine": 0,

 "life": 0,

 "minTax": 0,

 "motorVehicle": 0,

 "other": 0

},

"countyCode": "string",

"countyCreditApplies": true,

"countyFipsCode": "string",

"countyName": "string",

"countyTaxRates": {

"casualty": 0,

"fire": 0,

"flatFee": 0,

"health": 0,

"inlandMarine": 0,

"life": 0,

"minTax": 0,

"motorVehicle": 0,

"other": 0

},

"effectiveCityRate": 0,

"effectiveCountyRate": 0,

"effectiveDate": "string",

"effectiveTaxRate": 0,

"errorDetails": {

"description": "string",

"number": 0,

"source": "string"

},

"lineOfBusiness": "string",

"matchQuality": {

"matchCode": 0,

"matchDescription": "string",

"matchIdentifier": "string"

},

"matchedAddress": {

"city": "string",

"state": "string",

"street": "string",

"zipCode": "string"

},

"sourceAddress": {

"city": "string",

"state": "string",

"street": "string",

"zipCode": "string"

},

"taxCode": "string"

}

}

 

Response status codes:{

"200":{

"description":"OK",

},

"401":{

"description":"Unauthorized"

},

"403":{

"description":"Forbidden"

},

"500":{

 "description":"Internal Server Error"

}

}