Skip to content

upsertQuote

WRITE

Upsert quote.

POST /api/v1/sales/upsertQuote
curl -X POST '<your-host>/api/v1/sales/upsertQuote' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "customerId": "string",
    "locationId": "string",
    "quoteId": "string",
    "_operation": "create"
  }'
Response
{
  "results": [
    {
      "id": "string",
      "quoteId": "string"
    }
  ],
  "count": null
}

Parameters

ParameterType

Required. 'create' inserts a new record, 'update' modifies the existing record with this id.

"create""update"
min length 1
min length 1
"Draft""Sent""Ordered""Partial""Lost""Cancelled""Expired"

Input schema

schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "salesPersonId": {
      "type": "string"
    },
    "estimatorId": {
      "type": "string"
    },
    "customerId": {
      "type": "string",
      "minLength": 1
    },
    "customerLocationId": {
      "type": "string"
    },
    "customerContactId": {
      "type": "string"
    },
    "customerEngineeringContactId": {
      "type": "string"
    },
    "customerReference": {
      "type": "string"
    },
    "locationId": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "type": "string",
      "enum": [
        "Draft",
        "Sent",
        "Ordered",
        "Partial",
        "Lost",
        "Cancelled",
        "Expired"
      ]
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      ]
    },
    "dueDate": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    },
    "currencyCode": {
      "type": "string"
    },
    "exchangeRate": {
      "type": "number"
    },
    "exchangeRateUpdatedAt": {
      "type": "string"
    },
    "digitalQuoteAcceptedBy": {
      "type": "string"
    },
    "digitalQuoteAcceptedByEmail": {
      "type": "string"
    },
    "quoteId": {
      "type": "string"
    },
    "customFields": {},
    "id": {
      "type": "string"
    },
    "_operation": {
      "type": "string",
      "enum": [
        "create",
        "update"
      ],
      "description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
    }
  },
  "required": [
    "customerId",
    "locationId",
    "quoteId",
    "_operation"
  ]
}