Get all Rental Cases
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases', params: { filter: '{"<filter_id>":"<filter_name>"}', page: '1', per_page: '50', '<sort_field>': '<sort_type>' }, headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer <token>" ],]);
$response = curl_exec($curl);$err = curl_error($curl);
curl_close($curl);
if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>', [ 'headers' => [ 'Authorization' => 'Bearer <token>', ],]);
echo $response->getBody();import http.client
conn = http.client.HTTPSConnection("your-instance.seventhings.com")
headers = { 'Authorization': "Bearer <token>" }
conn.request("GET", "/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>", headers=headers)
res = conn.getresponse()data = res.read()
print(data.decode("utf-8"))import requests
url = "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases"
querystring = {"filter":"{\"<filter_id>\":\"<filter_name>\"}","page":"1","per_page":"50","<sort_field>":"<sort_type>"}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())use reqwest;
#[tokio::main]pub async fn main() { let url = "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases";
let querystring = [ ("filter", "{"<filter_id>":"<filter_name>"}"), ("page", "1"), ("per_page", "50"), ("<sort_field>", "<sort_type>"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>' \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - 'https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-cases?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D&page=1&per_page=50&%3Csort_field%3E=<sort_type>'Get all Rental Cases
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Fields are defined in Template, so this examples are based on the type of the field,
not on the FieldKey
The filter parameter is a deep object, which means that it can have multiple levels of nesting.
In the first level there is the field name, in the second level there is the operator and
in the third level there are the values or the value.
for example: filter[TEXT][eq]='exact searched text'
The exact field name you can find in the field definition list of your customer instance.
The known operators which can be used for one value per field you can find here:
eqwhich is used for exact matchneqwhich is used for the opposite of an exact matchgtwhich is used for a greater than matchgt_or_nullwhich is used for a greater than match or nullgtewhich is used for a greater than or equal matchgte_or_nullwhich is used for a greater than or equal match or nullltwhich is used for a less than matchlt_or_nullwhich is used for a less than match or nullltewhich is used for a less than or equal matchlte_or_nullwhich is used for a less than or equal match or null
Here is the list of the known operators which can be used for multiple values per field:
likewhich is used for a partial matchnot_likewhich is used for a partial mismatchinwhich is used for a list of exact matchesninwhich is used for a list of the opposite of exact matches
Here are some examples:
filter[TEXT][eq]='exact searched text'filter[TEXT][neq]='exact searched text'filter[TEXT][like][]='searched text'filter[TEXT][not_like][]='searched text'filter[TEXT][in][]='searched text'filter[TEXT][nin][]='searched text'filter[DATE][gt]=2022-11-15filter[DATE][gt_or_null]=2022-11-15filter[DATE][gte]=2022-11-15filter[DATE][gte_or_null]=2022-11-15filter[DATE][lt]=2022-11-15&filter[DATE][gt]=2022-11-14filter[DATE][lt_or_null]=2022-11-15&filter[DATE][gt]=2022-11-14filter[DATE][lte]=2022-11-15&filter[DATE][gt]=2022-11-14filter[DATE][lte_or_null]=2022-11-15&filter[DATE][gt]=2022-11-14filter[DATETIME][gt]=2022-11-15+00:00:00filter[DATETIME][lt]=2022-11-15+00:00:00&filter[DATETIME][gt]=2022-11-14+00:00:00
object
Example
{ "<filter_id>": "<filter_name>"}Page number of the results to fetch.
The number of results per page.
Fields are defined in Template, so this examples are based on the type of the field,
not on the FieldKey
In actual parameter, FieldKey should be passed (e.g: sort[updated_at]=ASC)
Up to columns
Filter options available for certain type of the field:
sort[TEXT]=ASCsort[DATE]=DESCsort[TEXT]=DESC&sort[DATE]=ASC
object
Example
{ "<sort_field>": "<sort_type>"}Responses
Section titled “Responses”A list of Rental Case entries
The reference of the rental case.
object
The UUID of the rental case.
The status of the rental case.
The title of the rental case.
The reference of the rental case.
object
The type of the referenced object.
The UUID of the referenced object.
Display name of the referenced object.
The id of the referenced object.
The start of the rental case.
The amount of time to send a reminder.
object
The unit of the time interval.
The value of the time interval.
The start of the rental case.
The amount of time to send a reminder.
object
The unit of the time interval.
The value of the time interval.
The uuid of the responsible user.
The name of the renter.
A comment that is displayed in the rental case details.
The file attachment of the rental case.
object
File size in bytes
Example
[ { "status": "requested", "title": "Rent the printer.", "references": [ { "type": "asset", "uuid": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "name": "Asset name (asset barcode)", "id": 1 } ], "issue_date": "2025-04-23", "issue_date_reminder": { "unit": "days", "value": 2 }, "due_date": "2025-04-23", "due_date_reminder": { "unit": "days", "value": 2 }, "responsible_user_uuid": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "renter": "seventhings GmbH", "comment": "The printer is running low on ink." }]Request body is missing or invalid or request data is invalid.
Access token is missing or invalid.
You are not permitted to perform the requested operation.
Internal Server Error.

