BoldSales

API Documentation

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

documentNumberstringRequiredThe unique identifier of the sales document to update.

Query parameters

skipValidationbooleanA 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

FieldDescriptionExampleValidation
namestringDocument title or name for identification purposes."name": "Updated Document Title - Acme Inc."Maximum 255 characters.
companylongCompany associated with this sales document."company": 12345Accepts a valid company ID.
primaryContactlongPrimary contact person for this sales document."primaryContact": 67890Accepts a valid contact ID.
totalValuedecimalTotal monetary value of the sales document."totalValue": 5000
validTillstringExpiration date when the document is no longer valid."validTill": "2026-04-30"Format: YYYY-MM-DD (ISO 8601)
reasonstringReason for creating or updating the sales document."reason": "Contract renewal opportunity"
isPrimarybooleanIndicates whether the sales document is the primary document associated with the pipeline record."isPrimary": trueAccepts boolean values: true or false. Supported only for Quotes.
notesstringInternal notes or comments related to the sales document."notes": "Follow up with decision maker"
ownerintegerOwner assignment for the sales document."owner": 12Accepts a valid user ID.
statusintegerCurrent workflow status of the sales document (e.g., draft, sent, accepted)."status": 2Accepts a valid status option ID.
termsAndConditionsstringLegal terms and conditions applicable to this sales document."termsAndConditions": "Payment due within 30 days"Maximum 5000 characters.
billingStreetstringStreet address for billing purposes."billingStreet": "123 Main Street"Maximum 255 characters.
billingCitystringCity name in the billing address."billingCity": "New York"Maximum 255 characters.
billingStatestringState or region in the billing address."billingState": "New York"Maximum 255 characters.
billingCountrystringCountry name in the billing address."billingCountry": "US"Maximum 255 characters.
billingPostalCodestringPostal or ZIP code for the billing address."billingPostalCode": "1252"Maximum 255 characters.
shippingStreetstringStreet address for shipping purposes."shippingStreet": "123 Main Street"Maximum 255 characters.
shippingCitystringCity name in the shipping address."shippingCity": "New York"Maximum 255 characters.
shippingStatestringState or region in the shipping address."shippingState": "New York"Maximum 255 characters.
shippingCountrystringCountry name in the shipping address."shippingCountry": "US"Maximum 255 characters.
shippingPostalCodestringPostal or ZIP code for the shipping address."shippingPostalCode": "1252"Maximum 255 characters.
cf_purchase_order_numberlongCustom 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": 1001The value must match the data type configured for the custom field.

Example response

200 Success

{
  "message": "Sales document updated successfully.",
   "data": {
     "documentNumber": "DOC-12345"
   }
}