Form API

Form API

In order for 3rd party applications to interact with JET WorkFlow directly, we use API.

For different purpose, we have different APIs.

**Note that the API URLs on this page are samples and will not work at all.

Table of Contents

Create New Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=addRecord&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&field1=text1&field2=text2 
				
			
  • addRecord — this indicates that the API is to create a new record
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • field1/field2 — this is the field name of the form that we want to assign the value to.
  • text1/text2 — this is the value that we want to assign to the field.

Get Records

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=getRecords&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname
				
			
  • getRecords — this indicates that the API is to retrieve records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.

Search Records

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=search&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&field1=text1&field2=text2
				
			
  • search — this indicates that the API is to search for records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • field1/field2 — this is the field name of the form that we are using to search the records.
  • text1/text2 — this is the value that we want to search for. (Note that this is usually a unique value in this field)

Update Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=updateRecord&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&id_record=12345&field1=text1
				
			
  • updateRecord — this indicates that the API is to update a record.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • id_record — this is the ROW_ID that is return by a previous search record API.
  • field1 — this is the field name of the form that we want to update.
  • text1 — this is the value that we want to update to field1.

Search & Update Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=searchUpdate&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&S_field1=text1&field2=text2
				
			
  • searchUpdate — this indicates that the API is to search & update records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • S_field1 — this is the field used to search the records. Replace field1 with the field name you need.
  • text1 — this is the value you want to search for.
  • field2 — this is the field you want to update.
  • text2 — this is the value of the field you want to update.

Create Sub Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=addSubRecord&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&S_field1=text1&field2=text2
				
			
  • addSubRecord — this indicates that the API is to create a new sub record
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • S_field1 — this is the unique field used to search the parent record. Replace field1 with the field name you need.
  • text1 — this is the value of the parent record field you want to search for.
  • field2 — this is the sub record field you want to add.
  • text2 — this is the value of the sub record field you want to add.

Get Sub Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=getSubRecords&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&P_field1=text1&C_field2=text2
				
			
  • getSubRecords — this indicates that the API is to retrieve sub records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • P_field1 — this is the unique field used to search the parent record. Replace field1 with the field name you need.
  • text1 — this is the value of the parent record field you want to search for.
  • C_field2 — this is the sub record field you want to search for.
  • text2 — this is the value of the sub record field you want to search for.

Search & Update Sub Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=searchUpdateSubRecords&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&S_field1=text1&field2=text2
				
			
  • searchUpdateSubRecords — this indicates that the API is to search & update sub records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • S_field1 — this is the unique field used to search the sub record. Replace field1 with the field name you need.
  • text1 — this is the value of the subrecord field you want to search for.
  • field2 — this is the sub record field you want to update.
  • text2 — this is the value of the sub record field you want to update.

Delete Record

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=deleteRecord&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&id_record=12345
				
			
  • deleteRecord— this indicates that the API is to delete a record.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site
  • id_record — this is the ROW_ID that is return by a previous search record API.

Search & Delete Records

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=searchAndDelete&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectnameS_field1=text1
				
			
  • searchAndDelete— this indicates that the API is to search & delete records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • S_field1 — this is the field used to search the records. Replace field1 with the field name you need.
  • text1 — this is the value you want to search for.

Search & Delete Child Records

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=searchAndDeleteChildRecords&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname
				
			
  • searchUpdateSubRecords — this indicates that the API is to search & update sub records.
  • key — this is the unique key for the form.
  • id_form — this indicates which from in the site
  • project — this indicates which site.
  • P_field1 — this is the unique field used to search the parent record. Replace field1 with the field name you need.
  • text1 — this is the value of the parent record field you want to search for.
  • C_field2 — this is the sub record field you want to search for.
  • text2 — this is the value of the sub record field you want to search for.

Get Site Logo

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=getProjectLogo&project=projectname
				
			
  • getProjectLogo — This allows us to retrieve the Site Logo.
  • project — this indicates the site where we are getting the Site Logo from.

Limits & Pages

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=getRecords&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&&limit=10&page=1
				
			

Append

&limit=<value1>&page=<value2>

to the end of a GET API url.

  • value1 – the number of records to display.
  • value2 – the page of records to display.

For example,

&limit=10&page=1 means that it will return the first set of 10 records.

&limit=15&page=3 means that it will return the 3rd set of 15 records.

Results will be similiar to the below example after running the API.

**Note that even without the additional limits/pages, the API will still return the pagination option. The example below shows how the pagination would look like if we did not run the API with limits/pages.

				
					{
  "data": [
    {
      "ROW_ID": 1,
      "test": "this is a new test"
    },
    {
      "ROW_ID": 2,
      "test": "test3"
    }
  ],
  "field_labels": {
    "test": "test"
  },
  "pagination": {
    "total_records": 2,
    "current_page": 1,
    "records_per_page": 1000000,
    "total_pages": 1
  }
}
				
			

Create Multiple Records at once

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=addRecordsBatch&key=a4bd0efeff4f4ed6fcf68453ca92f123&id_form=209&project=projectname
				
			

For creating multiple records at the same time, we need to submit the POST API with JSON payload

Below shows an example of a JSON payload. The example shows how you can add 3 records with 2 field values each. If you need to add more records, you can increase it accordingly.

				
					{
    "records": [
        {
            "field1": "value1",
            "field2": "value1"
        },
        {
            "field1": "value4",
            "field2": "value1"
        },
        {
            "field1": "value7",
            "field2": "value1"
        }
    ]
}
				
			

Multiple Delete

				
					https://demo.jetworkflow.com/ims/jetapi.php?method=deleteRecord&key=fraroprijepip6uspl7ostlklcirust&id_form=9999&project=projectname&id_record=1,2,3

				
			

For delete record API, usually it would only allow you to delete a single record by specifying a single record id.

Instead of just id_record=1

you can use id_record=1,2,3

where the record id can be retrieved from a separate GET API results.

In this way, you can delete multiple records at once.

Suggest Edit
×

Hello!

Click one of our representatives below to chat on WhatsApp or send an email to sales@jetworkflow.com

× How can I help you?