Skip to content

Approve or reject several designs

POST
/v1/designs/decisions
curl --request POST \
--url https://api.pixonaut.app/v1/designs/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "action": "approve", "designs": [ { "expectedRevision": 1, "id": "dsn_3f2a9c1e" }, { "expectedRevision": 2, "id": "dsn_8b41d07a" } ] }'

Operation ID: designs.decide

Approves or rejects up to 200 designs, each as POST /v1/designs/{id}/approve or /reject decides it: the same grant, the same refusals, its own event and audit entry. Each design answers its own outcome, in the order the request named them; one refused leaves the others to be decided, so a 200 may hold refusals. afterDays schedules each approval, and reason is kept on each rejected design. Repeating a decision that already stands answers it again and records nothing more. Deleting several designs is one DELETE /v1/designs/{id} each.

Media typeapplication/json
One of:
object
action
required
string
Allowed values: approve
afterDays

Approve after this many days instead of now, 1 to 60: a window for the customer to change their mind. Left out, the design is approved now.

integer
> 0 <= 60
designs
required

The designs to decide, at most 200, each named once. Their outcomes are answered in this order.

Array<object>
>= 1 items <= 200 items
object
expectedRevision
required

The design’s revision as the caller read it. When the design has been corrected since, it is refused revision_changed with the revision it has now.

integer
> 0
id
required
string
>= 1 characters

Examples

Exampleexample

Example

{
"action": "approve",
"designs": [
{
"expectedRevision": 1,
"id": "dsn_3f2a9c1e"
},
{
"expectedRevision": 2,
"id": "dsn_8b41d07a"
}
]
}

Each design’s outcome

Media typeapplication/json
object
outcomes
required
Array
One of:
object
id
required
string
ok
required
boolean
status
required
string

Examples

Exampleexample

Example

{
"outcomes": [
{
"id": "dsn_3f2a9c1e",
"ok": true,
"status": "approved"
},
{
"error": "revision_changed",
"id": "dsn_8b41d07a",
"ok": false,
"revision": 3
}
]
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: bad_request

Media typeapplication/json
object
error
required
string

Examples

Examplebad_request

bad_request

{
"error": "bad_request"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, forbidden, feature_disabled, workspace_suspended

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: payload_too_large

Media typeapplication/json
object
bytes
number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

Examplepayload_too_large

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 0
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors