customerCancelQuote
Requires a customer (portal or buyer app) session.
Cancel one of the buyer's own quotes (reason optional). Delegates to QuotesService.update({status: 'CANCELLED'}) — the same transition/converted-quote guards as the admin app's Cancel Quote action.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CustomerCancelQuote($quoteId: ID!) {
customerCancelQuote(quoteId: $quoteId) {
id
quoteNumber
status
convertedToSalesOrderId
currency
discountAmount
items {
id
uomCode
productName
variantName
lineTotal
productId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CustomerCancelQuote($quoteId: ID!) {\n customerCancelQuote(quoteId: $quoteId) {\n id\n quoteNumber\n status\n convertedToSalesOrderId\n currency\n discountAmount\n items {\n id\n uomCode\n productName\n variantName\n lineTotal\n productId\n }\n }\n}",
"variables": {
"quoteId": "id"
}
}
EOF
Variables:
{
"quoteId": "id"
}
Response:
{
"data": {
"customerCancelQuote": {
"id": "id",
"quoteNumber": "string",
"status": "string",
"convertedToSalesOrderId": "id",
"currency": "string",
"discountAmount": 0,
"items": [
{
"id": "id",
"uomCode": "string",
"productName": "string",
"variantName": "string",
"lineTotal": 0,
"productId": "id"
}
]
}
}
}
customerCancelQuote(
quoteId: ID!
reason: String
): CustomerQuoteDetail!
Arguments
customerCancelQuote.quoteId ● ID! non-null scalar
The ID of the quote.
customerCancelQuote.reason ● String scalar
Why the quote is being cancelled.
Type
CustomerQuoteDetail object
Full portal-facing quote detail. screen 13.