REST API V4 / Deals
The deals API lets you fetch, add, edit, and delete deals.
Deal Properties
Attribute | Type | Description |
ID |
integer | The system ID of the deal |
data |
object | The core properties of the deal contain information like value and owner. |
meta |
object | Custom fields and metadata properties of a deal record in key: value format |
related |
array | List of any related objects that are associated with the deal, such as notes and contacts |
Example deal object
Create a Deal
Create a new deal with this route.
POST /wp-json/gh/v4/deals/
Sample Request
Sample Response
Link a Contact to a Deal
POST /wp-json/gh/v4/deals/<ID>/relationships/
Sample Request
{ "other_id" : 1, "other_type" : "contact" }
Retrieve a Deal
Fetch a contact with this route.
GET /wp-json/gh/v4/deals/<ID>
Sample Response
Update a Deal
Update a deal with this route.
PATCH /wp-json/gh/v4/deals/<ID>
Sample request
Sample response
Delete a Deal
Delete a deal with this route.
DELETE /wp-json/gh/v4/deals/<ID>
Sample response
{ "status": "success" }
List Deals
Retrieve several deals with this route
GET /wp-json/gh/v4/deals/
Sample requests
Search by pipeline
GET /wp-json/gh/v4/deals/?pipeline_id=1
Search by status
GET /wp-json/gh/v4/deals/?status=won
Search by contact
GET /wp-json/gh/v4/deals/?related[ID]=8&related[type]=contact