Matches in other apps
zpe-reviews
mount /reviews · base https://zpe.vc/reviews · v0.3.1 · 10 operations · 8 write · 0 need no account · wip
the document this app serves now. Contract: https://zpe.vc/reviews/_/api/v1/openapi.json · sha256 6b5cb343674b
GET
/_/api/v1/reviews
Every review this account holds, newest first, with what verified it and its state
getReviews
Every review this account holds, newest first, with what verified it and its state
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The reviews this account holds, newest first, each with the state it is in and the purchase that verified it. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
429 | Too many requests: this key has spent its request ceiling. Retry after the period the answer names. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Every review this account holds, newest first, with what verified it and its state, with a token from the door.
curl -X GET 'https://zpe.vc/reviews/_/api/v1/reviews' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
GET
/_/api/v1/wall
The two populations and their counts, with the gap published only above the minimum sample
getWall
The two populations and their counts, with the gap published only above the minimum sample
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
business | query | yes | string | The business whose wall is being read, by its public id: a business that belongs to the calling account. A missing value is a 400, and an id the account does not own is a 404. |
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | Both populations and their counts, with the gap present only above the minimum sample. | object |
400 | `business` is required: name the business by its public id, `?business=<id>`. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
429 | Too many requests: this key has spent its request ceiling. Retry after the period the answer names. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
The two populations and their counts, with the gap published only above the minimum sample, with a token from the door.
curl -X GET 'https://zpe.vc/reviews/_/api/v1/wall?business=string' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/erasures
Honour an erasure request by the person's address: the contact record goes, the review becomes a tombstone, one event records it
postErasures
Honour an erasure request by the person's address: the contact record goes, the review becomes a tombstone, one event records it
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes | |
contact | string | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | The erasure was honoured — `{erased, classes, reviews, replies}` — or, for `dry_run`, `{dry_run, would_erase, reviews, replies}`. | object |
400 | The request could not be read: a JSON body naming `business` and `contact` is required. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
409 | No record for that address now: nothing under this business matches it, which is also what an erasure already honoured looks like. The record is gone and this API keeps no marker of who was erased. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Honour an erasure request by the person's address: the contact record goes, the review becomes a tombstone, one event records it, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/erasures' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string",
"contact": "string"
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/replies/forward
Turn the copy of a tenant's replies on or off and say where it goes. The stored inbox is never affected
postRepliesForward
Turn the copy of a tenant's replies on or off and say where it goes. The stored inbox is never affected
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes | |
forward_to | string | no | |
enabled | boolean | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | The setting was stored: `{ok, enabled, forward_to}`. | object |
400 | The request could not be read: a JSON body naming `business` and `enabled` is required, and a forward needs a full address to copy replies to. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Turn the copy of a tenant's replies on or off and say where it goes. The stored inbox is never affected, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/replies/forward' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string",
"forward_to": "string",
"enabled": false
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/appeals
Decide a removal appeal. Refused when the deciding principal is the one who removed it, so the chain shows two signatures
postAppeals
Decide a removal appeal. Refused when the deciding principal is the one who removed it, so the chain shows two signatures
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
review | string | yes | |
decision | "restore" | "uphold" | yes | |
note | string | no |
Responses
| status | meaning | body |
|---|---|---|
200 | The decision was recorded: `{ok, hash}` names the chain entry. | object |
400 | The request could not be read: a JSON body naming `review` and `decision` is required. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No review with that id belongs to this account. | object |
409 | The store refused the decision: the principal that removed this review cannot decide its appeal, or the review is not removed and has no removal to decide. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Decide a removal appeal. Refused when the deciding principal is the one who removed it, so the chain shows two signatures, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/appeals' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"review": "string",
"decision": "restore",
"note": "string"
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/invitations
Create an invitation per eligible purchase and, when a sender is configured, send it. One purchase buys one review, and the address is never stored
postInvitations
Create an invitation per eligible purchase and, when a sender is configured, send it. One purchase buys one review, and the address is never stored
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes | |
recipients | array of object | yes | |
window_days | number | no | |
send | boolean | no |
Responses
| status | meaning | body |
|---|---|---|
200 | What the campaign produced — `{issued, planned, refused, sent, links}` — with the links in the answer whether or not a sender is configured, because the tokens exist in no other place. | object |
400 | The request could not be read: a JSON body naming `business` and between one and 200 recipients is required. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Create an invitation per eligible purchase and, when a sender is configured, send it. One purchase buys one review, and the address is never stored, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/invitations' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string",
"recipients": [
{
"purchase": "string",
"contact": "string"
}
],
"window_days": 0,
"send": false
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/businesses
Create a business under this account. Its public id is the URL, the claim record's label and the reply local part at once
postBusinesses
Create a business under this account. Its public id is the URL, the claim record's label and the reply local part at once
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
Idempotency-Key | header | no | string | The caller's own retry handle. The same key sent twice writes one business and answers the business the first call answered. A header that is there and empty names nothing, so it is refused rather than read as a create. |
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
name | string | yes | |
public_id | string | yes | |
country | string | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | That `Idempotency-Key` was already here: nothing was written, and the business is the one the first call answered with — even when this request's words moved. | object |
201 | The business this call created, as `{business, id}`. `business` is the public id, which is the URL, the claim record's label and the reply local part at once. | object |
400 | The request could not be read | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that | object |
404 | Nothing is here | object |
409 | That public id is taken. It becomes the URL, the claim label and the reply address at once, so it is one name per business and the caller chooses another. | object |
429 | Too many requests | object |
Example
Create a business under this account. Its public id is the URL, the claim record's label and the reply local part at once, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/businesses' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"name": "string",
"public_id": "string",
"country": "string"
}'{
"business": "string",
"id": "string"
}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/purchases
Record purchases against a business, hashing each address. A purchase is the proof a review rests on, so a duplicate reference is refused rather than counted twice
postPurchases
Record purchases against a business, hashing each address. A purchase is the proof a review rests on, so a duplicate reference is refused rather than counted twice
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes | |
purchases | array of object | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | What the batch wrote — `{recorded, purchases, refused}` — one entry per row, so a partly refused batch names the rows that were refused and why. | object |
400 | The request could not be read: a JSON body naming `business` and between one and 500 purchases is required. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Record purchases against a business, hashing each address. A purchase is the proof a review rests on, so a duplicate reference is refused rather than counted twice, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/purchases' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string",
"purchases": [
{
"ref": "string",
"amount_cents": 0,
"currency": "string",
"occurred_at": 0,
"contact": "string",
"proof_kind": "receipt",
"proof_ref": "string"
}
]
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/claims
State the domain a business owns and get the record name and value that prove it, or the page tag instead
postClaims
State the domain a business owns and get the record name and value that prove it, or the page tag instead
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes | |
domain | string | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | The challenge to publish — `{business, domain, already_claimed, dns, page, note}` — with the record that wins when both proofs exist. | object |
400 | The request could not be read: a JSON body naming `business` and a domain is required, and the domain is given alone, without a scheme or a path. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
State the domain a business owns and get the record name and value that prove it, or the page tag instead, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/claims' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string",
"domain": "string"
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/claims/verify
Read the TXT record and the page, and mark the business claimed when either answers. Until then it can publish nothing
postClaimsVerify
Read the TXT record and the page, and mark the business claimed when either answers. Until then it can publish nothing
Parameters
No parameters.
Request body application/json · required
| field | type | required | notes |
|---|---|---|---|
business | string | yes |
Responses
| status | meaning | body |
|---|---|---|
200 | Claimed: `{claimed, method, reason, domain}` names which proof answered. | object |
400 | The request could not be read: a JSON body naming `business` is required, and the business states a domain before it can be verified. | object |
401 | The credential is missing, or the door did not recognise it. | object |
403 | This key may not do that: it is granted a different app, or the door named no account to scope the request to. | object |
404 | No business with that public id belongs to this account. | object |
409 | Not proved: neither the DNS TXT record nor the page tag answered, so the business is not claimed and can publish nothing yet. | object |
429 | Too many requests: this key has spent its request ceiling, or this account has used its write allowance for the hour. | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer, so the request could not be checked. | object |
Example
Read the TXT record and the page, and mark the business claimed when either answers. Until then it can publish nothing, with a token from the door.
curl -X POST 'https://zpe.vc/reviews/_/api/v1/claims/verify' \
-H 'Authorization: Bearer $ZPE_TOKEN' \
-H 'content-type: application/json' \
-d '{
"business": "string"
}'{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.