Where an asset is used
const url = 'https://api.pixonaut.app/v1/assets/example/usage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Where the asset is used
object
Every blank mockup photo the asset is.
object
The mockup photo’s label, such as the colour it shows.
Every committed design that names the asset and has no order yet: it keeps the picture as an order does.
object
Whether the asset is the workspace logo.
Every order of a print of a design that names the asset.
object
Every template whose draft (version: null) or a published version names the asset.
object
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
How many designs designs leaves out because the caller may not read designs (designs:read); 0 when they are listed.
How many orders orders leaves out because the caller may not read orders (orders:read); 0 when they are listed.
Examples
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 }}Headers
Section titled “Headers”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
object
Examples
unauthorized
{ "error": "unauthorized"}Headers
Section titled “Headers”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
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}workspace_suspended
{ "error": "workspace_suspended"}Headers
Section titled “Headers”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
object
Examples
not_found
{ "error": "not_found"}Headers
Section titled “Headers”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
Examples
db_error
{ "error": "db_error"}Headers
Section titled “Headers”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].