Workflow REST API

Workflow REST API

Overview

The Workflow REST API allows you to manage Forms currently in Workflow.

Base URL 
https://fieldconnect.field2base.com/v2/api

Header (required)
Authorization: Basic {CompanyID}:{Username}:{Password}:{API Sync Key}
Content-Type: application/json
Note: Authorization Header above is the same as all other Mobile Forms REST API calls. 
Note: API Developers can use OAuth 2.0 Authentication instead of the Basic Authentication. The OAuth 2.0 Authentication uses the Client Credentials Grant Type and requires the Company have a Client ID and a Client Secret generated in the Mobile Forms Portal to make web service calls to the REST API Endpoints. You can contact the Professional Services team at f2bps@field2base.com to implement OAuth 2.0 Authentication.


Supported Operations

Append to the Base URL: https://fieldconnect.field2base.com/v2/api
  1. GET workflows/{referenceNumber}
    1. Get details of a Form in Workflow
  2. POST workflows/email/{referenceNumber}
    1. E-Mail a PDF of the Form in Workflow to the provided recipients with the provided e-mail subject
  3. POST workflows/reassign/{referenceNumber}
    1. Re-Assign a Form in Workflow to the provided Username
  4. POST workflows/reassigntogroup/{reference number}/{group name}
    1. Re-Assign a Form in Workflow to the provided Group Name
  5. POST workflows/restart/{reference number}
    1. Restart a Form in Workflow
  6. POST workflows/resume/{reference number}
    1. Resume a Form in Workflow
  7. DEL workflows/cancel/{reference number}
    1. Cancel a Form in Workflow 
Note: Be sure to add "/" at the end of the call if there is a period in the Username or Group Name.


API Samples

Get Form Details

Request: GET
  1. https://fieldconnect.field2base.com/v2/api/workflows/13975389

Response: 200 OK
  1. {
  2.     "Status": "Under Review",
  3.     "User": null,
  4.     "Group": "Invoice Numbering Group",
  5.     "FormTemplateName": "Sample Expense Report",
  6.     "FormTitleSubject": "Sample Expense Report - Mary 2/21/2021 - 2/28/2021",
  7.     "Folder": "Form Library",
  8.     "LastModifiedDate": "2021-02-24T10:55:28.7114097",
  9.     "LastModifiedBy": "tester@field2base.com",
  10.     "StartedDate": "2021-02-24T10:55:28.6284035"
  11. }

E-Mail a PDF of a Form in Workflow

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/workflows/email/13975389
Body
  1. {
  2.    "RecipientEmails" : ["joe.shmo@domain.com"],
  3.    "CustomSubject" : "Custom Subject Test"

Re-Assign a Form to a new User in Workflow

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/workflows/reassign/13975389/joe.shmo@domain.com/

Re-Assign a Form to a new Group in Workflow

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/workflows/reassigntogroup/13975389/Approval Group 2/

Restart a Form in Workflow

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/workflows/restart/13975389

Resume a Form in Workflow

Request: POST
  1. https://fieldconnect.field2base.com/v2/api/workflows/resume/13975389

Cancel a Form in Workflow

Request: DEL
  1. https://fieldconnect.field2base.com/v2/api/workflows/cancel/13975389