Skip to main content

Negotiate Quote

Submits a counter-offer on an existing quote. The products you send get the new quantities and requested prices, the quote status changes to negotiated, and the offer is added to the quote's timeline.

HTTP Request​

  • URL: /quote/negotiate/{id}
  • Method: PUT
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_WRITE_QUOTE

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the quote to negotiate.

Request Body​

The request body must be JSON and contain the following fields:

FieldTypeRequiredDescription
companyStringYesID of the company the quote belongs to.
customerStringYesID of the customer making the offer.
productsArrayYesProducts with new quantities or prices. See below.
commentStringNoComment to add with the offer.

Product Object​

FieldTypeRequiredDescription
productStringYesID of a product on the quote.
variantStringNoID of the variant, for products with variants.
quantityNumberNoNew quantity. If omitted, the current quantity is kept.
requestedPriceNumberNoNew requested price per unit. If omitted, the current price is kept.

cURL Example​

curl --location --request PUT '<BASE_URL>/quote/negotiate/6720f3c1a8b4e21f9c3d5a10' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"company": "65ba028af764f931f1c7c18b",
"customer": "66d07121db294e0b70180bf6",
"products": [
{
"product": "65b88ef5045a7d009e79974b",
"quantity": 15,
"requestedPrice": 105
}
],
"comment": "We can commit to 15 units at this price."
}'

Response​

  • 200 OK: The offer was applied to the quote.
  • 400 Bad Request: The access token is missing or invalid, does not have the required scope, the request body is not valid, or the quote cannot be negotiated.

Sample JSON Response​

{
"success": true,
"message": "Quote Negotiate Successfully",
"data": {
"_id": "6720f3c1a8b4e21f9c3d5a10",
"id": "6720f3c1a8b4e21f9c3d5a10",
"quoteId": 1042,
"title": "Q4 Restock Quote",
"status": "negotiated",
"requestedCount": 1,
"company": "65ba028af764f931f1c7c18b",
"customer": "66d07121db294e0b70180bf6",
"products": [
{
"_id": "6720f3c1a8b4e21f9c3d5a11",
"product": "65b88ef5045a7d009e79974b",
"variant": null,
"name": "Cordless Drill 18V",
"sku": "CD-18V",
"productSku": "CD-18V",
"image": "https://cdn.example.com/products/cd-18v.webp",
"options": [],
"quantity": 15,
"price": 129,
"companyPrice": 115,
"requestedPrice": 105,
"extendedPrice": 1935,
"selectedCurrencyPrice": null
}
],
"comments": [
{
"_id": "6721b3e8d4f0a62c7e9b1f30",
"id": "6721b3e8d4f0a62c7e9b1f30",
"name": "Dana Whitfield",
"comment": "We can commit to 15 units at this price.",
"isCustomer": false,
"customer": null,
"user": null,
"replies": [],
"createdAt": "2024-10-30T11:40:24.211Z",
"updatedAt": "2024-10-30T11:40:24.211Z"
}
],
"expiryDate": "2024-11-13T14:02:09.498Z",
"createdAt": "2024-10-29T14:02:09.512Z",
"updatedAt": "2024-10-30T11:40:24.215Z"
}
}

Response Details​

FieldTypeDescription
successBooleanWhether the request was successful.
messageStringResult message.
dataObjectThe updated quote.

Quote Data​

The quote fields are described in Get Single Quote. requestedCount shows how many times the quote has been negotiated.

Notes​

  • Quotes that are completed or expired cannot be negotiated.
  • The number of negotiations allowed per quote is set in your store's quote settings. Once the limit is reached, further requests are rejected.
  • Products in the request that are not on the quote are ignored.