API

The API functionality is similar to the one described in the provided link.

After generating an API key, copy it and include it in the header's Authorization field as 'Bearer ' + {{token}}. Note that the key will be inaccessible after 15 minutes.

API Endpoints:

1. Query Forms:

  • URL: POST /_api/v1/formqa/search

  • Header: Authorization: {{auth}}

  • Request JSON:

    {
      "id": "",
      "tableId": "",
      "index": 0,
      "onlyReturnCount": false,
      "wheres": [{
          "name": "",
          "compare": "",
          "value": ""
        }
      ]
    }

REQUEST_PATHRequiredTypeDescription

id

string

Primary ID

tableId

string

Table ID

index

number

Page Index

onlyReturnCount

boolean

Only response count, it's quickly.

wheres

array

conditions

wheres[0].name

string

Field Key

wheres[0].compare

enum

eq(Keyword use eq same as in), gt, lt, lte, gte

wheres[0].value

string

If It is date field(use seconds), number field use number.

We will support order and size in the future, default size is 20.

RESPONSE JSON

{
	"rc" : 0
	"error": "",
	"data": {
		"total_element": 0,
		"docs": []
	}
}
  1. Form Trigger Action

  • URL: POST /_api/v1/formqa/action

  • Header:Authorization: {{auth}}

This API allows you to trigger actions based on form data. It has a rate limit of 100 executions per hour per trigger, including loop iterations. If the limit is reached, the API will still execute the final iteration in full, rather than stopping partway through.

Request JSON:

{
  "parameters": {
    "product": "Product name",
    "price": 200,
    "quantity": 5
  },
  "triggerId": "",
  "tableId": "",
  "guestId": ""
}

REQUEST_PATHRequiredTypeDescription

parameters

object

{

"product": "Product",

"price": 200,

"quantity": 5

}

triggerId

string

Trigger ID

tableId

string

Form ID

guestId

string

Guest User ID

Response JSON:

{
  "rc": 0,
  "error": "",
  "data": {
    "error": false,
    "success": true,
    "response": ""
  }
}
  • rc (number): Return code. Non-zero values indicate an error.

  • error (string): Description of the error if rc is non-zero.

  • data (object): Contains the result of the action.

    • error (boolean): Indicates if the trigger encountered an error.

    • success (boolean): Indicates if the trigger successfully reached the END node.

    • response (string): Contains any additional response data.

Notes:

  • Initialization Time: The server starts on-demand. The first API call may take some time, but subsequent calls will have normal response times.

Deprecated Endpoint: /api/v1/bot/chat is no longer in use.

Last updated