closeBid
Requires permission biddesk:bid:update.
Closes a submitted bid as won, lost or no decision together with its debrief: both are saved or neither. When the bid's released quote is still open and the caller may update quotes, the quote is marked lost with the same reason and competitor; the result says whether that sync ran. Requires Bid Desk. Requires permission to update bids.
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 CloseBid($input: CloseBidInput!) {
closeBid(input: $input) {
bid {
id
bidNumber
title
customerName
ownerName
status
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CloseBid($input: CloseBidInput!) {\n closeBid(input: $input) {\n bid {\n id\n bidNumber\n title\n customerName\n ownerName\n status\n }\n }\n}",
"variables": {
"input": {
"bidId": "id",
"expectedVersion": 0,
"outcome": "LOST"
}
}
}
EOF
Variables:
{
"input": {
"bidId": "id",
"expectedVersion": 0,
"outcome": "LOST"
}
}
Response:
{
"data": {
"closeBid": {
"bid": {
"id": "id",
"bidNumber": "string",
"title": "string",
"customerName": "string",
"ownerName": "string",
"status": "CANCELLED"
}
}
}
}
closeBid(
input: CloseBidInput!
): BidCloseResult!
Arguments
closeBid.input ● CloseBidInput! non-null input
The bid, its version, the outcome and the debrief.
Type
BidCloseResult object
A closed bid, its debrief and the quote sync result.