saveBidTemplate
Requires permission biddesk:settings:manage.
Creates a bid template, or changes one when id is given; saving an archived template's name restores it, and marking one the default clears the others. Refused with a TEMPLATE_* code when the stages or working week are invalid, TEMPLATE_NAME_TAKEN on a clash and 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 SaveBidTemplate($input: SaveBidTemplateInput!) {
saveBidTemplate(input: $input) {
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 SaveBidTemplate($input: SaveBidTemplateInput!) {\n saveBidTemplate(input: $input) {\n id\n name\n createdAt\n deletedAt\n isDefault\n updatedAt\n stages {\n daysBeforeDue\n stageKey\n }\n }\n}",
"variables": {
"input": {
"name": "string",
"stages": [
{
"daysBeforeDue": 0,
"stageKey": "APPROVAL"
}
],
"workingDays": [
0
]
}
}
}
EOF
Variables:
{
"input": {
"name": "string",
"stages": [
{
"daysBeforeDue": 0,
"stageKey": "APPROVAL"
}
],
"workingDays": [
0
]
}
}
Response:
{
"data": {
"saveBidTemplate": {
"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"
}
]
}
}
}
saveBidTemplate(
input: SaveBidTemplateInput!
): BidTemplate!
Arguments
saveBidTemplate.input ● SaveBidTemplateInput! non-null input
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.