Read this store's connection
const url = 'https://api.pixonaut.app/v1/connect';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/connect \ --header 'Authorization: Bearer <token>'Operation ID: connectedStore.get
Called with the store’s own integration key. Answers where the store is connected as it is now: its name after a rename in the studio, the workspace and its environment, its webhook endpoint and its publishable key’s origins. Answers the brand the store’s hosted pages are drawn in, its own or else the workspace’s default, and the workspace’s brands it may choose from with PATCH /v1/connect. Also answers, read only, the workspace settings that change what the store’s customers and merchant get, as the studio’s settings show them now: whether a proof carries a watermark, the saved address new orders ship to, the print defaults and how long a customer upload is kept. A store connected to a sandbox reads the sandbox’s. A member changes them in the studio.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The store’s connection
object
The publishable key’s origins, the site’s own first.
Hours a customer upload nothing holds is kept: the workspace’s retention, else the platform’s default.
The brand chosen for this store, one of brands; null when it follows the workspace’s default brand.
What the hosted pages the store sends customers to show. A link keeps the brand it was created in; a change applies to links created after it.
object
The colour the hosted pages are drawn in, as #rrggbb: an ink’s screen colour while the accent is linked to one. null when none is set.
The brand the store’s hosted pages are drawn in now: its own, else the workspace’s default. null only for a workspace with no brand yet.
An address the brand’s logo loads from for a while; read the connection again for a fresh one. null when no logo is set.
The workspace’s brands, the default first, then by name: what the store may choose with PATCH /v1/connect.
object
Its accent colour, as branding.accentColor.
Whether it is the workspace’s default brand, which a store with no brand of its own is drawn in.
An address its logo loads from for a while, as branding.logoUrl; null when it has none.
The workspace’s default language, one of en, sv, de, fr, es, nl, da, nb, fi: what its hosted pages and the designer are shown in when a link or a mount names no locale. English until the workspace chooses one.
The workspace’s saved address every new order ships to instead of its customer. null when orders ship to their customer.
object
The integration key’s name, which a member may have renamed in the studio.
The form print files of designs the store sends are made in, unless their template chooses otherwise: flat, layered (each layer its own PDF layer, text as shapes) or layered_live_text (plain text live as well); null follows the workspace’s setting.
The workspace’s print defaults a template falls back to: its own, else the product’s.
object
The bleed past the trim that artwork without a blank prints with, in millimetres.
The safe area inside the trim, in millimetres, on the same terms as defaultBleedMm.
The minimum print resolution, in dots per inch, a design’s pictures are judged against when their template sets none.
The form of print files of designs this store sends: its own choice, else the workspace’s. A template’s own choice outranks it.
Whether a newly rendered proof carries a watermark.
Whether the store’s webhook address answered when it was last checked: when the store was approved, or when the address was last sent to PATCH /v1/webhooks/{id}. A sandbox store whose address did not (a local machine, a private address) is connected anyway, but no delivery is enqueued for it, and it reads its events by pulling them with GET /v1/events. Always true for a live store, which is refused an address that does not answer.
The workspace’s name. A sandbox is named after its live workspace.
The workspace’s slug, unique across Pixonaut and never changed: studio pages of the workspace are under /w/<tenantSlug>/, so a link to one of its designs is /w/<tenantSlug>/designs/<id>. A sandbox has its own.
The store’s webhook endpoint as it stands.
object
Whether the store’s webhook address answered when it was last checked: when the store was approved, or when the address was last sent to PATCH /v1/webhooks/{id}. A sandbox store whose address did not (a local machine, a private address) is connected anyway, but no delivery is enqueued for it, and it reads its events by pulling them with GET /v1/events. Always true for a live store, which is refused an address that does not answer.
Where its webhooks go, which PATCH /v1/webhooks/{id} changes.
Examples
Connecting a store: Reading and changing the connection
{ "allowedOrigins": [ "https://shop.acme.example" ], "assetTtlHours": 168, "brandId": null, "branding": { "accentColor": "#1a73e8", "brandId": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000001", "logoUrl": "https://api.pixonaut.example/l/eyJhdWQiOiJsb2dvIn0.c2lnbmF0dXJl" }, "brands": [ { "accentColor": "#1a73e8", "id": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000001", "isDefault": true, "logoUrl": "https://api.pixonaut.example/l/eyJhdWQiOiJsb2dvIn0.c2lnbmF0dXJl", "name": "Acme" }, { "accentColor": "#2e7d32", "id": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002", "isDefault": false, "logoUrl": null, "name": "Acme Pets" } ], "connectionId": "sc_0b1c2d3e-4f50-4a6b-8c7d-000000000004", "defaultLanguage": "en", "deliverOrdersTo": null, "environment": "live", "name": "WooCommerce · Acme Shop (shop.acme.example)", "printFileForm": null, "printFileTextTolerance": null, "printing": { "defaultBleedMm": 3, "defaultSafeAreaMm": 3, "minPrintDpi": 150, "printFileForm": "flat", "printFileTextTolerance": { "unit": "px", "value": 1 } }, "proofWatermark": false, "reachable": true, "siteUrl": "https://shop.acme.example", "tenantId": "0b1c2d3e-4f50-4a6b-8c7d-000000000003", "tenantName": "Acme", "tenantSlug": "acme", "webhook": { "active": true, "id": "wh_5f2a9c1d7e3b4a6f8c0d2e4a", "reachable": true, "url": "https://shop.acme.example/wp-json/pixonaut/v1/webhook" }, "webhookEndpointId": "wh_5f2a9c1d7e3b4a6f8c0d2e4a"}Example
{ "allowedOrigins": [ "https://shop.acme.example" ], "assetTtlHours": 168, "brandId": null, "branding": { "accentColor": "#1a73e8", "brandId": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000001", "logoUrl": "https://api.pixonaut.example/l/eyJhdWQiOiJsb2dvIn0.c2lnbmF0dXJl" }, "brands": [ { "accentColor": "#1a73e8", "id": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000001", "isDefault": true, "logoUrl": "https://api.pixonaut.example/l/eyJhdWQiOiJsb2dvIn0.c2lnbmF0dXJl", "name": "Acme" }, { "accentColor": "#2e7d32", "id": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002", "isDefault": false, "logoUrl": null, "name": "Acme Pets" } ], "connectionId": "sc_0b1c2d3e-4f50-4a6b-8c7d-000000000004", "defaultLanguage": "en", "deliverOrdersTo": null, "environment": "live", "name": "WooCommerce · Acme Shop (shop.acme.example)", "printFileForm": null, "printFileTextTolerance": null, "printing": { "defaultBleedMm": 3, "defaultSafeAreaMm": 3, "minPrintDpi": 150, "printFileForm": "flat", "printFileTextTolerance": { "unit": "px", "value": 1 } }, "proofWatermark": false, "reachable": true, "siteUrl": "https://shop.acme.example", "tenantId": "0b1c2d3e-4f50-4a6b-8c7d-000000000003", "tenantName": "Acme", "tenantSlug": "acme", "webhook": { "active": true, "id": "wh_5f2a9c1d7e3b4a6f8c0d2e4a", "reachable": true, "url": "https://shop.acme.example/wp-json/pixonaut/v1/webhook" }, "webhookEndpointId": "wh_5f2a9c1d7e3b4a6f8c0d2e4a"}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
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"}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].