novinzodevelopers
Your store's API

Your store's API

Read and change your store's products, orders, customers, deliveries and webhook endpoints from your own server with a store API key.

Everything the dashboard does to your store is an RPC on POST /rpc. Your own server calls the same operations with a store API key: list orders, create products, restock keys, read customers, manage the webhook endpoints created in the dashboard.

POST https://dashboard.novinzo.com/api/rpc
Authorization: Bearer novinzo_sk_…
Content-Type: application/ndjson

A key belongs to one store and acts on that store only. You need no plugin and no Worker of your own.

Create a key

In the dashboard, open Settings › Developers and choose Create API key, with the Store API key type. Only the store owner can create or revoke keys.

Choose its access, from the table below.

Choose when it expires: after 30 days, 90 days, a year, or never. Copy the novinzo_sk_… key and store it on your server. It is shown once.

AccessThe key can call
Full accessEverything you can do as the owner, except what no key can do.
Teammate accessWhat a teammate can do, in the areas you choose: Products, Theme, Apps and Sales.
Read onlyWith either access: only the operations that read, never one that changes anything.

The key list shows each key's first characters, its access, when it was last used and its status. Revoking a key refuses its next call. To rotate one, create the new key, switch your server to it, then revoke the old one.

Call an operation

Send one request envelope per line, with the operation's tag and payload:

printf '%s\n' '{"_tag":"Request","id":"1","tag":"OrdersList","payload":{"page":1,"pageSize":20},"headers":[]}' |
  curl -X POST "https://dashboard.novinzo.com/api/rpc" \
  -H "Authorization: Bearer $NOVINZO_API_KEY" \
  -H "Content-Type: application/ndjson" \
  --data-binary @-

The answer is one line with the operation's exit:

{
  "_tag": "Exit",
  "requestId": "1",
  "exit": {
    "_tag": "Success",
    "value": {
      "items": [],
      "pagination": {
        "page": 1,
        "pageSize": 20,
        "totalItems": 0,
        "totalPages": 0,
        "hasNextPage": false,
        "hasPreviousPage": false
      }
    }
  }
}

An expected failure arrives in exit with HTTP 200, as described under response lines. The key names its store, so you send no x-store-id. If you send one, it must be the key's store.

Each operation's page in the RPC reference says whether a key can call it, with a cURL sample:

AreaReference
ProductsProducts
Keys and stockProduct deliveries
OrdersOrders, Order logs, Refunds
CustomersCustomers
SubscriptionsSubscriptions
AnalyticsAnalytics
WebhooksWebhook endpoints
Unpaid checkoutsPrepared checkouts
The store itselfStore

Your apps' data

Coupons, reviews, license key settings, affiliate links and resellers belong to apps, which keep them in their own Workers. Call an app's admin API through the dashboard's plugin proxy:

curl "https://dashboard.novinzo.com/api/plugins/coupons/admin/coupon?page=1&pageSize=20" \
  -H "Authorization: Bearer $NOVINZO_API_KEY"

The app must be installed on your store. A store API key reaches an app as its access allows:

Key accessIn your apps
Full accessEvery app, as you.
Teammate accessOnly with Apps among its areas, and then only the apps that reach no area it is kept out of. It acts as a teammate, not you.
Read onlyWith either access: only requests that read.

To give a service one app and nothing else of your store, use an app API key instead. Create one under Settings › Developers, with Create API key and the App API key type, and grant it the app. It opens only the apps it is granted, and may read and change them. Resellers takes no app API key: call it with a store API key.

Either way the app receives the call as your store, never your key.

Through Resellers' API, your server reads what each key provider says of its products. ListConnections answers every connection with its provider's products, each with the status the provider gives it (a key, a label, a tone of success, warning, danger, info or neutral, and a message or null), or null when it gives none. A status is kept with the provider's manifest, which is read again once it is ten minutes old or when the provider reports a catalog change, and changes nothing a reseller may buy. When the connection's manifest.capabilities include products.changelog, GetProductChangelog answers the release notes the provider published for one of your reseller products, newest first, at most 50, each with an id, a version or null, a title, a Markdown body and publishedAt. Your resellers read the same statuses and notes through the Reseller API.

Through Affiliates' API, a site that sells with headless checkout records the affiliate arrivals its visitors make, so their sales are credited.

Your server can publish reviews through the reviews admin API. When a buyer pays on your own site, such as through headless checkout, post their review of a line of that order with CreateOrderReview:

curl -X POST "https://dashboard.novinzo.com/api/plugins/reviews/admin/reviews/orders/$ORDER_ID" \
  -H "Authorization: Bearer $NOVINZO_APP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "orderItemId": "…", "rating": 5, "message": "Arrived in minutes" }'

The review is published as the order's buyer's, as if they had left it on their order page. Only a paid order of your store can be reviewed, and each line once.

To bring reviews over from another platform, post up to 100 at a time to ImportReviews, each with your own key, its productId (and productVariantId), rating, createdAt and, when you have them, message, reply, repliedAt and customerEmail. They are published with no order. The answer has one outcome per review: Imported with its id, or Skipped with the reason, such as a product that is not one of your store's. A key imported before is answered with the same review again, so a failed call can be retried as it was.

What no key can do

Whatever its access, a key is refused these with PermissionDenied. They stay with you, signed in to the dashboard:

  • managing the team, or reading who is on it;
  • creating or revoking store API keys, or creating plugin API credentials and deploy tokens;
  • the dashboard's agent;
  • approvals you give in the browser, such as a repository claim or a theme CLI sign-in;
  • connecting a payment provider or reading its credentials;
  • where crypto payouts go, and anything your wallet signs;
  • what Novinzo records as done by you: creating a webhook endpoint, marking an order completed or accepting its payment, creating or changing the theme source and rotating its preview link, and listing or revoking theme dev sessions;
  • what only an app calls, such as publishing its own webhook events or running its payment method.

Errors and limits

FailureMeaning
AuthenticationFailedThe key is unknown, revoked or expired, or its store was deleted.
PermissionDeniedThe key's access does not cover the operation, or no key can call it.
InvalidActiveStoreHeaderThe call sent an x-store-id that is not the key's store.
HTTP 429More than 600 calls in a minute were made with the key, or with any key from your IP address. Wait for Retry-After seconds.

Keep the key on your server

A key is a password for your store. Send it only from your server, never from a browser or an app you ship: /rpc refuses browser requests from other sites.

On this page