Skip to content

Change this store's origins, brand or print files

PATCH
/v1/connect
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.

Media typeapplication/json
object
additionalOrigins

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.

Array<string>
brandId

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.

string | null
printFileForm

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.

string | null
Allowed values: flat layered layered_live_text
printFileTextTolerance
One of:
object
unit
required

Device pixels.

string
Allowed values: px
value
required

How many.

number
>= 1 <= 100

Examples

Connecting a store: Choosing the store's brand

{
"brandId": "br_3f6c1a2e-9b4d-4e7a-8c5f-000000000002"
}

The store’s connection

Media typeapplication/json
object
allowedOrigins
required

The publishable key’s origins, the site’s own first.

Array<string>
assetTtlHours
required

Hours a customer upload nothing holds is kept: the workspace’s retention, else the platform’s default.

number
brandId
required

The brand chosen for this store, one of brands; null when it follows the workspace’s default brand.

string | null
branding
required

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
accentColor
required

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.

string | null
brandId
required

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.

string | null
logoUrl
required

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.

string | null
brands
required

The workspace’s brands, the default first, then by name: what the store may choose with PATCH /v1/connect.

Array<object>
object
accentColor
required

Its accent colour, as branding.accentColor.

string | null
id
required
string
isDefault
required

Whether it is the workspace’s default brand, which a store with no brand of its own is drawn in.

boolean
logoUrl
required

An address its logo loads from for a while, as branding.logoUrl; null when it has none.

string | null
name
required
string
connectionId
required
string
defaultLanguage
required

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.

string
deliverOrdersTo
required

The workspace’s saved address every new order ships to instead of its customer. null when orders ship to their customer.

object
id
required
string
name
required
string
environment
required
string
name
required

The integration key’s name, which a member may have renamed in the studio.

string
printFileForm
required

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.

string | null
printFileTextTolerance
required
One of:
object
unit
required

Device pixels.

string
Allowed values: px
value
required

How many.

number
>= 1 <= 100
printing
required

The workspace’s print defaults a template falls back to: its own, else the product’s.

object
defaultBleedMm
required

The bleed past the trim that artwork without a blank prints with, in millimetres.

number
<= 50
defaultSafeAreaMm
required

The safe area inside the trim, in millimetres, on the same terms as defaultBleedMm.

number
<= 50
minPrintDpi
required

The minimum print resolution, in dots per inch, a design’s pictures are judged against when their template sets none.

number
> 0 <= 1200
printFileForm
required

The form of print files of designs this store sends: its own choice, else the workspace’s. A template’s own choice outranks it.

string
printFileTextTolerance
required
One of:
object
unit
required

Device pixels.

string
Allowed values: px
value
required

How many.

number
>= 1 <= 100
proofWatermark
required

Whether a newly rendered proof carries a watermark.

boolean
reachable
required

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.

boolean
siteUrl
required
string
tenantId
required
string
tenantName
required

The workspace’s name. A sandbox is named after its live workspace.

string
tenantSlug
required

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.

string
webhook
required

The store’s webhook endpoint as it stands.

object
active
required
boolean
id
required
string
reachable
required

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.

boolean
url
required

Where its webhooks go, which PATCH /v1/webhooks/{id} changes.

string
webhookEndpointId
required
string

Examples

Exampleexample

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"
}
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: invalid_origin, too_many_origins, invalid_input

Media typeapplication/json
object
error
required
string
max

Always sent with too_many_origins.

integer
origin

Always sent with invalid_origin.

string

Examples

invalid_input

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

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, brand_not_found

Media typeapplication/json
object
error
required
string

Examples

brand_not_found

{
"error": "brand_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: payload_too_large

Media typeapplication/json
object
bytes
number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

Examplepayload_too_large

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 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: 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