Skip to main content
PATCH
Update a connector

Authorizations

Authorization
string
header
required

A secret key from Print.App admin → Domains → Secret keys, sent as Authorization: Bearer sk_…. Server-side only.

Path Parameters

id
string
required

The connector id.

Body

application/json

The fields to change. Every design the connector is attached to follows.

title
string

The connector's name, shown in the dashboard.

Required string length: 1 - 200
mode
enum<string>

What the connector does:

  • pageIndex: Shows only the pages a choice maps to (to: page numbers such as 1 or 1,2). The other pages are set aside: not shown, printed or saved.
  • designSelector: Opens another design for each choice (to: a design id). Every design it can open must be assigned to the product and carry this connector too.
  • pageClone: Repeats one page (page, default the first) as many times as the number chosen, when the editor opens.
  • pageCount: Sends the number of pages to the field as the customer adds or removes pages (editor to product page).
  • printedPageCount: Sends the number of pages (sides) that carry a print to the field, so the price can follow (editor to product page). The field takes a number.
  • pageWidth: Sets the page width from a number field, in the design's unit (a Print Options size field carries its own). With twoWay, a resize in the editor is sent back.
  • pageHeight: Sets the page height from a number field, in the design's unit (a Print Options size field carries its own). With twoWay, a resize in the editor is sent back.
  • pageOrientation: Turns the pages (or page alone) landscape or portrait, from the choice's wording or its mapping (to: landscape or portrait).
  • textValue: Puts what the customer types into the text item titled text. With twoWay, edits in the editor are sent back.
  • underlayColor: Sets the product colour of an underlay design (a T-shirt, a mug): to is a hex colour, or leave the choice unmapped when it is the colour's name in the design.
  • event: Fires an editor event (event.name, with event.data) when the field changes. For integrations that listen to editor events.
Available options:
pageIndex,
designSelector,
pageClone,
pageCount,
printedPageCount,
pageWidth,
pageHeight,
pageOrientation,
textValue,
underlayColor,
event
source
object

Where on the product page the connector reads (and, for two-way modes, writes): a CSS selector for a control of the store's theme, or a Print Options field by role (preferred: one connector then works on every product) or by field id. GET /v2/product-page lists both for a page.

mappings
object[]

What each choice on the product page becomes in the editor. from is the choice as the page sends it: its value, or for dropdowns and Print Options choices also the text the customer sees (case and surrounding spaces ignored). Radio choices send their value only.

Maximum array length: 200
twoWay
boolean
default:true

For pageWidth, pageHeight, textValue and underlayColor: also send changes made in the editor back to the product page.

page
integer | null

For pageClone, pageWidth, pageHeight and pageOrientation: the page (from 1) it acts on. Default: the first page (pageOrientation: every page).

Required range: 1 <= x <= 500
text
string | null

For textValue: the title of the text item it fills.

Required string length: 1 - 200
event
object | null

For event: the editor event to fire.

Response

OK.

Links an option on a store's product page to the editor: the choice a customer makes shows the right pages, opens the right design, sets the size or the colour.

object
string
required
Allowed value: "connector"
id
string | null
required

null for a connector tried in a test without saving it.

title
string | null
required
mode
string
required

One of: pageIndex, designSelector, pageClone, pageCount, printedPageCount, pageWidth, pageHeight, pageOrientation, textValue, underlayColor, event.

source
object
required
query
string
required

The source as the editor stores it: the selector, or po:role/<role>, po:field/<id>.

mappings
object[]
required
twoWay
boolean
required
page
integer | null
required
text
string | null
required
event
object | null
required
created
string<date-time> | null
required
modified
string<date-time> | null
required