archiveBid
Requires permission biddesk:bid:archive.
Archives a closed bid (won, lost, no bid or cancelled); an open or submitted one is refused with BID_NOT_CLOSED. Refused with VERSION_CONFLICT when someone saved first. Requires Bid Desk and permission to archive 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 ArchiveBid($expectedVersion: Int!, $id: ID!) {
archiveBid(expectedVersion: $expectedVersion, id: $id) {
id
bidNumber
title
status
createdAt
closedAt
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ArchiveBid($expectedVersion: Int!, $id: ID!) {\n archiveBid(expectedVersion: $expectedVersion, id: $id) {\n id\n bidNumber\n title\n status\n createdAt\n closedAt\n }\n}",
"variables": {
"expectedVersion": 0,
"id": "id"
}
}
EOF
Variables:
{
"expectedVersion": 0,
"id": "id"
}
Response:
{
"data": {
"archiveBid": {
"id": "id",
"bidNumber": "string",
"title": "string",
"status": "CANCELLED",
"createdAt": "2025-01-15T00:00:00Z",
"closedAt": "2025-01-15T00:00:00Z"
}
}
}
archiveBid(
expectedVersion: Int!
id: ID!
): Bid!
Arguments
archiveBid.expectedVersion ● Int! non-null scalar
The version the archive is based on.
archiveBid.id ● ID! non-null scalar
The bid to archive.
Type
Bid object
One bid: its number, title, customer, owner, due date, status, stage, confidentiality and estimated value in the organization's base currency.