archiveBidTemplate
Requires permission biddesk:settings:manage.
Archives a bid template; saving its name again restores it. Plans already laid out keep their dates. Refused with VERSION_CONFLICT when someone saved first. Requires Bid Desk and permission to manage Bid Desk settings.
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 ArchiveBidTemplate($expectedVersion: Int!, $id: ID!) {
archiveBidTemplate(expectedVersion: $expectedVersion, id: $id) {
id
name
createdAt
deletedAt
isDefault
updatedAt
stages {
daysBeforeDue
stageKey
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ArchiveBidTemplate($expectedVersion: Int!, $id: ID!) {\n archiveBidTemplate(expectedVersion: $expectedVersion, id: $id) {\n id\n name\n createdAt\n deletedAt\n isDefault\n updatedAt\n stages {\n daysBeforeDue\n stageKey\n }\n }\n}",
"variables": {
"expectedVersion": 0,
"id": "id"
}
}
EOF
Variables:
{
"expectedVersion": 0,
"id": "id"
}
Response:
{
"data": {
"archiveBidTemplate": {
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"isDefault": true,
"updatedAt": "2025-01-15T00:00:00Z",
"stages": [
{
"daysBeforeDue": 0,
"stageKey": "APPROVAL"
}
]
}
}
}
archiveBidTemplate(
expectedVersion: Int!
id: ID!
): BidTemplate!
Arguments
archiveBidTemplate.expectedVersion ● Int! non-null scalar
The version the archive is based on.
archiveBidTemplate.id ● ID! non-null scalar
The template.
Type
BidTemplate object
A bid template: ordered stages, each due a number of working days before a bid's due date, and the working week it counts in.