v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Deals

Update a deal

Updates the specified deal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

patch/v2/deals/{deal_key}

Path parameters

deal_keystring required

Unique identifier of deal. Can be external_key, if one configured for deal.

Request body

account_namestring nullable

Name of the account

amountinteger

Deal amount in cents

close_datestring date

Expected close date of deal as YYYY-MM-DD

contact_first_namestring nullable

First name of the account's contact

contact_last_namestring nullable

Last name of the account's contact

customer_keystring nullable

The unique key of the customer associated with this deal.

external_keystring nullable

Reference that can be used in place of the key.

field_dataobject nullable
group_keystring

The unique key of the group in which this deals's partner is in

lost_reasonstring nullable

Reason for which the deal was lost.

metaobject nullable
mold_keystring nullable
partner_keystring

The unique key of the partner who owns this deal

source'partner' | 'vendor' nullable

Source of the deal, either 'partner' or 'vendor', defaults to 'partner' if not specified

stagestring

Current stage of this deal. Must appear in Deals Stage list found in group settings.

Example request

{
  "account_name": "Digital Agency Acme",
  "amount": 25000,
  "close_date": "2020-03-01",
  "contact_first_name": "John",
  "contact_last_name": "Smith",
  "customer_key": "cus_a80cb515fe",
  "external_key": "deal_1234",
  "fields": [
    {
      "field_key": "field_fjkdlrh9i32nfew",
      "name": "Company Address"
    }
  ],
  "group_key": "grup_UHrMpyoNbTBRuc",
  "lost_reason": "Not the right fit",
  "partner_key": "bertramgilfoyle",
  "source": "partner",
  "stage": "Working",
  "team": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "name": "Tushar"
  },
  "team_member": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "email": "tushten@partnerstack.com",
    "first_name": "Tushar",
    "last_name": "Sutherland",
    "personal_stack_key": "stck_1234567890"
  }
}

Response

Updates the specified deal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "account_name": "Digital Agency Acme",
    "amount": 25000,
    "close_date": "2020-03-01",
    "contact_first_name": "John",
    "contact_last_name": "Smith",
    "customer_key": "cus_a80cb515fe",
    "external_key": "deal_1234",
    "fields": [
      {
        "field_key": "field_fjkdlrh9i32nfew",
        "name": "Company Address"
      }
    ],
    "group_key": "grup_UHrMpyoNbTBRuc",
    "lost_reason": "Not the right fit",
    "partner_key": "bertramgilfoyle",
    "source": "partner",
    "stage": "Working",
    "team": {
      "created_at": 1574181282399,
      "key": "co_a80cb515fe",
      "updated_at": 1574181282399,
      "name": "Tushar"
    },
    "team_member": {
      "created_at": 1574181282399,
      "key": "co_a80cb515fe",
      "updated_at": 1574181282399,
      "email": "tushten@partnerstack.com",
      "first_name": "Tushar",
      "last_name": "Sutherland",
      "personal_stack_key": "stck_1234567890"
    }
  }
}