Edit in GitHubLog an issue
Adobe Commerce only. Learn more

Manage negotiable quotes

This topic describes the API requests required to initiate a negotiable quote and to prepare it to be converted to an order.

REST Endpoints:

Copied to your clipboard
POST /V1/negotiableQuote/request
POST /V1/negotiableQuote/draft
POST /V1/negotiableQuote/submitToCustomer
POST /V1/negotiableQuote/decline
POST /V1/negotiableQuote/pricesUpdated
GET /V1/negotiableQuote/:quoteId/comments
GET /V1/negotiableQuote/attachmentContent
PUT /V1/negotiableQuote/:quoteId/shippingMethod

NegotiableQuoteManagementInterface Parameters:

The following table lists the parameters defined in CompanyInterface.

NameDescriptionFormatRequirements
quoteId
Identifies the target quote for the operation.
integer
Required
quoteName
The name of the quote to be created.
string
Required
comment
The comment to add to the quote.
string
Optional
files
An array of files to add to the quote
array
Optional

The buyer or the seller can optionally attach up to 10 files to provide details about the quote. Each file must be converted into base64.

The files array contains the following parameters

NameDescriptionFormatRequirements
base64_encoded_data
A string in base 64 that defines the contents of the added file
string
Required
type
Defines the type of file, such as text/plain or application/pdf
string
Optional
name
The name of the file to be uploaded, such as quote.txt or quote.pdf.
string
Required

Request a negotiable quote

Before initiating a negotiable quote, the following conditions must be met:

  • A regular Commerce quote has been created (POST /V1/customers/:customerId/carts or POST /V1/customers/carts/mine)
  • The quote contains items (POST /V1/carts/:quoteId/items)

If the negotiable quote requires a shipping address (for negotiation or tax calculations), add it to the standard quote before initiating the negotiable quote (POST /V1/carts/:cartId/shipping-information)

Service Name:

negotiableQuoteNegotiableQuoteManagementV1

Sample Usage:

POST <host>/rest/<store_code>/V1/negotiableQuote/request

Copied to your clipboard
{
"quoteId": 3,
"quoteName": "First quote",
"comment": "Requesting a 5% discount",
"files": [
{
"base64_encoded_data": "VGhhbmsgeW91IGZvciByZWFkaW5nIHRoZSBNYWdlbnRvIEIyQiBkb2N1bWVudGF0aW9uLg==",
"name": "quote.txt"
}
]
}

Commerce creates a negotiable quote in the Created state.

Create draft quote for a buyer

The POST /V1/negotiableQuote/draft request creates an empty negotiable quote for a specific buyer in the Draft state. The quote is not visible to the buyer.

After creating the draft quote, use the PUT /V1/negotiableQuote/:quoteId request to modify the quote (add products, set discount, rename the quote, etc.).

Service Name:

negotiableQuoteNegotiableQuoteDraftManagementV1

Sample Usage:

POST <host>/rest/<store_code>/V1/negotiableQuote/draft

Copied to your clipboard
{
"customerId": 3
}

Submit a negotiable quote

A negotiable quote can be submitted for review when it is in one of the following system states:

  • Draft
  • Created
  • Processing by admin
  • Submitted by customer

When the negotiable quote is submitted for review:

  • Commerce checks catalog prices (price per item), cart rules, and discounts then recalculates the prices and taxes. The shipping price and the negotiated price are not affected (if they are entered into the quote).
  • Items that are no longer active or available for this buyer are removed from the quote and prices are recalculated.
  • The quote state is changed to Submitted by admin.

Service Name:

negotiableQuoteNegotiableQuoteManagementV1

Sample Usage:

POST <host>/rest/<store_code>/V1/negotiableQuote/submitToCustomer

Copied to your clipboard
{
"quoteId": 3,
"comment": "It'd be our pleasure. Please proceed with your order."
}

Update a quote

Use the PUT /V1/negotiableQuote/:quoteId request to update a quote. See Update a negotiable quote for use cases.

Recalculate prices

The process of completing a negotiable quote can take days, or even longer. During that time, the prices for the items in the quote may have changed directly or indirectly. For example, someone could have changed prices in the shared catalogs or adjusted price rules, and the prices in the negotiable quote are stale. The pricesUpdated request refreshes item prices, taxes, discounts, cart rules in the negotiable quote. Quotes that are locked for the seller will not be updated.

The request can be applied to one or more quotes at the same time.

Sample Usage:

POST <host>/rest/<store_code>/V1/negotiableQuote/pricesUpdated

Copied to your clipboard
{
"quoteIds": [3]
}

Set the shipping method

A quote must meet the following conditions to set the shipping method:

  • The system state must be created, processing_by_admin, or submitted_by_customer
  • The quote must have a shipping address but no shipping method or shipping price.

Sample Usage:

PUT <host>/rest/<store_code>/V1/negotiableQuote/3/shippingMethod

Copied to your clipboard
{
"shippingMethod": "fixedrate"
}

Decline a quote

The seller can decline a quote in any of the following system states:

  • Created
  • Processing by admin
  • Submitted by customer

Declining a quote removes all custom pricing from the quote. If the buyer places an order, their standard catalog prices and discounts are applied.

Service Name:

negotiableQuoteNegotiableQuoteManagementV1

Sample Usage:

POST <host>/rest/<store_code>/V1/negotiableQuote/decline

Copied to your clipboard
{
"quoteId": 80,
"reason": "Your order is too large. "
}

Miscellaneous operations

These tasks are not essential for completing a negotiable quote, but might be useful.

List all comments for a quote

Commerce returns all the comments associated with the specified quote ID. The comments are listed in chronological order, with the oldest comment listed first. A creator_type value of 3 indicates the buyer made the comment. If the value is 2, the seller commented.

Sample Usage:

GET <host>/rest/<store_code>/V1/negotiableQuote/87/comments

Copied to your clipboard
// Not applicable

Retrieve a negotiable quote attachment

Use the attachmentContent request to retrieve the files (in base64 format) attached to a negotiable quote.

negotiableQuoteAttachmentContentManagementV1

Sample Usage:

GET <host>/rest/<store_code>/V1/negotiableQuote/attachmentContent

Copied to your clipboard
// Not applicable
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.