Worksheets
- GET/tickets/{id}/worksheets
- POST/tickets/{id}/worksheets
- GET/worksheets/{id}
- DELETE/worksheets/{id}
- POST/worksheets/{id}/sign
- POST/worksheets/{id}/complete
- POST/worksheets/{id}/responses
- GET/worksheet-templates
List worksheets attached to a ticket
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
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
| Field | Type | Description |
|---|---|---|
| []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
| Field | Type | Description |
|---|---|---|
| error | string |
Create a worksheet on a ticket from a template
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| 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
| Field | Type | Description |
|---|---|---|
| id | integer |
Example response
json
{
"id": 1
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |
Worksheet detail with fields and current responses
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
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
| Field | Type | Description |
|---|---|---|
| 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
| Field | Type | Description |
|---|---|---|
| error | string |
404Resource not found
| Field | Type | Description |
|---|---|---|
| error | string |
Delete a worksheet
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
Sign a worksheet
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| 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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |
Mark a worksheet complete or incomplete without signing
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| 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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |
404Resource not found
| Field | Type | Description |
|---|---|---|
| error | string |
Save worksheet field responses (marks complete)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| 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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
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
| Field | Type | Description |
|---|---|---|
| []id | integer | |
| []name | string | |
| []description | string |
Example response
json
[
{
"id": 1,
"name": "string",
"description": "string"
}
]