B2B feature. Learn more
setNegotiableQuoteShippingMethods mutation
The setNegotiableQuoteShippingMethods
mutation sets one or more delivery methods on a negotiable quote. By default, the following delivery methods are supported:
Label | Carrier code | Method code |
---|---|---|
DHL | dhl | Varies |
Federal Express | fedex | Varies |
Flat Rate | flatrate | flatrate |
Free Shipping | freeshipping | freeshipping |
Best Way | tablerate | bestway |
United Parcel Service | ups | Varies |
United States Postal Service | usps | Varies |
The negotiable quote must be in the UPDATED state to successfully set a shipping address.
This query requires a valid customer authentication token.
Syntax
Copied to your clipboardsetNegotiableQuoteShippingMethods(input: SetNegotiableQuoteShippingMethodsInput!): SetNegotiableQuoteShippingMethodsOutput
Reference
The setNegotiableQuoteShippingMethods
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example sets the shipping method for a negotiable quote.
Request:
Copied to your clipboardmutation {setNegotiableQuoteShippingMethods(input: {quote_uid: "z13H2xRCqEiyVoPJmSmekvhOo4GdsVSp",shipping_methods: [{carrier_code: "tablerate"method_code: "bestway"}]}) {quote {uidshipping_addresses {selected_shipping_method {carrier_codecarrier_titlemethod_codemethod_titleamount {valuecurrency}}}}}}
Response:
Copied to your clipboard{"data": {"setNegotiableQuoteShippingMethods": {"quote": {"uid": "prFSdZyHOpMXeiJ32XlBzd8e1Mte9loS","shipping_addresses": [{"selected_shipping_method": {"carrier_code": "tablerate","carrier_title": "Best Way","method_code": "bestway","method_title": "Table Rate","amount": {"value": 29.95,"currency": "USD"}}}]}}}}