Viewed
/api/storefront/orders/viewedThe order whose viewer the storefront proved the calling plugin acts for. The order comes from the invocation token, never from the request, so a plugin cannot read any other.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/storefront/orders/viewed"{ "orderId": "string", "paid": true, "customer": { "id": "string", "email": "string" }, "items": [ { "orderItemId": "string", "productId": "string", "productVariantId": "string", "productName": "string", "variantName": "string", "quantity": -9007199254740991 } ]}Set Injections PUT
Replaces the HTML the calling plugin adds to the store's storefront pages: `head` right before each page's </head>, `body` right before its </body>, each at most 16384 bytes, placed as given, unescaped. Every storefront page gets it except the checkout, order and subscription renewal pay pages and the pages plugins serve. Each origin list, at most 16 https origins, is added to one directive of those pages' Content Security Policy: `scriptOrigins` to script-src, `connectOrigins` (which also takes wss origins) to connect-src, and the optional `styleOrigins`, `fontOrigins`, `imgOrigins` and `frameOrigins` to style-src, font-src, img-src and frame-src. Pages show the change once core has announced it, which this call does. Idempotent. Uninstalling the plugin, or withdrawing storefront:inject, removes the injection from the pages. Requires the store to have granted the plugin storefront:inject.
RPC
Call the backend over HTTP without private packages and understand its authentication and JSON messages.
