Skip to content

Run the format's checks on a template's source as your workspace's own, storing nothing: every problem, and how each of its tests went

POST
/v1/buyer/templates/validate
curl --request POST \
--url https://example.com/v1/buyer/templates/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source": "example" }'

Who: a workspace’s member, staff under its support access, or its key. API keys with the buyer:read or buyer:write scope.

Media typeapplication/json
object
source
required
string

Example generated

{
"source": "example"
}

OK

Media typeapplication/json
object
problems
required
Array<object>
object
message
required
string
path
required
string
step
required
string | null
Allowed values: parse identity hosts expressions secrets personal_data tokens events bounds tests overrides
sha256
required
string
tests
required
Array<object>
object
failures
required
Array<string>
kind
required
string
name
required
string
passed
required
boolean
path
required
string
valid
required
boolean

Example

{
"problems": [
{
"step": "parse"
}
]
}

An error, as go-commons apperr maps it

Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string

Example generated

{
"error": {
"code": "example",
"fields": {
"additionalProperty": "example"
},
"message": "example"
}
}