updateNegotiableQuoteQuantities mutation
The updateNegotiableQuoteQuantities
mutation changes the quantity of one or more products in an active negotiable quote.
Use the removeNegotiableQuoteItems
mutation to completely remove a product from a negotiable quote.
This query requires a valid customer authentication token.
Syntax
1
2
3
updateNegotiableQuoteQuantities(
input: UpdateNegotiableQuoteQuantitiesInput!
): UpdateNegotiableQuoteItemsQuantityOutput
Example usage
The following example changes the quantity of two products in a negotiable quote.
Request:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
mutation {
updateNegotiableQuoteQuantities(
input: {
quote_uid: "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb"
items: [
{ quote_item_uid: "MTU=", quantity: 7 }
{ quote_item_uid: "MTY=", quantity: 8 }
]
}
) {
quote {
uid
name
updated_at
items {
uid
product {
uid
sku
name
}
quantity
prices {
price {
value
}
}
}
}
}
}
Response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"data": {
"updateNegotiableQuoteQuantities": {
"quote": {
"uid": "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb",
"name": "April 22 request",
"updated_at": "2021-04-23 14:43:42",
"items": [
{
"uid": "MTU=",
"product": {
"uid": "MjA=",
"sku": "24-UG01",
"name": "Quest Lumaflex™ Band"
},
"quantity": 7,
"prices": {
"price": {
"value": 19
}
}
},
{
"uid": "MTY=",
"product": {
"uid": "MTg=",
"sku": "24-UG02",
"name": "Pursuit Lumaflex™ Tone Band"
},
"quantity": 8,
"prices": {
"price": {
"value": 16
}
}
},
{
"uid": "MTc=",
"product": {
"uid": "MTc=",
"sku": "24-UG04",
"name": "Zing Jump Rope"
},
"quantity": 10,
"prices": {
"price": {
"value": 12
}
}
}
]
}
}
}
Input attributes
The UpdateNegotiableQuoteQuantitiesInput
input object specifies the negotiable quote ID and the items to be updated.
UpdateNegotiableQuoteQuantitiesInput attributes
The UpdateNegotiableQuoteQuantitiesInput
object contains the following attributes.
Attribute | Data Type | Description |
---|---|---|
items |
[NegotiableQuoteItemQuantityInput]! | An array of items to update |
quote_uid |
ID! | The unique ID of a NegotiableQuote object |
NegotiableQuoteItemQuantityInput attributes
The NegotiableQuoteItemQuantityInput
object contains the following attributes.
Attribute | Data Type | Description |
---|---|---|
quantity |
Float! | The new quantity of the negotiable quote item |
quote_item_uid |
ID! | The unique ID of a CartItemInterface object |
Output attributes
The UpdateNegotiableQuoteItemsQuantityOutput
output object contains the following attribute.
Attribute | Data Type | Description |
---|---|---|
quote |
NegotiableQuote! | Contains details about the negotiable quote |
NegotiableQuote attributes
The NegotiableQuote
object contains details of a negotiable quote, including its status, contents, and history.
Attribute | Data Type | Description |
---|---|---|
available_payment_methods |
[AvailablePaymentMethod] | An array of payment methods that can be applied to the negotiable quote |
billing_address |
NegotiableQuoteBillingAddress | The billing address applied to the negotiable quote |
buyer |
NegotiableQuoteUser! | The first and last name of the buyer |
comments |
[NegotiableQuoteComment!] | A list of comments made by the buyer and seller |
created_at |
String | Timestamp indicating when the negotiable quote was created |
email String |
The email address of the company user | |
history |
[NegotiableQuoteHistoryEntry!] | A list of status and price changes for the negotiable quote |
is_virtual |
Boolean | Indicates whether the negotiable quote contains only virtual products |
items |
[CartItemInterface] | The list of items in the negotiable quote |
name |
String! | The title assigned to the negotiable quote |
prices |
CartPrices | A set of subtotals and totals applied to the negotiable quote |
selected_payment_method |
SelectedPaymentMethod | The payment method that was applied to the negotiable quote |
shipping_addresses |
[NegotiableQuoteShippingAddress]! | A list of shipping addresses applied to the negotiable quote. |
status |
NegotiableQuoteStatus! | The status of the negotiable quote. Possible values are SUBMITTED, PENDING, UPDATED, OPEN, ORDERED, CLOSED, DECLINED, and EXPIRED |
total_quantity |
Float! | The total number of items in the negotiable quote |
uid |
ID! | The unique ID of a NegotiableQuote object |
updated_at |
String | Timestamp indicating when the negotiable quote was updated |
NegotiableQuoteComment attributes
The NegotiableQuoteComment
object contains details about a single comment made by the seller or the buyer.
Attribute | Data Type | Description |
---|---|---|
author |
NegotiableQuoteUser! | The first and last name of the commenter |
created_at |
String! | Timestamp indicating when the comment was created |
creator_type |
NegotiableQuoteCommentCreatorType! | Indicates whether a buyer or seller commented |
text |
String! | The plain text comment |
uid |
ID! | The unique ID of a NegotiableQuoteComment object |
NegotiableQuoteCustomLogChange attributes
The NegotiableQuoteCustomLogChange
object contains changes to a negotiable quote that were made by a third-party extension.
Attribute | Data Type | Description |
---|---|---|
new_value | String! | The new entry content |
old_value | String | The previous entry in the custom log |
title | String! | The title of the custom log entry |
NegotiableQuoteHistoryChanges attributes
The NegotiableQuoteHistoryChanges
object contains details about a single change in the history of a negotiable quote.
Attribute | Data Type | Description |
---|---|---|
comment_added |
NegotiableQuoteHistoryCommentChange | The comment provided with a change in the negotiable quote history |
custom_changes |
NegotiableQuoteCustomLogChange | Lists log entries added by third-party extensions |
expiration |
NegotiableQuoteHistoryExpirationChange | The expiration date of the negotiable quote before and after a change in the quote history |
products_removed |
NegotiableQuoteHistoryProductsRemovedChange | Lists products that were removed as a result of a change in the quote history |
statuses |
NegotiableQuoteHistoryStatusesChange | The status before and after a change in the negotiable quote history |
total |
NegotiableQuoteHistoryTotalChange | The total amount of the negotiable quote before and after a change in the quote history |
NegotiableQuoteHistoryCommentChange attributes
The NegotiableQuoteHistoryCommentChange
object contains a plain-text comment.
Attribute | Data Type | Description |
---|---|---|
comment |
String! | A simple (non-HTML) comment submitted by a seller or buyer |
NegotiableQuoteHistoryEntry attributes
The NegotiableQuoteHistoryEntry
object contains details about a change to a negotiable quote, including all previous changes made at that point.
Attribute | Data Type | Description |
---|---|---|
author |
NegotiableQuoteUser! | The person who made a change in the status of the negotiable quote |
change_type |
NegotiableQuoteHistoryEntryChangeType! | An enum that describes why the entry in the negotiable quote history changed status. Possible values are CREATED, UPDATED, CLOSED, and UPDATED_BY_SYSTEM |
changes |
NegotiableQuoteHistoryChanges | The set of changes in the negotiable quote |
created_at |
String | Timestamp indicating when the negotiable quote entry was created |
uid |
ID! | The unique ID of a NegotiableQuoteHistoryEntry object |
NegotiableQuoteHistoryExpirationChange attributes
The NegotiableQuoteHistoryExpirationChange
object lists the current expiration date of the negotiable quote, and the previous expiration date, if applicable.
Attribute | Data Type | Description |
---|---|---|
new_expiration |
String! | The expiration date after the change |
old_expiration |
String | The previous expiration date. The value will be ‘null’ if not previously set |
NegotiableQuoteHistoryProductsRemovedChange attributes
The NegotiableQuoteHistoryProductsRemovedChange
object provides details about products removed from a negotiable quote because of an action by a buyer or seller, or because the item was removed from the catalog.
Attribute | Data Type | Description |
---|---|---|
products_removed_from_catalog |
[ID] | A list of product IDs the seller removed from the catalog |
products_removed_from_quote |
[ProductInterface] | A list of products removed from the quote by either the buyer or the seller |
NegotiableQuoteHistoryStatusChange attributes
The NegotiableQuoteHistoryStatusChange
object returns the status changes during the quote’s life cycle.
Attribute | Data Type | Description |
---|---|---|
new_status |
NegotiableQuoteStatus! | The updated status |
old_status |
NegotiableQuoteStatus | The previous status. The value will be null for the first history entry in a negotiable quote |
NegotiableQuoteHistoryStatusesChange attributes
The NegotiableQuoteHistoryStatusesChange
object contains an array of all previous modifications to the negotiable quote.
Attribute | Data Type | Description |
---|---|---|
changes |
[NegotiableQuoteHistoryStatusChange!]! | A list of status changes |
NegotiableQuoteHistoryTotalChange attributes
The NegotiableQuoteHistoryTotalChange
object contains the new total price of a negotiable quote after some change has been applied.
Attribute | Data Type | Description |
---|---|---|
new_price |
Money | The total price as a result of the change |
old_price |
Money | The previous total price on the negotiable quote |
NegotiableQuoteUser attributes
The NegotiableQuoteUser
contains the first and last name of a buyer or seller.
Attribute | Data Type | Description |
---|---|---|
firstname |
String! | The first name of the buyer or seller making a change |
lastname |
String! | The buyer’s or seller’s last name |