Skip to content

API reference / RivetIT

Worksheets

GET /tickets/{id}/worksheets Bearer token or API key

List worksheets attached to a ticket

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

curl "https://YOUR-HOST/api/v1/tickets/1/worksheets" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/tickets/1/worksheets",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/tickets/1/worksheets", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/tickets/1/worksheets");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Worksheet summaries

FieldTypeDescription
[]id integer
[]template_name string
[]created_by string
[]created_at string
[]completed_at string
[]signed_name string
[]signed_at string
[]is_outtake boolean
[]signed boolean
Example response
json
[
    {
        "id": 1,
        "template_name": "string",
        "created_by": "string",
        "created_at": "string",
        "completed_at": "string",
        "signed_name": "string",
        "signed_at": "string",
        "is_outtake": true,
        "signed": true
    }
]

403Authenticated but not permitted

FieldTypeDescription
error string
POST /tickets/{id}/worksheets Bearer token or API key

Create a worksheet on a ticket from a template

Parameters

NameInTypeDescription
idrequiredpathinteger

Request body (application/json, required)

FieldTypeDescription
template_idrequired integer
is_outtake integer (0 | 1)

Example request

curl -X POST "https://YOUR-HOST/api/v1/tickets/1/worksheets" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template_id":1,"is_outtake":0}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/tickets/1/worksheets",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "template_id": 1,
        "is_outtake": 0
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/tickets/1/worksheets", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "template_id": 1,
      "is_outtake": 0
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/tickets/1/worksheets");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"template_id":1,"is_outtake":0}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

201Worksheet created

FieldTypeDescription
id integer
Example response
json
{
    "id": 1
}

400Bad request

FieldTypeDescription
error string
GET /worksheets/{id} Bearer token or API key

Worksheet detail with fields and current responses

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

curl "https://YOUR-HOST/api/v1/worksheets/1" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/worksheets/1",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheets/1", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheets/1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Worksheet detail

FieldTypeDescription
id integer
template_name string
signed_name string
signed_at string
completed_at string
signed boolean
fields array of object
fields[].id integer
fields[].name string
fields[].type string
fields[].options string
fields[].required boolean
fields[].value string
Example response
json
{
    "id": 1,
    "template_name": "string",
    "signed_name": "string",
    "signed_at": "string",
    "completed_at": "string",
    "signed": true,
    "fields": [
        {
            "id": 1,
            "name": "string",
            "type": "string",
            "options": "string",
            "required": true,
            "value": "string"
        }
    ]
}

403Authenticated but not permitted

FieldTypeDescription
error string

404Resource not found

FieldTypeDescription
error string
DELETE /worksheets/{id} Bearer token or API key

Delete a worksheet

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

curl -X DELETE "https://YOUR-HOST/api/v1/worksheets/1" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.delete(
    "https://YOUR-HOST/api/v1/worksheets/1",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheets/1", {
  method: "DELETE",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheets/1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}
POST /worksheets/{id}/sign Bearer token or API key

Sign a worksheet

Parameters

NameInTypeDescription
idrequiredpathinteger

Request body (application/json, required)

FieldTypeDescription
signed_namerequired string
signature string data:image/png;base64,... (optional)

Example request

curl -X POST "https://YOUR-HOST/api/v1/worksheets/1/sign" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"signed_name":"string","signature":"string"}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/worksheets/1/sign",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "signed_name": "string",
        "signature": "string"
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheets/1/sign", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "signed_name": "string",
      "signature": "string"
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheets/1/sign");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"signed_name":"string","signature":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}

400Bad request

FieldTypeDescription
error string
POST /worksheets/{id}/complete Bearer token or API key

Mark a worksheet complete or incomplete without signing

Parameters

NameInTypeDescription
idrequiredpathinteger

Request body (application/json, required)

FieldTypeDescription
completed boolean

Example request

curl -X POST "https://YOUR-HOST/api/v1/worksheets/1/complete" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"completed":true}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/worksheets/1/complete",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "completed": True
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheets/1/complete", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "completed": true
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheets/1/complete");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"completed":true}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}

400Bad request

FieldTypeDescription
error string

404Resource not found

FieldTypeDescription
error string
POST /worksheets/{id}/responses Bearer token or API key

Save worksheet field responses (marks complete)

Parameters

NameInTypeDescription
idrequiredpathinteger

Request body (application/json, required)

FieldTypeDescription
responses array of object
responses[].field_id integer
responses[].value string

Example request

curl -X POST "https://YOUR-HOST/api/v1/worksheets/1/responses" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"responses":[{"field_id":1,"value":"string"}]}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/worksheets/1/responses",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "responses": [
            {
                "field_id": 1,
                "value": "string"
            }
        ]
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheets/1/responses", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "responses": [
          {
              "field_id": 1,
              "value": "string"
          }
      ]
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheets/1/responses");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"responses":[{"field_id":1,"value":"string"}]}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}
GET /worksheet-templates Bearer token or API key

List worksheet templates (bare array)

Example request

curl "https://YOUR-HOST/api/v1/worksheet-templates" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/worksheet-templates",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/worksheet-templates", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/worksheet-templates");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Templates

FieldTypeDescription
[]id integer
[]name string
[]description string
Example response
json
[
    {
        "id": 1,
        "name": "string",
        "description": "string"
    }
]