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.
Key | Type | Description |
---|---|---|
created_by | integer | The user ID of the entry submitter. |
date_created | string | The date the entry was created, in UTC. |
ip | string | The IP address of the entry creator. |
is_fulfilled | integer | Whether the transaction has been fulfilled, if applicable. |
is_read | integer | Whether the entry has been read. |
is_starred | integer | Whether the entry is starred. |
source_url | string | The URL where the form was embedded. |
status | string | The status of the entry. |
user_agent | string | The user agent string for the browser used to submit the entry. |
Payment Properties
Payment properties only apply when payment fields are present.
Key | Type | Description |
---|---|---|
payment_amount | string | The amount of the payment. |
payment_date | string | The date of the payment. |
payment_method | string | The payment method for the payment. |
payment_status | string | The status of the payment. |
transaction_id | string | The transaction ID for the payment. |
transaction_type | string | The type of transaction. |
Response
Success
A successful response will contain a JSON object with the complete updated Entry Object.
Key | Type | Description |
---|---|---|
[entry_property] | mixed | Entry properties of the Entry Object. |
Failure
A failed response will provide a JSON string of the error code and message.
Key | Type | Description |
---|---|---|
code | string | Error code.missing_ entry |
message | string | Human-readable error message. |
data[status] | integer | HTTP 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": ""
}