Public
Documentation Settings

FieldInsight Public API

Welcome to the FieldInsight API Documentation, Here you will find all current endpoints documented with examples provided. Body data for all requests must be encoded as a query string.

Authentication

Authenticate through OAuth 2 all grant types are supported. A development account must be requested from FieldInsight for the Client ID/Secret and Redirect URL required to use this API. A guide to using the Development account is found here.

URL Encoded

This API requires that all requests with body data(PATCH POST) have that data encoded as a URL encoded string. It's also expected your URL encoded string handles arrays as repeated values. You should be able to find a setting to enable this behaviour in your language of choice e.g. workers=1844&workers=1845 not workers[0]=1844&workers[1]=1845

AUTHORIZATIONOAuth 2.0

OAuth 2 flow Example

Provided below is an example of the Authorization code OAuth 2 flow. The user is redirected to FieldInsight to login and permit access. Then FieldInsight will redirect the user back to the callback url you specified with an authorization code. Finally the authorization code is traded for an access code which you can use to access the rest of the API

GETRedirect User

https://app.fieldinsight.com/oauth/authorize/?response_type=code&state=random_state&client_id=CLIENT_ID

Redirect the User to this URL to have them log in to FieldInsight. FieldInsight will provide an Authorization code in response.

PARAMS
response_type

code

Set this to code to get an Authorization Code.

state

random_state

Set this to something and FieldInsight will pass it back (Security check).

client_id

CLIENT_ID

Put your Client ID here.

Example Request
curl
curl --location 'https://app.fieldinsight.com/oauth/authorize/?response_type=code&state=random_state&client_id=CLIENT_ID'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

GETCallback example

https://my-fieldinsight-integration.com/oauth-callback/?state=random_state&code=CODE

Next FieldInsight will send the Customer back to the Callback URL you specified with the Authorization code.

PARAMS
state

random_state

You can make sure the same state has been sent back for increased security.

code

CODE

This is your Authorization Code used in the next step to retrieve an Access Code.

Example Request
curl
curl --location 'https://my-fieldinsight-integration.com/oauth-callback/?state=random_state&code=CODE'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers