Update a sales document
patch/api/v1/sales-documents/{documentNumber}Updates one or more field values for an existing sales document. This API supports partial updates. Include only the fields that you want to change.
Unlike the Create a sales document API, this API accepts plain IDs (for example, "company": 12345) instead of objects (for example, "company": { "id": 12345 }) for the company, primary contact, owner, status, and applicable custom fields.
Code snippet
curl -X 'PATCH' \
'https://{yourdomain}/api/v1/sales-documents/{documentNumber}?skipValidation=false' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
-d '{
"data": {
"name": "Updated Document Title - Acme Inc.",
"company": 12345,
"primaryContact": 67890,
"owner": 12,
"status": 2,
"billingCity": "Seattle",
"totalValue": 1599.99,
"validTill": "2026-04-30",
"reason": "Contract renewal opportunity",
"isPrimary": false,
"notes": "Follow up with decision maker",
"cf_purchase_order_number": 1001
}
}'
Path parameters
| documentNumberstringRequired | The unique identifier of the sales document to update. |
Query parameters
| skipValidationboolean | A flag indicating whether to bypass specific validations during sales document update. If set to true, the system skips checks for required fields, conditional logic, and field dependencies. When false (or not provided), all standard validations are applied. |
Request body
| Field | Description | Example | Validation |
| namestring | Document title or name for identification purposes. | "name": "Updated Document Title - Acme Inc." | Maximum 255 characters. |
| companylong | Company associated with this sales document. | "company": 12345 | Accepts a valid company ID. |
| primaryContactlong | Primary contact person for this sales document. | "primaryContact": 67890 | Accepts a valid contact ID. |
| totalValuedecimal | Total monetary value of the sales document. | "totalValue": 5000 | |
| validTillstring | Expiration date when the document is no longer valid. | "validTill": "2026-04-30" | Format: YYYY-MM-DD (ISO 8601) |
| reasonstring | Reason for creating or updating the sales document. | "reason": "Contract renewal opportunity" | |
| isPrimaryboolean | Indicates whether the sales document is the primary document associated with the pipeline record. | "isPrimary": true | Accepts boolean values: true or false. Supported only for Quotes. |
| notesstring | Internal notes or comments related to the sales document. | "notes": "Follow up with decision maker" | |
| ownerinteger | Owner assignment for the sales document. | "owner": 12 | Accepts a valid user ID. |
| statusinteger | Current workflow status of the sales document (e.g., draft, sent, accepted). | "status": 2 | Accepts a valid status option ID. |
| termsAndConditionsstring | Legal terms and conditions applicable to this sales document. | "termsAndConditions": "Payment due within 30 days" | Maximum 5000 characters. |
| billingStreetstring | Street address for billing purposes. | "billingStreet": "123 Main Street" | Maximum 255 characters. |
| billingCitystring | City name in the billing address. | "billingCity": "New York" | Maximum 255 characters. |
| billingStatestring | State or region in the billing address. | "billingState": "New York" | Maximum 255 characters. |
| billingCountrystring | Country name in the billing address. | "billingCountry": "US" | Maximum 255 characters. |
| billingPostalCodestring | Postal or ZIP code for the billing address. | "billingPostalCode": "1252" | Maximum 255 characters. |
| shippingStreetstring | Street address for shipping purposes. | "shippingStreet": "123 Main Street" | Maximum 255 characters. |
| shippingCitystring | City name in the shipping address. | "shippingCity": "New York" | Maximum 255 characters. |
| shippingStatestring | State or region in the shipping address. | "shippingState": "New York" | Maximum 255 characters. |
| shippingCountrystring | Country name in the shipping address. | "shippingCountry": "US" | Maximum 255 characters. |
| shippingPostalCodestring | Postal or ZIP code for the shipping address. | "shippingPostalCode": "1252" | Maximum 255 characters. |
| cf_purchase_order_numberlong | Custom field defined for the sales document module. Pass a custom field using its API name, which always begins with the cf_ prefix. | "cf_purchase_order_number": 1001 | The value must match the data type configured for the custom field. |
Example response
200 Success
{
"message": "Sales document updated successfully.",
"data": {
"documentNumber": "DOC-12345"
}
}