data-src=../../../../../includes/saas-only.md
data-src=../../../../../includes/commerce-only.md
placeNegotiableQuoteOrderV2 mutation
data-variant=info
data-slots=text1
The placeNegotiableQuoteOrderV2 mutation converts a negotiable quote into an order and returns the full order object.
The negotiable quote must have one of the following statuses:
- SUBMITTED
- DECLINED
- EXPIRED
If the status is DECLINED or EXPIRED, the negotiable quote is processed like a standard cart, without applying any discounts. The negotiable quote is not converted to a standard cart.
Perform the following actions before using the placeNegotiableQuoteOrderV2 mutation. It might be necessary to perform additional steps during the process of coming to an agreement during the negotiable quote lifecycle.
- Create an empty cart
- Add one or more products to the cart
- Request a negotiable quote
- Set the billing address
- Set the shipping address
- Set the shipping method
- Set the payment method
You cannot manage orders with GraphQL, because orders are part of the backend. You can use REST calls to manage orders to their completion.
Syntax
mutation {
placeNegotiableQuoteOrderV2(
input: PlaceNegotiableQuoteOrderInput
) {
PlaceNegotiableQuoteOrderOutputV2
}
}
Reference
The placeNegotiableQuoteOrderV2 reference provides detailed information about the types and fields defined in this mutation.
Example usage
Request:
mutation {
placeNegotiableQuoteOrderV2(
input: {
quote_uid: "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb"
}
) {
order {
number
token
#...
}
errors {
message
code
}
}
}
Response:
{
"data": {
"placeNegotiableQuoteOrderV2": {
"order": {
"number": "000000006",
"token": "0:3:OSScWU6PKLn3kFyMhNWyskG0opgVvFBnJmtuaFHKGwDFT83S6Kv9U39iYwixuU+vhwDz2AF4pCs3GtLhHbQ="
},
"errors": []
}
}
}
Errors
CART_NOT_FOUNDCould not find a cart with IDCART_NOT_ACTIVEThe cart isn't active.GUEST_EMAIL_MISSINGGuest email for cart is missing.UNABLE_TO_PLACE_ORDERA server error stopped your order from being placed. Please try to place your order againUNABLE_TO_PLACE_ORDERSome addresses can't be used due to the configurations for specific countriesUNABLE_TO_PLACE_ORDERThe shipping method is missing. Select the shipping method and try againUNABLE_TO_PLACE_ORDERPlease check the billing address informationUNABLE_TO_PLACE_ORDEREnter a valid payment method and try againUNABLE_TO_PLACE_ORDERSome of the products are out of stockUNDEFINEDUNDEFINED