View as Markdown

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" }'

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.json containing {"store_id": "nst_…"}, or
  • A DNS TXT record at _provenance.your-host with the value provenance-store=nst_….

Then check it now with POST /v1/authorize/stores/{id}/check. The listing field says where it stands:

listingMeaning
listedIn the directory now
no_recent_activityProven, but no Provenance use on the origin in 30 days
proof_failedThe proof doesn't name this store id
proof_unreachableThe proof couldn't be reached; the listing is paused
unlistedYou chose not to list it

3. Choose categories

PATCH /v1/authorize/stores/{id} 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 /v1/authorize/stores/{id}, or choose Don't list my store in the console. The store leaves the directory within an hour. Removing the origin with DELETE /v1/authorize/stores/{id} also removes the entry.

Errors you might see

CodeWhat to do
network_store_takenThe origin is already registered. Use its existing entry.
parameter_invalidThe origin isn't an https origin, or a category isn't on the list.

See also