Skip to main content
Version: Next

Bit form API

An API (Application Protocol Interface) defines a set of functions that interact with other software components or applications or you can call micro services between web applications. If any web application or software needs any information from another software, they have to make a call or request to get the information. This specific call or request is called API.

To simplify this context, we can take an example that a user installed a form plugin from which he/she wants to deliver form data to our Bit Form plugin where user has already made a form. What user has to do is to make an API request to Bit Form. In response, user will get all the data that they have requested will be stored in Bit Form.

API Key Option

  1. Go to Bit form Settings and then navigate API
  2. Copy your API Key then use it in request header.

API Endpoints

Get Forms

To fetch all forms.

Parameters

NameTypeInDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.
GET Request
https://<base_url>/wp-json/bitform/v1/forms

Fetch Entries

Fetch all entries by specific form ID.

Parameters

NameTypeInDefaultDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.required
form_idnumberPathSepecify form ID.required
per_pagenumberPath200How many data fetch in each request.optional
pagenumberPath1Page offset.optional
GET Request
https://<base_url>/wp-json/bitform/v1/form/response/<form_id>

Get Form Fields

Fetch all field of a specific form.

NameTypeInDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.
form_idnumberPathSepecify form ID.
GET Request
  https://<base_url>/wp-json/bitform/v1/fields/<form_id>

Add record/entries

Add entries to specific form.

NameTypeInDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.
form_idnumberPathSepecify form ID.
field_keystringBodySpecify field key and value.
POST Request
https://<base_url>/wp-json/bitform/v1/entry/<form_id>

Edit record/entries

Parameters

NameTypeInDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.required
form_idnumberPathSepecify form ID.required
field_key_1stringBodySpecify the value for the field.optional
field_key_2stringBodySpecify the value for the field.optional

Note: field_key is form field key, e.g: bf1-2

POST/PUT Request
https://<base_url>/wp-json/bitform/v1/entry_update/<form_id>

Delete record/entries

Parameters

NameTypeInDescription
Bitform-Api-KeystringHeaderSpecify your secret key to get access.required
form_idnumberPathSpecify form ID.required
DELETE Request
https://<base_url>/wp-json/bitform/v1/entry_delete/<form_id>

API Status Codes

The success or failure of an API request is conveyed by the code and message in its response.

Http Status CodeHTTP StatusCodeMessage
200OK4000Successfully data submitted
200OK3910No forms available
200OK3920No fields available
200OK3710No field named {field} found. Please check and try again.
200OK3120Data type mismatch
200OK3970The get records API can fetch up to 200 records per request. You’ll have to use the from parameter in your requests to fetch records 1-200, 201-400, and so on
400Not Found3030The API request’s body content is missing
404Not Found3100No Entry with ID
404Not Found3200No Form with ID
404Not Found3130No form was found. Please check and try again
422Validation Error3070Data validation failure

Watch a demo tutorial here!

🖐 Let us know if you have any feedback or any API request at- support@bitapps.pro.

Loading...