Change this store's origins, brand or print files
const url = 'https://api.pixonaut.app/v1/connect';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"brandId":"br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pixonaut.app/v1/connect \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "brandId": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002" }'Operation ID: connectedStore.update
Called with the store’s own integration key. additionalOrigins is for a store whose pages also run on other hosts of its own domain: its counterpart with or without www., a checkout or a headless storefront. It sets the origins the publishable key takes besides the site’s own, which then admit the designer with that key and may receive a designer link’s returnUrl. An origin on any other domain is 400 invalid_origin, naming it, and nothing changes; a member mints a publishable key for it in the studio. More origins than the limit is 400 too_many_origins. Reconnecting starts again from the site’s own origin. brandId sets the brand the store’s hosted pages are drawn in: proof pages, correction links and designer links its key creates from then on, each keeping the brand it was created in. An id that is not one of the workspace’s brands is 404 brand_not_found, and nothing changes. A member may set it in the studio too; a brand a store is drawn in cannot be deleted. printFileForm sets the form print files of designs the store sends are made in, and printFileTextTolerance how far their live text may lie from its outline, each unless their template chooses otherwise; null follows the workspace’s setting.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Origins on hosts of the site’s own registrable domain, by the Public Suffix List, with the site’s scheme and port: for https://example.com, https://www.example.com or https://checkout.example.com. Each written as a browser’s Origin header spells it, with no path and no wildcard. At most 10, listed after the site’s own in the order given; an empty list takes them away. The site’s own origin is always kept. Omitted, the origins stay as they are.
The brand the store’s hosted pages are drawn in, one of GET /v1/connect’s brands, or null for the workspace’s default. Omitted, the brand stays as it is.
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.
Examples
Connecting a store: Choosing the store's brand
{ "brandId": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002"}Connecting a store: Reading and changing the connection
{ "additionalOrigins": [ "https://www.shop.acme.example", "https://checkout.acme.example" ]}Example
{ "additionalOrigins": [ "https://www.shop.acme.example", "https://checkout.acme.example" ]}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
Example
{ "allowedOrigins": [ "https://shop.acme.example", "https://www.shop.acme.example", "https://checkout.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: invalid_origin, too_many_origins, invalid_input
object
Always sent with too_many_origins.
Always sent with invalid_origin.
Examples
invalid_input
{ "error": "invalid_input"}invalid_origin
{ "error": "invalid_origin", "origin": "string"}too_many_origins
{ "error": "too_many_origins", "max": 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
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, brand_not_found
object
Examples
brand_not_found
{ "error": "brand_not_found"}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: payload_too_large
object
Always sent with payload_too_large.
Examples
payload_too_large
{ "error": "payload_too_large", "maxBytes": 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: 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].