connect an rest api to the gravity form plugin

Viewed 38

I have a form in gravity form which was connected to an API rest in xml, but I want to update it to JSON and the API handle it in the same way. I tried to make the call to the API first enabling 'Gravity Forms API Settings', I added in 'function.php' of the theme the following statement to make the connection:

https://localhost/wp-json/gf/v2/entries

Code:

{
"form_id"      :"176",
"date_created" :"2018-10-16 12:43:23",
"is_starred"   :0,
"is_read"      :1,
"ip"           :"::1",
"source_url"   :"http://localhost/wp.dev/?gf_page=preview&id=176",
"currency"     :"USD",
"created_by"   :1,
"user_agent"   :"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0",
"status"       :"active",
"1.3"          :"Post",
"1.6"          :"Entries 2",
"2"            :"Creating using REST API v2",
"3"            :"Manually created using the POST route of the REST API v2"
}

Is what your website mentions regarding rest API v2, but I fail to make the post.

Any help on this? I will be grateful

PD: It's worth mentioning that we do not use zappier or webhooks because we work with pure code.

0 Answers
Related