Skip to content

API reference / RivetIT

Clients

GET /clients Bearer token or API key

List clients (paged)

Parameters

NameInTypeDescription
searchquerystring
pagequeryinteger
limitqueryinteger

Example request

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

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

Responses

200Paged client list

FieldTypeDescription
data array of object
data[].id integer
data[].name string
data[].phone string
data[].city string
data[].state string
data[].website string
total integer
Example response
json
{
    "data": [
        {
            "id": 1,
            "name": "string",
            "phone": "string",
            "city": "string",
            "state": "string",
            "website": "string"
        }
    ],
    "total": 1
}

403Authenticated but not permitted

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

Client detail with contacts and primary location

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Client detail

FieldTypeDescription
id integer
name string
phone string
address string
city string
state string
zip string
website string
notes string
open_tickets integer
contacts array of object
contacts[].id integer
contacts[].name string
contacts[].title string
contacts[].email string
contacts[].phone string
contacts[].extension string
contacts[].client string
Example response
json
{
    "id": 1,
    "name": "string",
    "phone": "string",
    "address": "string",
    "city": "string",
    "state": "string",
    "zip": "string",
    "website": "string",
    "notes": "string",
    "open_tickets": 1,
    "contacts": [
        {
            "id": 1,
            "name": "string",
            "title": "string",
            "email": "string",
            "phone": "string",
            "extension": "string",
            "client": "string"
        }
    ]
}

403Authenticated but not permitted

FieldTypeDescription
error string

404Resource not found

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

Recent tickets for a client (bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Ticket summaries

FieldTypeDescription
[]id integer
[]number integer
[]subject string
[]priority string
[]status string
[]status_color string
[]client string
[]assigned_to string
[]created_at string
[]due_at string
[]resolved_at string
[]updated_at string
Example response
json
[
    {
        "id": 1,
        "number": 1,
        "subject": "string",
        "priority": "string",
        "status": "string",
        "status_color": "string",
        "client": "string",
        "assigned_to": "string",
        "created_at": "string",
        "due_at": "string",
        "resolved_at": "string",
        "updated_at": "string"
    }
]

403Authenticated but not permitted

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

Assets for a client (bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Asset summaries

FieldTypeDescription
[]id integer
[]name string
[]type string
[]make string
[]model string
[]serial string
[]os string
[]status string
[]client string
Example response
json
[
    {
        "id": 1,
        "name": "string",
        "type": "string",
        "make": "string",
        "model": "string",
        "serial": "string",
        "os": "string",
        "status": "string",
        "client": "string"
    }
]

403Authenticated but not permitted

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

Locations for a client (bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Locations

FieldTypeDescription
[]id integer
[]name string
[]address string
[]city string
[]state string
[]zip string
[]phone string
[]primary boolean
Example response
json
[
    {
        "id": 1,
        "name": "string",
        "address": "string",
        "city": "string",
        "state": "string",
        "zip": "string",
        "phone": "string",
        "primary": true
    }
]

403Authenticated but not permitted

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

Credential names for a client (no secrets; bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Credential summaries

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

403Authenticated but not permitted

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

Contracts for a client (bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Contracts

Example response
json
[
    {}
]

403Authenticated but not permitted

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

Signed outtake forms for a client (bare array)

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

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

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

Responses

200Files

Example response
json
[
    {}
]

403Authenticated but not permitted

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

Included support-hours allowance vs. usage for a calendar month, rolled up across the client's active contracts plus a per-contract breakdown

Parameters

NameInTypeDescription
idrequiredpathinteger
monthqueryinteger1-12, defaults to current month
yearqueryintegerdefaults to current year

Example request

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

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

Responses

200Allowance usage

FieldTypeDescription
month integer 1-12
year integer
remote object Included vs. used hours for one delivery method (remote or onsite) over the requested month. When this allowance isn't configured (no active contract sets it), included/remaining/pct are null and used is 0 - treat null 'included' as "feature inactive" and don't render this period.
remote.included number Hours included, or null if this allowance is not configured
remote.used number Hours used so far this month (flat per-ticket rate, not actual worked time); 0 when included is null
remote.remaining number included - used; negative when over allowance; null when included is null
remote.pct number used / included as a percentage, capped at 100; null when included is null
onsite object Included vs. used hours for one delivery method (remote or onsite) over the requested month. When this allowance isn't configured (no active contract sets it), included/remaining/pct are null and used is 0 - treat null 'included' as "feature inactive" and don't render this period.
onsite.included number Hours included, or null if this allowance is not configured
onsite.used number Hours used so far this month (flat per-ticket rate, not actual worked time); 0 when included is null
onsite.remaining number included - used; negative when over allowance; null when included is null
onsite.pct number used / included as a percentage, capped at 100; null when included is null
contracts array of object Per-contract breakdown across the client's active contracts that have an allowance configured
contracts[].id integer
contracts[].name string
contracts[].remote object Included vs. used hours for one delivery method (remote or onsite) over the requested month. When this allowance isn't configured (no active contract sets it), included/remaining/pct are null and used is 0 - treat null 'included' as "feature inactive" and don't render this period.
contracts[].remote.included number Hours included, or null if this allowance is not configured
contracts[].remote.used number Hours used so far this month (flat per-ticket rate, not actual worked time); 0 when included is null
contracts[].remote.remaining number included - used; negative when over allowance; null when included is null
contracts[].remote.pct number used / included as a percentage, capped at 100; null when included is null
contracts[].onsite object Included vs. used hours for one delivery method (remote or onsite) over the requested month. When this allowance isn't configured (no active contract sets it), included/remaining/pct are null and used is 0 - treat null 'included' as "feature inactive" and don't render this period.
contracts[].onsite.included number Hours included, or null if this allowance is not configured
contracts[].onsite.used number Hours used so far this month (flat per-ticket rate, not actual worked time); 0 when included is null
contracts[].onsite.remaining number included - used; negative when over allowance; null when included is null
contracts[].onsite.pct number used / included as a percentage, capped at 100; null when included is null
Example response
json
{
    "month": 1,
    "year": 1,
    "remote": {
        "included": 1.5,
        "used": 1.5,
        "remaining": 1.5,
        "pct": 1.5
    },
    "onsite": {
        "included": 1.5,
        "used": 1.5,
        "remaining": 1.5,
        "pct": 1.5
    },
    "contracts": [
        {
            "id": 1,
            "name": "string",
            "remote": {
                "included": null,
                "used": null,
                "remaining": null,
                "pct": null
            },
            "onsite": {
                "included": null,
                "used": null,
                "remaining": null,
                "pct": null
            }
        }
    ]
}

400Bad request

FieldTypeDescription
error string

403Authenticated but not permitted

FieldTypeDescription
error string