Create a deal

Create a new deal. Every required deal custom field (isRequired on dealCustomFieldMeta) that has no fieldDefault needs a value in deal.fields; without one no deal is created and the response is 422 with an error per missing field, naming the field and its customFieldId. A fieldDefault counts as a value, and hidden, lookup and calculated fields are not enforced.

To create a deal, following permissions are required.

  • Deal permission: the user should have a permission to manage deals.
  • Pipeline-specific permission: the user should have a permission to manage the pipeline a new deal belongs to.

By default, primary contact and deal stage are also returned in the response.

{
  "deal": {
    "contact": "51",
    "account": "45",
    "description": "This deal is an important deal",
    "currency": "usd",
    "group": "1",
    "owner": "1",
    "percent": null,
    "stage": "1",
    "status": 0,
    "title": "AC Deal",
    "value": 45600,
    "fields": [
      {
        "customFieldId": 1,
        "fieldValue": "First field value"
      },
      {
        "customFieldId": 2,
        "fieldValue": "2008-01-20"
      },
      {
        "customFieldId": 3,
        "fieldValue": 5500,
        "fieldCurrency": "EUR"
      }
    ]
  }
}
Body Params
deal
object

The deal to create or update.

boolean

Read but has no effect.

boolean

true validates the custom field values in deal.fields before the deal is saved.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json