Skip to content

Approve a list of cards, each at the version on screen

The OpenAPI spec (JSON)Licence, versions and sign-in

POST
/api/v1/decisions/approve-all
curl --request POST \
--url https://deck.example.com/api/v1/decisions/approve-all \
--header 'Content-Type: application/json' \
--cookie qd_auth=<qd_auth> \
--data '{ "cards": [ { "card_id": 41, "kind": "approve", "version": 1 }, { "card_id": 42, "kind": "adjust", "text": "Say we'\''ll pay on Friday", "version": 3 } ], "timeline": [ 118, 119 ] }'

Approve All: every card on screen with its decision (unmentioned means yes, so the app sends approve for each card the person didn’t change), and the timeline entries on screen, which move to History.

Media typeapplication/json

Approve All: every card on screen with its decision (unmentioned means yes, so the app sends approve for each card the person didn’t change), and the timeline entries on screen, which move to History.

object
cards
required
Array<object>
<= 500 items

The person’s decision on one card version, as the web app sends it.

object
card_id
required
integer format: int64
fields

The actions as the person edited them, replacing the proposed ones. Absent means as proposed.

Array | null

One proposed action. The type tag is also the name runner.eligible uses.

One of:
object
account
required
string
>= 1 characters <= 100 characters
thread_id
required
string
>= 1 characters <= 200 characters
type
required
string
Allowed value: archive
key
additional properties
kind
required

The kinds of decision the person makes on a card.

string
Allowed values: approve edit adjust move_down move_up later stop
text

An adjustment or comment: free text makes it the agent’s decision.

string | null
version
required

The version on screen. A card that has a newer version by the time the decision is released is skipped.

integer format: int64
single

One default’s own Approve rather than Approve All: the same undo window, but no Inbox snapshot in History.

boolean | null
timeline
Array<integer>
default: <= 1000 items

Example

{
"cards": [
{
"card_id": 41,
"kind": "approve",
"version": 1
},
{
"card_id": 42,
"kind": "adjust",
"text": "Say we'll pay on Friday",
"version": 3
}
],
"timeline": [
118,
119
]
}

What Approve All did: nothing is released until release_at, and Undo with batch cancels it until then.

Media typeapplication/json

What Approve All did: nothing is released until release_at, and Undo with batch cancels it until then.

object
batch
required
string
cards
required

The cards with a decision in this batch.

Array<integer>
release_at
required
string
skipped
required
Array<object>

A card Approve All left alone, and why.

object
card_id
required
integer format: int64
reason
required
string

Example generated

{
"batch": "example",
"cards": [
1
],
"release_at": "example",
"skipped": [
{
"card_id": 1,
"reason": "example"
}
]
}

An error, with its message.

Media typeapplication/json

Every error the REST API returns, with an HTTP status.

object
error
required
string

Example generated

{
"error": "example"
}