Get the history of a Rental case
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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50");
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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50"), 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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50"
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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50")) .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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50") .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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history', params: {page: '1', per_page: '50'}, 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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50';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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://your-instance.seventhings.com/customer-api/v1/rental-management/rental-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history";
let querystring = [ ("page", "1"), ("per_page", "50"), ];
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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50' \ --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-case/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/history?page=1&per_page=50'Get the recorded changes of a single rental case, newest change first. Rental cases without any recorded change return an empty page.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Page number of the results to fetch.
The number of history entries per page. A single entry can carry a full snapshot of the entity, so this is capped lower than the list endpoints.
Responses
Section titled “Responses”Success
object
A single recorded change of a rental case.
object
The UUID of the rental case the change belongs to.
The UUID of the user who caused the change.
The date and time of the change, in UTC.
The name of the recorded event.
The description of the change, in English.
Further details of the change as a JSON string, e.g. the snapshot of the rental case including the changed values. Can be empty.
Example
{ "items": [ { "rental_case_uuid": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "user_uuid": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "occurred_at": "2022-04-01T12:00:00+00:00", "event_name": "Rental case rescheduled", "description": "System user rescheduled rental case 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'.", "details": "" } ]}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.
The requested resource representation has no acceptable format.
Internal Server Error.

