Updating Entries with the REST API v2

Introduction

The /entries/[ENTRY_ID] endpoint is used to update a specific entry.

Authentication

See REST API v2 Authentication.

The capability gravityforms_edit_entries is required to use POST requests at these endpoints.
This can be filtered using gform_rest_api_capability_put_entries.

Updating an Entry

The /entries/[ENTRY_ID] endpoint is used to update a specific entry.

Method

This endpoint accepts PUT requests in order to update entries.

Path

/gf/v2/entries/[ENTRY_ID]

Required Properties

There are no required properties, but values not provided WILL BE BLANKED OUT.

Optional Properties

The endpoint accepts an Entry Object sent as JSON formatted data and can also include the following properties.

KeyTypeDescription
created_byintegerThe user ID of the entry submitter.
date_createdstringThe date the entry was created, in UTC.
ipstringThe IP address of the entry creator.
is_fulfilledintegerWhether the transaction has been fulfilled, if applicable.
is_readintegerWhether the entry has been read.
is_starredintegerWhether the entry is starred.
source_urlstringThe URL where the form was embedded.
statusstringThe status of the entry.
user_agentstringThe user agent string for the browser used to submit the entry.

Payment Properties

Payment properties only apply when payment fields are present.

KeyTypeDescription
payment_amountstringThe amount of the payment.
payment_datestringThe date of the payment.
payment_methodstringThe payment method for the payment.
payment_statusstringThe status of the payment.
transaction_idstringThe transaction ID for the payment.
transaction_typestringThe type of transaction.

Response

Success

A successful response will contain a JSON object with the complete updated Entry Object.

KeyTypeDescription
[entry_property]mixedEntry properties of the Entry Object.

Failure

A failed response will provide a JSON string of the error code and message.

KeyTypeDescription
codestringError code.
missing_entry
messagestringHuman-readable error message.
data[status]integerHTTP response status code

Usage

cURL Request

curl --location --request PUT 'https://rocket.test/wp-json/gf/v2/entries/159' \
     --user 'ck_5f86565df60696c43af25f9194e106800770b8e9:cs_be0190310fefc061c564168670d0a96d68873c29' \
     --header 'Content-Type: application/json' \
     --data $'{
  "id": "159",
  "form_id": "30",
  "date_updated": "2023-09-01 19:30:44",
  "is_starred": "0",
  "created_by": "4",
  "source_url": "https://rocket.test/wp-json/gf/v2/entries",
  "ip": "50.104.76.242",
  "date_created": "2023-09-01 19:30:44",
  "is_read": "1",
  "user_agent": "API",
  "status": "active",
  "1.3": "Neil",
  "1.6": "Armstrong",
  "3": "[email protected]",
  "4": "One small step!"
}'

Response

{
  "id": "159",
  "form_id": "30",
  "post_id": null,
  "date_created": "2023-09-01 19:30:44",
  "date_updated": "2023-09-01 19:30:44",
  "is_starred": "0",
  "is_read": "1",
  "ip": "50.104.76.242",
  "source_url": "https:\/\/rocket.test\/wp-json\/gf\/v2\/entries",
  "user_agent": "API",
  "currency": "USD",
  "payment_status": null,
  "payment_date": null,
  "payment_amount": null,
  "payment_method": "",
  "transaction_id": null,
  "is_fulfilled": null,
  "created_by": "4",
  "transaction_type": null,
  "status": "active",
  "1.3": "Neil",
  "1.6": "Armstrong",
  "3": "[email protected]",
  "4": "One small step!",
  "1.2": "",
  "1.4": "",
  "1.8": ""
}