Skip to content

Create a checklist

POST
/{currentTeam}/audit-types
curl --request POST \
--url https://api.tradeops.cc/v1/example/audit-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "icon": "example", "color": "example", "settings": "example", "status": "draft" }'
currentTeam
required
string

The current team slug

include
Array<string>
Allowed values: fields fields.auditType fields.auditType.fields fields.auditType.fields.auditType fields.auditType.fields.auditType.fields
fields[audit_types]
Array<string>
Allowed values: name slug description icon color status settings created_at updated_at
fields[fields]
Array<string>
Allowed values: name label type section options validation order required score_weight conditional
Media typeapplication/json
StoreAuditTypeRequest
object
name
required
string
<= 255 characters
description
string | null
icon
string | null
<= 50 characters
color
string | null
<= 7 characters
settings

Checklist settings such as score_threshold, self_start_enabled and customer_selection.

object | null
status
string
Allowed values: draft active archived

AuditTypeResource

Media typeapplication/vnd.api+json
object
data
required
AuditTypeResource
object
id
required
string
type
required
string
Allowed value: audit_types
attributes
object
name
string
slug
string
description
string | null
icon
string | null
color
string | null
status
string
settings
object
created_at
string | null format: date-time
updated_at
string | null format: date-time
relationships
object
fields
object
data
required
Array<object>
object
id
required
string
type
required
string
Allowed value: fields
links
required
object
self
required
string
included
Array
Any of:
FieldResource
object
id
required
string
type
required
string
Allowed value: fields
attributes
object
name
string
label
string
type
string
section
string | null
options
object
validation
object
order
integer
required
boolean
score_weight
string
conditional
object | null
relationships
object
auditType
object
data
required
object
id
required
string
type
required
string
Allowed value: audit_types

Example

{
"data": {
"type": "audit_types",
"relationships": {
"fields": {
"data": [
{
"type": "fields"
}
]
}
}
},
"included": [
{
"type": "fields",
"relationships": {
"auditType": {
"data": {
"type": "audit_types"
}
}
}
}
]
}

Unauthenticated

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Authorization error

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Not found

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Validation error

Media typeapplication/json
object
message
required

Errors overview.

string
errors
required

A detailed description of each field that failed validation.

object
key
additional properties
Array<string>

Example generated

{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

Too many requests. Wait for Retry-After seconds before trying again.

Media typeapplication/json
object
message
required
string

Example generated

{
"message": "example"
}
Retry-After
integer

Seconds until you can try again.