Authorize · Guide
List or unlist your store
Use this to put your store in the store directory, so agents and people can find it, or to take it out. Stores are listed automatically once their origin is proven and they use Provenance there; you choose categories and can opt out at any time.
Before you begin: accept agent orders on that origin with network grants, cart approvals or Identify.
1. Register the origin
curl -s -X POST $PROVENANCE_API/v1/authorize/stores \
-H "Authorization: Bearer $PROVENANCE_KEY" -H "Content-Type: application/json" \
-d '{ "origin": "https://larkspur-paper.example" }'
const entry = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ origin: "https://larkspur-paper.example" }),
})).json();
import os
import httpx
api, h = os.environ["PROVENANCE_API"], {"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}
entry = httpx.post(f"{api}/v1/authorize/stores", headers=h, json={"origin": "https://larkspur-paper.example"}).json()
The response's proof says what to publish. You can also do this in Settings → Store → Network → Store listing.
2. Publish the proof
Publish either one; we check it daily.
- A file at
https://your-origin/.well-known/provenance-store.jsoncontaining{"store_id": "nst_…"}, or - A DNS TXT record at
_provenance.your-hostwith the valueprovenance-store=nst_….
Then check it now with POST /. The listing field says where it stands:
listing | Meaning |
|---|---|
listed | In the directory now |
no_ | Proven, but no Provenance use on the origin in 30 days |
proof_ | The proof doesn't name this store id |
proof_ | The proof couldn't be reached; the listing is paused |
unlisted | You chose not to list it |
3. Choose categories
PATCH / with up to five categories from the fixed list. Agents with network grants limited to categories can buy only at stores in them.
4. Show the mark
<script type="module" src="https://unpkg.com/@provenance/embed"></script>
<provenance-badge kind="store" base-url="https://sandbox-api.provenanceauth.com"></provenance-badge>
The badge checks the page's own origin against the directory and renders Accepts Provenance only while you're listed.
Unlist your store
Send {"listed": false} to PATCH /, or choose Don't list my store in the console. The store leaves the directory within an hour. Removing the origin with DELETE / also removes the entry.
Errors you might see
| Code | What to do |
|---|---|
network_ | The origin is already registered. Use its existing entry. |
parameter_ | The origin isn't an https origin, or a category isn't on the list. |