Skip to main content

Update Deal

Update Deal
PUT

Nested custom-field value policy

When the request contains linked parent and child custom fields, use invalid_linked_custom_field_value_policy to control what happens when a child value is hidden by, or does not match, its effective parent value.

ValueBehaviour
keepPreserves invalid child values. This is the default when the property is omitted.
clearStores invalid non-file child values as null. File values are always retained.

The operation completes successfully under either policy. A child-only update is evaluated against the parent value already stored on the record. A parent update also re-evaluates its descendants.

JSON example

{
  "invalid_linked_custom_field_value_policy": "clear",
  "custom_fields": [
    { "id": 12, "value": "EMEA" },
    { "id": 13, "value": "Germany" }
  ]
}

Custom-field request IDs are the public IDs returned as id by GET /v1/custom-field. Use that endpoint to discover each child field's dependency, including the parent field's public parent_field_id, the visible_when values that make the child visible, and any allowed_child_options for dropdown or multiselect child fields.

The response envelope and entity response fields are unchanged; only the resulting child value may be retained or returned as null according to the selected policy.

Update the details of an existing deal by their unique slug.

Request

PUT

PUT /v1/deal/:slug

Path Parameter

  • slugstring

    Replace :slug with the deal's unique slug in the request URL.

Body

  • namestring

    >= 1 characters (required)

  • close_datestring

    Format: YYYY-MM-DD (e.g., 1990-01-01)(required)

  • deal_stage_idinteger

    (required)

  • deal_typestring

    Allowed Values:
    1 => "New Business",
    2 => "Existing Business"

  • deal_amountnumber

    it must be a positive value

  • organization_slugstring

    >= 1 characters

  • job_slugsstring

    (allowed comma separated slug as string)

  • candidate_slugsstring

    (allowed comma separated slug as string)

  • contact_slugsstring

    (allowed comma separated slug as string)

  • created_byinteger

    (required)

  • owner_idinteger

    (required)

  • tagsstring

    Comma-separated values:- [Java,Leadership]

  • custom fields:Array[object]

    For Example:
    "id": 1,
    "value": "textfeild"

  • invalid_linked_custom_field_value_policystring

    Optional. Allowed values: keep, clear. Default: keep. Controls whether invalid linked child custom-field values are retained or cleared.

Response

201

Body

  • idnumber

    Example: 28

  • slugstring

    Example: contact_68ba678fcd2a83f4640c

  • namestring

    Example: Anjali kotwani

  • stageobject

    Example:
    "id": 1,
    "label": "win",
    "percentage": "100"

  • deal_amountnumber

    Example: 22

  • amount_by_stagenumber

    Example: 2.2

  • close_datestring

    Example: 1990-02-02

  • deal_typestring

    Example: "1"

  • organizationobject

    Example:
    "id": 1

  • jobsobject

    Example:
    "id": 1

  • candidatesobject

    Example:
    "id": 1

  • contactsobject

    Example:
    "id": 1

  • tagsstring

    Example: [leader,java]

  • created_atstring (ISO 8601 date)

    Example: 2015-05-15T00:00:00Z

  • updated_atstring (ISO 8601 date)

    Example: 2015-05-15T00:00:00Z

  • created_byobject

    Example:
    "id": 1,
    "email": "Rohan@abc.com",
    "first_name": "Rohan",
    "last_name": "Sharma",
    "full_name": "Rohan Sharma",
    "role": "Admin",
    "phone": null

  • updated_byobject

    Example:
    "id": 1,
    "email": "Rohan@abc.com",
    "first_name": "Rohan",
    "last_name": "Sharma",
    "full_name": "Rohan Sharma",
    "role": "Admin",
    "phone": null

  • ownerobject

    Example:
    "id": 1,
    "email": "Rohan@abc.com",
    "first_name": "Rohan",
    "last_name": "Sharma",
    "full_name": "Rohan Sharma",
    "role": "Admin",
    "phone": null

  • custom fields:object

    Example:
    "id": 1,
    "field_name": "textfeild",
    "field_type": "string",
    "value": "anjali"

422

Body

  • Unprocessable Entity

Response Example

{
"id": 11,
"slug": "deal_b93fc43d76fff40d6647",
"name": "software engineer",
"stage": {
"id": 4
},
"deal_amount": 11,
"amount_by_stage": 2.2,
"close_date": "2024-08-07",
"deal_type": 1,
"organization": {
"id": 8
},
"jobs": [],
"candidates": [],
"contacts": [],
"tags": null,
"created_at": "2024-08-06T13:33:00.000Z",
"updated_at": "2024-08-06T13:33:33.000Z",
"created_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"updated_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"owner": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"custom_fields": [
{
"id": 2,
"field_name": "test deal",
"field_type": "phone",
"value": ""
},
{
"id": 3,
"field_name": "File",
"field_type": "file",
"value": ""
},
{
"id": 1,
"field_name": "TEst after delete",
"field_type": "text",
"value": ""
}
]
}