---
title: "Update a sales opportunity"
method: PATCH
path: "/v1/finance/salesOpportunities/{salesOpportunityId}"
tags: ["SalesOpportunities"]
---

# Update a sales opportunity

`PATCH /v1/finance/salesOpportunities/{salesOpportunityId}`

## Request

- Base URL: `https://api.bigchange.com`
- URL: `https://api.bigchange.com/v1/finance/salesOpportunities/{salesOpportunityId}`
- Auth: HTTP bearer

Update a sales opportunity (required scope finance:write)

## Path parameters

- `salesOpportunityId` integer, required

## Headers

- `Customer-Id` integer, required

## Request body

- UpdateSalesOpportunityModel: Represents a model that holds information about updating a sales opportunity
  - `subject` string: The subject of the sales opportunity<br/><br/>Optional: Omit to retain current value
  - `status` 'created' | 'onHold' | 'completedWon' | 'completedLost': Represents the status of a sales opportunity.<p>Possible values:</p><ul><li><b>created</b>: The sales opportunity has been created.</li><li><b>onHold</b>: The sales opportunity is on hold.</li><li><b>completedWon</b>: The sales opportunity has been completed and won.</li><li><b>completedLost</b>: The sales opportunity has been completed and lost.</li></ul>
  - `dueAt` string, date-time: The due date of the sales opportunity<br/><br/>Optional: Omit to retain current value
  - `stageId` integer: The unique identifier of the stage associated with the sales opportunity<br/><br/>Optional: Omit to retain current value
  - `probabilityId` integer: The unique identifier of the probability associated with the sales opportunity<br/><br/>Optional: Omit to retain current value
  - `notes` string: Notes associated with the sales opportunity<br/><br/>Optional: Omit to retain current value
  - `reference` string, nullable: The reference for the sales opportunity<br/><br/>Optional: Omit to retain current value or provide null to unset
  - `customFields` CustomFieldWriteModel[]: Custom fields associated with the sales opportunity.<br/>Omit or use an empty list to retain current values.<br/> <br/>Validation:<br/>- Cannot be null when provided.<br/>- Each custom field must satisfy its definition rules for the sales opportunity type.<br/><br/>Optional: Omit to retain current value
    - `definitionId` integer, required: The unique identifier of the associated custom field definition
    - `value` string, nullable: The value of this custom field. If set to null, any existing value will be unset

## Response `204`

No Content

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Content
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bigchange/apis/bigchange-dx.md) - [All operations](https://skmtc.dev/bigchange/apis/bigchange-dx/llms.txt) - [OpenAPI document](https://skmtc.dev/bigchange/apis/bigchange-dx/revisions/b262bfdb1dd0?raw)
