Partner screens
Serve a store-less dashboard area to accounts that act for other sellers' stores, and identify those accounts safely.
A partner screen is a plugin screen that belongs to a signed-in account rather than to one store. It serves accounts that act as partners of stores, not as their sellers.
The resellers plugin uses it for the reseller area at /dashboard/reselling, where a reseller works across every store they resell for. See Resellers.
Partner screens use the admin screen protocol: the same sandbox, message port, messages and limits. This page covers what differs.
Admin and partner screens
| Aspect | Admin screen | Partner screen |
|---|---|---|
| Catalog flag | hasAdminScreens | hasPartnerScreens |
| Document | GET /admin/ui | GET /partner/ui |
| Dashboard proxy | /plugins/<code>/*, forwarded to /admin/* | /plugin-partner/<code>/*, forwarded to /partner/* |
| Caller requirement | Seller session, store access and an installation | Any signed-in account |
| Store | Always the seller's selected store | Named per request by the screen, or none |
| Context message | novinzo:admin-context | novinzo:partner-context |
| Store header | x-novinzo-store-id | x-novinzo-partner-store-id |
Registration
Request hasPartnerScreens during registration. It defaults to false, and the partner proxy refuses a plugin without it.
Private plugins cannot have partner screens. The catalog database rejects that combination, because the partner proxy serves a plugin to accounts outside the owning store.
Deploy GET /partner/ui before Novinzo enables the flag, as for admin screens.
The dashboard currently hosts one partner page, the resellers plugin's reseller area. Coordinate with Novinzo where your partner screen appears in the dashboard.
The partner proxy
The partner proxy accepts any HTTP method under /plugin-partner/<code>/* and forwards it to the same path under your /partner surface. It applies these rules:
- A request without a session returns
401. - Paths outside
/partnerare refused before reaching your Worker. - The plugin must exist, be live and have
hasPartnerScreens. - When the request names a store, the plugin must be installed on that store.
An unknown plugin, one without partner screens, a malformed store id and a store without the plugin all return the same 404. Unreachable Workers and redirects return 502, as through the admin proxy.
Partner requests share the admin proxy's rate limit.
What your Worker receives
The proxy forwards accept, content-type and if-none-match from the caller. It adds identity headers from the session, never from the caller:
| Header | Present | Meaning |
|---|---|---|
x-novinzo-partner-seller-id | Always | The signed-in account's id. |
x-novinzo-partner-email | Once the account's email is verified | The account's verified email address. |
x-novinzo-partner-store-id | When the request names an installed store | The store the request is for. |
x-novinzo-plugin-invocation | With x-novinzo-partner-store-id | An invocation token for that store. |
x-novinzo-partner-store-role | When the account is on the team of the store it names | owner or member: the account's role on that store. |
A caller's own x-novinzo-partner-* headers are never forwarded. An account with an unverified email sends no email header at all.
Check the account's link to the store
x-novinzo-partner-store-id is not x-novinzo-store-id. The proxy checked only that your plugin
is installed on the store. Unless x-novinzo-partner-store-role puts the account on its team,
check the account's own link to the store in your plugin's records before acting for it. The
resellers plugin checks a reseller membership in the store.
x-novinzo-partner-store-role is set only when the account is on the store's team, so an owner there may act for the store as its seller would. It says nothing of a member's permissions. The resellers plugin uses it to list a product in a reseller's own store.
Partner requests never carry x-novinzo-store-id. Do not let a partner route fall back to admin-surface store handling.
The invocation token binds your core-for-plugins and backend RPC calls to the named store, as on every other surface. A request for no store carries no token, so it cannot call the platform.
The route reveals installs to signed-in accounts. A request naming a store with your plugin installed reaches your Worker, while any other store returns the proxy's 404. Answer requests for stores the account is not linked to exactly as you answer unknown stores.
The screen side
The dashboard embeds GET /partner/ui like an admin screen. Connect the port, report your height, and send novinzo:admin-ready as described in Admin screens.
Context
The dashboard posts novinzo:partner-context instead of novinzo:admin-context:
{
"type": "novinzo:partner-context",
"appearance": "dark",
"invite": null,
"ownedStores": [
{
"id": "7d5c4a7e-1f0b-4c35-9a52-1b2f0e8d9c41",
"name": "Acme Keys",
"currencyIsoCode": "EUR"
}
]
}| Field | Meaning |
|---|---|
appearance | light or dark. |
invite | The ?invite=<token> the page was opened with, passed on unchecked, or null. |
ownedStores | The stores the account owns, with their names and currencies. Empty when it owns none. |
ownedStores is for showing choices. Never trust it for a request: name the store on the request, and check x-novinzo-partner-store-role on your Worker.
There is no placement, because a partner screen is always a page. There is no currency, because it belongs to no store. Page views (novinzo:admin-open-view) do not apply.
Requests
Send novinzo:admin-request with a path under /partner. Name the store a call is for with storeId, or leave it out to call for no store:
{
"type": "novinzo:admin-request",
"id": "7",
"method": "GET",
"path": "/partner/summary",
"storeId": "7d5c4a7e-1f0b-4c35-9a52-1b2f0e8d9c41"
}The dashboard never adds the seller's active store to a partner request. Keep the selected store in your screen's state and name it on every request.
| Request | Result |
|---|---|
Path outside /partner | novinzo:admin-request-failed with reason path-not-allowed. |
storeId that is not a UUID | novinzo:admin-request-failed with reason invalid-request. |
| Store without your plugin | novinzo:admin-response with status 404 from the proxy. |
storeId from an admin screen | novinzo:admin-request-failed with reason store-not-allowed. |
Admin screens cannot name a store, because every admin call is for the seller's selected store.
