Documentation · API reference
POST
/api/v1/sites/{site}/requests/{id}/finishDo what a request asks: hand over the copy, or delete
This page as Markdown, or in an AI chatMore ways to read this page
Do what a request asks: hand over the copy, or delete.
# Do what a request asks: hand over the copy, or delete
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-requests-id-finish
`POST /api/v1/sites/{site}/requests/{id}/finish`
Do what a request asks: hand over the copy, or delete.
## Parameters
- `site` (in path, needed): A site's id or name
- `id` (in path, needed): The request
## What to send
`RequestDone`
- `confirm` (string): For a deletion: the visitor's ID, typed.
- `outcome` (string): For closing without doing: why.
## The answer
200, `RequestView`
- `asked` (integer, needed)
- `asked_how` (string, needed)
- `days_left` (integer, needed): Days left to answer; negative when it is late.
- `deadline` (integer, needed)
- `done` (integer or null)
- `id` (string, needed)
- `kind` (string, needed): `copy` or `deletion`.
- `label` (string, needed)
- `log` (list of LogLineView, needed)
- `number` (string, needed): `R-0031`.
- `outcome` (string, needed)
- `state` (string, needed): `open`, `done` or `closed`.
- `subject` (string, needed)
- `visitor` (string or null): The visitor it is about, while they are held.
- `will_delete` (string or null): For an open deletion: what will go and what will stay.
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/requests/{id}/finish \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
Parameters
- sitein the address
- neededA site's id or name
- idin the address
- neededThe request
What to send
RequestDone
- confirm
- stringFor a deletion: the visitor's ID, typed.
- outcome
- stringFor closing without doing: why.
The answer
Status 200
RequestView
- asked
- integerneeded
- asked_how
- stringneeded
- days_left
- integerneededDays left to answer; negative when it is late.
- deadline
- integerneeded
- done
- integer or null
- id
- stringneeded
- kind
- stringneeded`copy` or `deletion`.
- label
- stringneeded
- log
- list of LogLineViewneeded
- number
- stringneeded`R-0031`.
- outcome
- stringneeded
- state
- stringneeded`open`, `done` or `closed`.
- subject
- stringneeded
- visitor
- string or nullThe visitor it is about, while they are held.
- will_delete
- string or nullFor an open deletion: what will go and what will stay.
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/requests/{id}/finish \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/requests/{id}/finish", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());