Fieldinsight Public API
    • Introduction
    • OAuth
    • Personal API Keys
    • Rate limits
    • Contacts
      • Get contacts
        GET
      • Create contact
        POST
      • Upsert contact
        PUT
      • Patch contact
        PATCH
      • Remove contact
        DELETE
    • Customers
      • Create customer
        POST
      • Get customers
        GET
      • Upsert customer
        PUT
      • Patch customer
        PATCH
      • Remove customer
        DELETE
      • Add contact to customer
        POST
      • Remove contact from customer
        DELETE
    • Sites
      • Create site
        POST
      • Get sites
        GET
      • Upsert site
        PUT
      • Patch site
        PATCH
      • Remove site
        DELETE
      • Add site to project
        POST
      • Add contact to site
        POST
      • Remove contact from site
        DELETE
    • Inventory
      • Get items
        GET
      • Create item
        POST
      • Patch item
        PATCH
      • Upsert item
        PUT
      • Remove item
        DELETE
      • Update stock
        PUT
      • Adjust stock
        PUT
    • Invoices
      • List Invoices
      • Create Invoice
      • Update Invoice
      • Delete Invoice
      • Set export status
      • Get Invoice PDF
      • Get payments
      • Add payment
    • Payment Methods
      • Upsert Payment Method
      • List Payment Methods
      • Delete Payment Method
    • Payment Terms
      • Upsert Payment Term
      • List Payment Terms
      • Delete Payment Term
    • Business Entities
      • Upsert Business Entity
      • List Business Entities
      • Delete Business Entity
    • Jobs
      • Get jobs
      • Create job
      • Update job
    • Item Classes
      • List Item Classes
      • Upsert Item Class
      • Delete Item Class
    • Cost Codes
      • Upsert Cost Code
      • List Cost Codes
      • Delete Cost Code
    • Pay Items
      • Upsert Pay Item
      • List Pay Items
      • Delete Pay Item
    • Account Groups
      • Upsert Account Group
      • List Account Groups
      • Delete Account Group
    • Units of Measure
      • Upsert Unit Of Measure
      • List Unit Of Measures
      • Delete Unit Of Measure
    • Business Divisions
      • Upsert Business Division
      • List Business Divisions
      • Delete Business Division
    • Warehouses
      • Upsert Part Item Warehouse Location
      • List Part Item Warehouse Locations
      • Delete Part Item Warehouse Location
    • Warehouse Positions
      • Upsert Part Item Warehouse Position
      • List Part Item Warehouse Positions
      • Delete Part Item Warehouse Position
    • Users
      • Get users
    • Projects
      • Get projects
      • Create project
      • Patch project
      • Upsert project
      • Remove project
      • Add account group
      • Remove account group
    • Project Types
      • Upsert Project Type
      • List Project Types
      • Delete Project Type
    • Job Statuses
      • Get items
    • Job Types
      • Get list
    • Workflows
      • Get list
    • Asset Types
      • Upsert Asset Type
      • List Asset Types
      • Delete Asset Type
    • Asset Categories
      • Upsert Asset Type Category
      • List Asset Type Categories
      • Delete Asset Type Category
    • Asset Category Groups
      • Upsert Asset Category Group
      • List Asset Category Groups
      • Delete Asset Category Group
    • Asset Models
      • Upsert Asset Model
      • List Asset Models
      • Delete Asset Model
    • Assets
      • Get assets
      • Create asset
      • Patch asset
      • Upsert asset
      • Remove asset
    • Inventory Transactions
      • Get transactions
    • To-do Lists
      • Create task
      • Get tasks
      • Update task
      • Remove task
    • To-dos
      • Create sub task
      • Get sub tasks
      • Update sub task
      • Remove sub task
    • To-do Types
      • Upsert Todo Type
      • List Todo Types
      • Delete Todo Type
    • To-do Statuses
      • Upsert Todo Status
      • List Todo Statuses
      • Delete Todo Status
    • To-do Priorities
      • Upsert Todo Priority
      • List Todo Priorities
      • Delete Todo Priority
    • Quotes
      • List Quotes
      • Create Quote
      • Update Quote
      • Delete Quote
      • Set export status
      • Get Quote PDF
    • Reports
      • List Reports
      • Create Report
      • Update Report
      • Delete Report
      • Set export status
      • Get Report PDF
    • Purchase Orders
      • List Purchase Orders
      • Create Purchase Order
      • Update Purchase Order
      • Delete Purchase Order
      • Set export status
      • Get Purchase Order PDF
    • Customer Statuses
      • Upsert Customer Status
      • List Customer Statuses
      • Delete Customer Status
    • Schemas
      • AccountGroupInput
      • AccountGroupListItem
      • AccountGroupListQuery
      • AssetCategoryExcerpt
      • AssetCategoryGroupInput
      • AssetCategoryGroupListItem
      • AssetCategoryGroupListQuery
      • AssetCustomEntryInput
      • AssetDeleteQuery
      • AssetInput
      • AssetListItem
      • AssetListQuery
      • AssetModelExcerpt
      • AssetModelInput
      • AssetModelListItem
      • AssetModelListQuery
      • AssetPatchInput
      • AssetSaveOutput
      • AssetTypeCategoryInput
      • AssetTypeCategoryListItem
      • AssetTypeCategoryListQuery
      • AssetTypeExcerpt
      • AssetTypeInput
      • AssetTypeListItem
      • AssetTypeListQuery
      • BusinessDivisionInput
      • BusinessDivisionListItem
      • BusinessDivisionListQuery
      • BusinessEntityInput
      • BusinessEntityListItem
      • BusinessEntityListQuery
      • ContactCustomEntryInput
      • ContactDeleteQuery
      • ContactExcerpt
      • ContactInput
      • ContactListQuery
      • ContactPatchInput
      • ContactSaveOutput
      • CostCodeInput
      • CostCodeListItem
      • CostCodeListQuery
      • CreateJobOutput
      • CustomEntryOutput
      • CustomerCustomEntryInput
      • CustomerDeleteQuery
      • CustomerExtraContactInput
      • CustomerExtraContactRemoveInput
      • CustomerListItem
      • CustomerListQuery
      • CustomerPatchInput
      • CustomerSaveOutput
      • CustomerStatusInput
      • CustomerStatusListItem
      • CustomerStatusListQuery
      • CustomerWithContactInput
      • DocumentCreateInput
      • DocumentDeleteQuery
      • DocumentJobExcerpt
      • DocumentLineItemInput
      • DocumentLineItemOutput
      • DocumentListQuery
      • DocumentSectionInput
      • DocumentSectionOutput
      • DocumentUpdateInput
      • ExportErrorInput
      • ExportResultInput
      • InvoiceListItem
      • InvoiceListQuery
      • InvoiceUpdateInput
      • ItemClassExcerpt
      • ItemClassInput
      • ItemClassListItem
      • ItemClassListQuery
      • ItemClassRefInput
      • ItemCreateInput
      • ItemDeleteQuery
      • ItemExcerpt
      • ItemIdOutput
      • ItemIdRootOutput
      • ItemInput
      • ItemListItem
      • ItemListQuery
      • ItemPatchInput
      • JobCustomEntryInput
      • JobInput
      • JobListQuery
      • JobStatusListItem
      • JobStatusListQuery
      • JobTypeListItem
      • JobTypeListQuery
      • LineItemLocationOutput
      • ListResponse[AccountGroupListItem]
      • ListResponse[AssetCategoryGroupListItem]
      • ListResponse[AssetListItem]
      • ListResponse[AssetModelListItem]
      • ListResponse[AssetTypeCategoryListItem]
      • ListResponse[AssetTypeListItem]
      • ListResponse[BusinessDivisionListItem]
      • ListResponse[BusinessEntityListItem]
      • ListResponse[ContactListItem]
      • ListResponse[CostCodeListItem]
      • ListResponse[CustomerListItem]
      • ListResponse[CustomerStatusListItem]
      • ListResponse[InvoiceListItem]
      • ListResponse[ItemClassListItem]
      • ListResponse[ItemListItem]
      • ListResponse[JobListItem]
      • ListResponse[JobStatusListItem]
      • ListResponse[JobTypeListItem]
      • ListResponse[PartItemWarehouseLocationListItem]
      • ListResponse[PartItemWarehousePositionListItem]
      • ListResponse[PayItemListItem]
      • ListResponse[PaymentListItem]
      • ListResponse[PaymentMethodListItem]
      • ListResponse[PaymentTermListItem]
      • ListResponse[ProjectListItem]
      • ListResponse[ProjectTypeListItem]
      • ListResponse[PurchaseOrderListItem]
      • ListResponse[QuoteListItem]
      • ListResponse[ReportListItem]
      • ListResponse[SiteListItem]
      • ListResponse[TodoListItem]
      • ListResponse[TodoListListItem]
      • ListResponse[TodoPriorityListItem]
      • ListResponse[TodoStatusListItem]
      • ListResponse[TodoTypeListItem]
      • ListResponse[TransactionListItem]
      • ListResponse[UnitOfMeasureListItem]
      • ListResponse[UserListItem]
      • ListResponse[WorkflowListItem]
      • OptionRemoveRequest
      • OptionUpsertOutput
      • PartItemWarehouseLocationListItem
      • PartItemWarehouseLocationListQuery
      • PartItemWarehousePositionListItem
      • PartItemWarehousePositionListQuery
      • PayItemInput
      • PayItemListItem
      • PayItemListQuery
      • PaymentInput
      • PaymentListItem
      • PaymentListQuery
      • PaymentMethodInput
      • PaymentMethodListItem
      • PaymentMethodListQuery
      • PaymentMethodOutput
      • PaymentOutput
      • PaymentTermListQuery
      • PaymentTermSchema
      • ProjectAccountGroupInput
      • ProjectDeleteQuery
      • ProjectInput
      • ProjectListItem
      • ProjectListQuery
      • ProjectPatchInput
      • ProjectSaveOutput
      • ProjectTypeExcerpt
      • ProjectTypeInput
      • ProjectTypeListItem
      • ProjectTypeListQuery
      • PurchaseOrderExcerpt
      • PurchaseOrderListItem
      • PurchaseOrderUpdateInput
      • QuoteListItem
      • RecipientOutput
      • ReportListItem
      • SiteCustomEntryInput
      • SiteDeleteQuery
      • SiteExtraContactInput
      • SiteExtraContactRemoveInput
      • SiteListQuery
      • SitePatchInput
      • SiteProjectInput
      • SiteSaveOutput
      • SiteWithContactInput
      • StockAdjustInput
      • StockItemRefInput
      • StockUpdateInput
      • SupplierExcerpt
      • TodoCreateInput
      • TodoDeleteQuery
      • TodoListCreateInput
      • TodoListDeleteQuery
      • TodoListExcerpt
      • TodoListItem
      • TodoListListItem
      • TodoListListQuery
      • TodoListPatchInput
      • TodoListQuery
      • TodoListSaveOutput
      • TodoPatchInput
      • TodoPriorityExcerpt
      • TodoPriorityInput
      • TodoPriorityListItem
      • TodoPriorityListQuery
      • TodoSaveOutput
      • TodoStatusExcerpt
      • TodoStatusInput
      • TodoStatusListItem
      • TodoStatusListQuery
      • TodoTypeExcerpt
      • TodoTypeInput
      • TodoTypeListItem
      • TodoTypeListQuery
      • TransactionListItem
      • TransactionListQuery
      • TransactionType
      • UnitOfMeasureExcerpt
      • UnitOfMeasureInput
      • UnitOfMeasureListItem
      • UnitOfMeasureListQuery
      • UnitOfMeasureRefInput
      • UserListItem
      • UserListQuery
      • WarehouseExcerpt
      • WarehouseInput
      • WarehousePositionInput
      • WarehousePositionRefInput
      • WarehouseRefInput
      • WorkflowListItem
      • WorkflowListQuery
      • ApiError
      • ApiValidationErrors
      • ApiValidationErrorDetail

    OAuth

    The FieldInsight API supports the OAuth 2.0 protocol to provide secure access to its resources. Specifically, it implements the Authorization Code Grant flow, which is ideal for server-side applications. This flow adds an extra layer of security by exchanging an authorization code for an access token. Sensitive credentials such as usernames and passwords are never exposed directly to the client application, enhancing overall security.

    Authorization Code Grant Flow#

    In the Authorization Code Grant flow, the client application must first obtain an authorization code from the FieldInsight authorization server. This code is then exchanged for an access token and a refresh token. Here’s how the process works:

    1. Request Authorization Code#

    To initiate the process, the client redirects the user to the FieldInsight authorization URL:
    https://app.fieldinsight.com/oauth/authorize?response_type=code&client_id=<client_id>&redirect_uri=http://localhost/oauth&state=state
    client_id: This is the unique identifier for your application.
    redirect_uri: This is where FieldInsight will send the user after they authorize the application.
    state: An optional, random string to protect against CSRF attacks.
    Upon successful authorization, the authorization server will redirect the user back to the specified redirect_uri along with the authorization code.

    2. Exchange Authorization Code for Access Token#

    Once the authorization code is obtained, the client can exchange it for an access token and refresh token by sending a POST request to the token endpoint:
    This request must include the following parameters:
    grant_type: Set to authorization_code.
    client_id: Your application's client ID.
    client_secret: The secret associated with your client ID.
    code: The authorization code obtained from the previous step.
    redirect_uri: The same redirect URI used in the authorization request.
    If successful, the response will contain both the access token and a refresh token.

    3. Access Token Expiry#

    The access token is your gateway to access FieldInsight API resources. However, it is short-lived and expires after 10 hours. After expiration, you will need to use the refresh token to obtain a new access token.

    4. Refreshing the Access Token#

    When the access token expires, you can request a new one using the refresh token by sending the following POST request to the token endpoint:
    grant_type: Set to refresh_token.
    refresh_token: The refresh token issued alongside the original access token.
    client_id and client_secret: Your application's credentials.
    This request will return a new access token, which you can use to access the API endpoints again.

    Accessing the API with the Access Token#

    To access any of the API’s protected endpoints, you must include the access token in the Authorization header of your request. For example:
    Authorization: Bearer <access_token>
    This ensures that FieldInsight knows who is making the request and that they are authorized to do so.
    Modified at 2026-05-08 23:13:09
    Previous
    Introduction
    Next
    Personal API Keys
    Built with