Can we post data to a service API using episerver forms? Say on the latest version fo Episerver.

Vote:
 

Can we post data to a service API using episerver forms? Say on the latest version fo Episerver.

#194622
Jun 26, 2018 16:40
Vote:
 

There's a package name EpiServer.Forms.ServiceApi which you can install and post your data. See Forms Service Api

#194632
Edited, Jun 27, 2018 5:53
Vote:
 

Thank you that is helpful. We will try this.

#194660
Jun 27, 2018 15:02
Vote:
 

As far as I'm aware, the EPiServer.Forms.ServiceApi package only enables read access to the data submitted from Episerver Forms which would allow you to pull the data from an external system but that sounds slightly different to what was asked. If I understand correctly, the requirement is to send the results of a submitted Episerver form to an arbitrary service endpoint in which case you have 2 main options.

The first is to use the inbuilt WebHooks actor which will need to be configured on the settings tab of each form. This has the advantage that there's no coding required but you don't really have any control over the way the data is posted. If you're writing an endpoint specifically to receive the data then this shouldn't be an issue but, in my experience, most 3rd parties require data in a specific format and will typically require some sort of authentication.

The alternative option is to create your own actor in which case you would have full control over how the data is transferred and wouldn't necessarily require the editors to put in the URL of the endpoint when setting up the form (though you can allow them to do that if you want). There's a guide to building custom actors here along with a link to some code examples on GitHub:

https://world.episerver.com/documentation/developer-guides/forms/implementing-a-customized-actor/ 

#194661
Jun 27, 2018 15:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.