Skip to content
Suomi

Create a check list in the organisation's library

POST
/v1/organisation/check-lists
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/organisation/check-lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "items": [ { "name": "example", "description": "example", "required": true } ] }'

A repeat with the same Idempotency-Key and body returns the first check list with 200; another body answers 422. Once it is deleted, the key answers 410 RESOURCE_DELETED and makes nothing.

idempotency-key
string
/^[\x21-\x7e]{1,255}$/

A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.

Media typeapplication/json

The body of createOrganisationCheckList.

object
name
required
string
>= 1 characters <= 255 characters
description
string | null
<= 20000 characters
items
required
Array<object>
>= 1 items <= 100 items

An item of NewCheckList.

object
name
required
string
>= 1 characters <= 255 characters
description
string | null
<= 20000 characters
required
boolean
default: true

The check list an earlier call with the same Idempotency-Key created

Media typeapplication/json

One of the organisation’s check lists with its current items.

object
id
required
string format: uuid
name
required
string
description
required
string | null
current_version
required
integer | null format: int32
created_by
required
string | null
created_at
required
string
modified_date
required
string
items
required
Array<object>

An item of OrganisationCheckList.

object
id
required
string format: uuid
version_id
required
string format: uuid
sort_order
required
integer format: int32
name
required
string
description
required
string | null
required
required
boolean

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"description": "example",
"current_version": 1,
"created_by": "example",
"created_at": "example",
"modified_date": "example",
"items": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"version_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"sort_order": 1,
"name": "example",
"description": "example",
"required": true
}
]
}

The check list

Media typeapplication/json

One of the organisation’s check lists with its current items.

object
id
required
string format: uuid
name
required
string
description
required
string | null
current_version
required
integer | null format: int32
created_by
required
string | null
created_at
required
string
modified_date
required
string
items
required
Array<object>

An item of OrganisationCheckList.

object
id
required
string format: uuid
version_id
required
string format: uuid
sort_order
required
integer format: int32
name
required
string
description
required
string | null
required
required
boolean

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"description": "example",
"current_version": 1,
"created_by": "example",
"created_at": "example",
"modified_date": "example",
"items": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"version_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"sort_order": 1,
"name": "example",
"description": "example",
"required": true
}
]
}

Invalid body or parameters

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE; INSUFFICIENT_ROLE when the principal is not an admin of its organisation; PUBLIC_API_DISABLED

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Not one of the organisation’s own; a project’s answers 404 here

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}