Skip to content

Where an asset is used

GET
/v1/assets/{id}/usage
curl --request GET \
--url https://api.pixonaut.app/v1/assets/example/usage \
--header 'Authorization: Bearer <token>'

Operation ID: assets.usage.get

Every use of a finished asset, grouped, and not paged: the templates, blank photos and workspace logo a delete is refused over, and the orders and committed designs that keep a customer’s picture. A member sees the orders only with orders:read and the designs only with designs:read; withheld counts what was left out. A delete still answers its own 409 when a use lands after this read.

id
required
string

Where the asset is used

Media typeapplication/json
object
blanks
required

Every blank mockup photo the asset is.

Array<object>
object
blankId
required
string
mockupId
required
string | null
name
required
string
photo
required

The mockup photo’s label, such as the colour it shows.

string | null
placementId
required
string | null
designs
required

Every committed design that names the asset and has no order yet: it keeps the picture as an order does.

Array<object>
object
designId
required
string
externalRef
required
string | null
status
required
string
logo
required

Whether the asset is the workspace logo.

boolean
orders
required

Every order of a print of a design that names the asset.

Array<object>
object
externalRef
required
string | null
orderId
required
string
status
required
string
templates
required

Every template whose draft (version: null) or a published version names the asset.

Array<object>
object
baseId
required
string
deleted
required
boolean
name
required
string
version
required
number | null
withheld
required

What the answer leaves out for want of a grant, so an empty group is not read as an unused asset. A secret key is shown everything.

object
designs
required

How many designs designs leaves out because the caller may not read designs (designs:read); 0 when they are listed.

integer
orders
required

How many orders orders leaves out because the caller may not read orders (orders:read); 0 when they are listed.

integer

Examples

Exampleexample

Example

{
"blanks": [
{
"blankId": "blank_8c1f2a3b4d5e6f708192a3b4",
"mockupId": "natural",
"name": "Tote bag",
"photo": "Natural",
"placementId": "front"
}
],
"designs": [
{
"designId": "dsn_7b21e0c94a5f4d38",
"externalRef": "cart-line-88",
"status": "committed"
}
],
"logo": false,
"orders": [
{
"externalRef": "1042",
"orderId": "ord_3f9a2c71d8e44b0a",
"status": "shipped"
}
],
"templates": [
{
"baseId": "graduation-sign",
"deleted": false,
"name": "Graduation sign",
"version": null
},
{
"baseId": "graduation-sign",
"deleted": false,
"name": "Graduation sign",
"version": 4
}
],
"withheld": {
"designs": 0,
"orders": 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: 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: not_found

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

not_found

{
"error": "not_found"
}
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