customerAcceptQuote
Requires a customer (portal or buyer app) session.
Accept a quote: marks ACCEPTED + notifies the seller. Optional poNumber is stored as the quote reference and becomes the order's customerPoNumber on conversion. The order itself is placed via customerPlaceOrderFromQuote or by staff. Errors: QUOTE_NOT_ACCEPTABLE, QUOTE_EXPIRED, QUOTE_VERSION_CONFLICT, PO_NUMBER_TOO_LONG. screen 13.
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 CustomerAcceptQuote($quoteId: ID!) {
customerAcceptQuote(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 CustomerAcceptQuote($quoteId: ID!) {\n customerAcceptQuote(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": {
"customerAcceptQuote": {
"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"
}
]
}
}
}
customerAcceptQuote(
expectedVersion: Int
poNumber: String
quoteId: ID!
): CustomerQuoteDetail!
Arguments
customerAcceptQuote.expectedVersion ● Int scalar
The version of the quote you last read. The change is refused if someone else changed it since.
customerAcceptQuote.poNumber ● String scalar
Buyer's PO number, persisted to Quote.reference → SalesOrder.customerPoNumber.
customerAcceptQuote.quoteId ● ID! non-null scalar
The ID of the quote.
Type
CustomerQuoteDetail object
Full portal-facing quote detail. screen 13.