Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Entry submission RestApi #1322

Merged
merged 16 commits into from
Sep 6, 2024

Conversation

MILAN88888
Copy link
Contributor

@MILAN88888 MILAN88888 commented Aug 29, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR introduces the RestApi for the entry submission. Now we have given the API to public to save the entry directly by hitting the API with the formatted data. All field data structure is mentioned on the ticket.

Data Structure:-

{
    "form_fields": {
        "LbH5NxasXM-2": "milan@gmail.com",
        "66FR384cge-3": "sdfsd krishana global aeyar ab nisi ut ab i",
        "yhGx3FOwr2-4": "Maximesdf sdfsdvero ad cumqu tw"
    },
    "id": 173
}
//Here, Field keys is field id.

For. To email use code snippet:

add_filter(
	'everest_forms_allow_send_email_after_restapi_save_entry',
	function( $is_send ) {
		return $is_send = true;
	}
);

URL :- {your_site_url}/wp-json/everest-forms/v1/entry/save

Note:- Authorization type is API Key.

Not Supported Field :- Payments, file upload, signature, and image upload

How to test the changes in this Pull Request:

  1. Go to global setting > misc > enable rest api > generate the api key for authentication
  2. Use Postman or other app to post the data.
  3. Use the above mentioned url to hit the api
  4. For the formatted data structure follow the jira ticket.

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (modification of the currently available functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully ran tests with your changes locally?
  • Have you updated the documentation accordingly?

Changelog entry

Feature - Entry submission RestApi.

Copy link
Member

@deepench deepench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@NirajChaudhary143 NirajChaudhary143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link

@joshianup1 joshianup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@MILAN88888 MILAN88888 merged commit 3c30ab9 into pre-develop Sep 6, 2024
1 check failed
@MILAN88888 MILAN88888 deleted the EVF-1174-feature/entry-submission-rest-api branch September 6, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants