Inventory loan
Every inventory item with stock, lent, overdue and free pieces right now.
GET/api/event/inventory_loan_stock
Responses
200List of {bookable, quantity, lent, overdue, available_now, deposit}
curl --request GET \
--url https://your-instance.iw-erp.de/api/event/inventory_loan_stock \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan_stock', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan_stock"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/event/inventory_loan_stock', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan_stock"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan_stock")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan_stock"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanController.getStock();
if (result.success) {
print(result.data);
}Free pieces of one item between start and end (bookings and loans counted).
GET/api/event/inventory_loan_availability/{bookableId}
Path parameters
bookableIdrequiredstring |
Query parameters
startrequiredstring | |
endrequiredstring |
Responses
200{quantity, used, available}
curl --request GET \
--url 'https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string' \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan_availability/42?start=string&end=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanController.getAvailability(42, DateTime.fromJson({}), DateTime.fromJson({}));
if (result.success) {
print(result.data);
}All loans; default order: due date ascending (state=RETURNED: latest return first). overdue=1 (or state=OVERDUE) lists only lent loans past their due date.
GET/api/event/inventory_loan
Query parameters
idstring | |
statestring | |
bookablestring | |
bookingstring | The booking the item was reserved with (null only once the booking is deleted). |
personstring | |
depositStatestring | |
issuedAtstring | |
dueAtstring | |
returnedAtstring | |
createdstring | |
updatedstring | |
searchStringstring | text to search for in the list |
orderFieldNamestring | name of the order field |
orderFieldSortstring | sorting modeAllowed: DESCASC |
pageinteger | page of the list |
pageSizeinteger | number of entries for each page |
withMaxPageNumberstring | returns the number of pages available as a header if this is set |
Responses
200Returns a list of EventInventoryLoan objectsarray<EventInventoryLoan>
Show fields (22)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
notestringInternal note of the office, not shown to the borrower.
issued_by_namestringName of the staff member who issued the item.
returned_by_namestringName of the staff member who took back the item.
last_reminder_atstring (date-time)Last reminder (due soon or overdue) sent to the borrower.
reminder_countintegerNumber of reminders sent for the loan.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request GET \
--url https://your-instance.iw-erp.de/api/event/inventory_loan \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/event/inventory_loan', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanController.getAll();
if (result.success) {
print(result.data);
}[
{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"issued_by_name": "Beispiel",
"returned_by_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00"
}
]Hand the item of a booking (Termin) over; item and borrower come from the booking.
POST/api/event/inventory_loan
Without dueAt the loan runs until the end of the booking. The deposit defaults to the deposit of the item times the quantity. force=true skips the stock check.
Request body application/json
bookingintegerrequiredquantityintegerdue_atstringdeposit_amountnumberconditionstringnotestringforceboolean
Responses
200The new loanEventInventoryLoan
Show fields (22)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
notestringInternal note of the office, not shown to the borrower.
issued_by_namestringName of the staff member who issued the item.
returned_by_namestringName of the staff member who took back the item.
last_reminder_atstring (date-time)Last reminder (due soon or overdue) sent to the borrower.
reminder_countintegerNumber of reminders sent for the loan.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request POST \
--url https://your-instance.iw-erp.de/api/event/inventory_loan \
--header 'content-type: application/json' \
--header 'x-iw-jwt-token: <TOKEN>' \
--data '
{
"booking": 1,
"quantity": 1,
"due_at": "2026-10-15T09:30:00+02:00",
"deposit_amount": 49.9,
"condition": "string",
"note": "string"
}
'const options = {
method: 'POST',
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: JSON.stringify({
booking: 1,
quantity: 1,
due_at: '2026-10-15T09:30:00+02:00',
deposit_amount: 49.9,
condition: 'string',
note: 'string'
})
};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan"
payload = {
"booking": 1,
"quantity": 1,
"due_at": "2026-10-15T09:30:00+02:00",
"deposit_amount": 49.9,
"condition": "string",
"note": "string"
}
headers = {
"x-iw-jwt-token": "<TOKEN>",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/event/inventory_loan', [
'body' => '{"booking":1,"quantity":1,"due_at":"2026-10-15T09:30:00+02:00","deposit_amount":49.9,"condition":"string","note":"string"}',
'headers' => [
'content-type' => 'application/json',
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
Content = new StringContent("{\"booking\":1,\"quantity\":1,\"due_at\":\"2026-10-15T09:30:00+02:00\",\"deposit_amount\":49.9,\"condition\":\"string\",\"note\":\"string\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"booking\":1,\"quantity\":1,\"due_at\":\"2026-10-15T09:30:00+02:00\",\"deposit_amount\":49.9,\"condition\":\"string\",\"note\":\"string\"}");
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan")
.post(body)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan"
payload := strings.NewReader("{\"booking\":1,\"quantity\":1,\"due_at\":\"2026-10-15T09:30:00+02:00\",\"deposit_amount\":49.9,\"condition\":\"string\",\"note\":\"string\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanController.issue(bookingId: 42);
if (result.success) {
print(result.data);
}{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"issued_by_name": "Beispiel",
"returned_by_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00"
}Returns a single event inventory loan entry.
GET/api/event/inventory_loan/{id}
Path parameters
idrequiredstring |
Responses
200Returns a single EventInventoryLoanEventInventoryLoan
Show fields (22)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
notestringInternal note of the office, not shown to the borrower.
issued_by_namestringName of the staff member who issued the item.
returned_by_namestringName of the staff member who took back the item.
last_reminder_atstring (date-time)Last reminder (due soon or overdue) sent to the borrower.
reminder_countintegerNumber of reminders sent for the loan.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request GET \
--url https://your-instance.iw-erp.de/api/event/inventory_loan/42 \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan/42"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/event/inventory_loan/42', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan/42")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan/42"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanController.get('42');
if (result.success) {
print(result.data);
}{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"issued_by_name": "Beispiel",
"returned_by_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00"
}return (condition, retained_amount = kept part of the deposit, note, returned_at), extend (due_at, force).
PUT/api/event/inventory_loan/{id}/{action}
Path parameters
idrequiredstring | |
actionrequiredstring |
Request body application/json
conditionstringretained_amountnumbernotestringreturned_atstringdue_atstringforceboolean
Responses
200The loan after the actionEventInventoryLoan
Show fields (22)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
notestringInternal note of the office, not shown to the borrower.
issued_by_namestringName of the staff member who issued the item.
returned_by_namestringName of the staff member who took back the item.
last_reminder_atstring (date-time)Last reminder (due soon or overdue) sent to the borrower.
reminder_countintegerNumber of reminders sent for the loan.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request PUT \
--url https://your-instance.iw-erp.de/api/event/inventory_loan/42/42 \
--header 'content-type: application/json' \
--header 'x-iw-jwt-token: <TOKEN>' \
--data '
{
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": true
}
'const options = {
method: 'PUT',
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: JSON.stringify({
condition: 'string',
retained_amount: 49.9,
note: 'string',
returned_at: '2026-10-15T09:30:00+02:00',
due_at: '2026-10-15T09:30:00+02:00',
force: true
})
};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan/42/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"
payload = {
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": True
}
headers = {
"x-iw-jwt-token": "<TOKEN>",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-instance.iw-erp.de/api/event/inventory_loan/42/42', [
'body' => '{"condition":"string","retained_amount":49.9,"note":"string","returned_at":"2026-10-15T09:30:00+02:00","due_at":"2026-10-15T09:30:00+02:00","force":true}',
'headers' => [
'content-type' => 'application/json',
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
Content = new StringContent("{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}");
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan/42/42")
.put(body)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"
payload := strings.NewReader("{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'dart:convert';
import 'package:http/http.dart' as http;
final response = await http.put(
Uri.parse('https://your-instance.iw-erp.de/api/event/inventory_loan/42/42'),
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: jsonEncode({
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": true
}),
);
print(response.body);{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"issued_by_name": "Beispiel",
"returned_by_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00"
}return (condition, retained_amount = kept part of the deposit, note, returned_at), extend (due_at, force).
PATCH/api/event/inventory_loan/{id}/{action}
Path parameters
idrequiredstring | |
actionrequiredstring |
Request body application/json
conditionstringretained_amountnumbernotestringreturned_atstringdue_atstringforceboolean
Responses
200The loan after the actionEventInventoryLoan
Show fields (22)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
notestringInternal note of the office, not shown to the borrower.
issued_by_namestringName of the staff member who issued the item.
returned_by_namestringName of the staff member who took back the item.
last_reminder_atstring (date-time)Last reminder (due soon or overdue) sent to the borrower.
reminder_countintegerNumber of reminders sent for the loan.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request PATCH \
--url https://your-instance.iw-erp.de/api/event/inventory_loan/42/42 \
--header 'content-type: application/json' \
--header 'x-iw-jwt-token: <TOKEN>' \
--data '
{
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": true
}
'const options = {
method: 'PATCH',
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: JSON.stringify({
condition: 'string',
retained_amount: 49.9,
note: 'string',
returned_at: '2026-10-15T09:30:00+02:00',
due_at: '2026-10-15T09:30:00+02:00',
force: true
})
};
fetch('https://your-instance.iw-erp.de/api/event/inventory_loan/42/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"
payload = {
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": True
}
headers = {
"x-iw-jwt-token": "<TOKEN>",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://your-instance.iw-erp.de/api/event/inventory_loan/42/42', [
'body' => '{"condition":"string","retained_amount":49.9,"note":"string","returned_at":"2026-10-15T09:30:00+02:00","due_at":"2026-10-15T09:30:00+02:00","force":true}',
'headers' => [
'content-type' => 'application/json',
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
Content = new StringContent("{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}");
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/inventory_loan/42/42")
.patch(body)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/inventory_loan/42/42"
payload := strings.NewReader("{\"condition\":\"string\",\"retained_amount\":49.9,\"note\":\"string\",\"returned_at\":\"2026-10-15T09:30:00+02:00\",\"due_at\":\"2026-10-15T09:30:00+02:00\",\"force\":true}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'dart:convert';
import 'package:http/http.dart' as http;
final response = await http.patch(
Uri.parse('https://your-instance.iw-erp.de/api/event/inventory_loan/42/42'),
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: jsonEncode({
"condition": "string",
"retained_amount": 49.9,
"note": "string",
"returned_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"force": true
}),
);
print(response.body);{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"issued_by_name": "Beispiel",
"returned_by_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00"
}Own loans (all persons of the selected company); onlyLent=1 leaves out returned ones.
GET/api/event/customer/inventory_loan
Query parameters
idstring | |
statestring | |
bookablestring | |
bookingstring | The booking the item was reserved with (null only once the booking is deleted). |
personstring | |
depositStatestring | |
issuedAtstring | |
dueAtstring | |
returnedAtstring | |
createdstring | |
updatedstring | |
searchStringstring | text to search for in the list |
orderFieldNamestring | name of the order field |
orderFieldSortstring | sorting modeAllowed: DESCASC |
pageinteger | page of the list |
pageSizeinteger | number of entries for each page |
withMaxPageNumberstring | returns the number of pages available as a header if this is set |
Responses
200Returns the own EventInventoryLoan objectsarray<EventInventoryLoan2>
Show fields (17)
overduebooleandeposit_refunded_amountnumber (float)Amount paid back on return (deposit minus the retained part).
idintegerPrimary key of the inventory loan. Internal ID.
bookable_namestringName of the item at the time of the hand-over.
borrower_namestringName of the borrower at the time, or the name typed in for somebody without a person.
quantityintegerNumber of items lent out.
statestringState of the loan, for example issued or returned.
issued_atstring (date-time)Time the item was issued.
due_atstring (date-time)Time the item is due back.
returned_atstring (date-time)Time the item was returned.
deposit_amountnumber (float)Deposit paid for the loan.
deposit_statestringState of the deposit, for example held or refunded.
deposit_retained_amountnumber (float)Part of the deposit kept on return.
condition_on_issuestringCondition of the item when it was issued.
condition_on_returnstringCondition of the item when it was returned.
createdstring (date-time)Point in time the entity was created.
updatedstring (date-time)Point in time the entity was last updated.
curl --request GET \
--url https://your-instance.iw-erp.de/api/event/customer/inventory_loan \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/customer/inventory_loan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/event/customer/inventory_loan"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/event/customer/inventory_loan', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/event/customer/inventory_loan"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/event/customer/inventory_loan")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/event/customer/inventory_loan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/event_inventory_loan_customer_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await EventInventoryLoanCustomerController.getOwn();
if (result.success) {
print(result.data);
}[
{
"id": 42,
"bookable_name": "Beispiel",
"borrower_name": "Beispiel",
"overdue": true,
"deposit_refunded_amount": 49.9,
"quantity": 1,
"state": "string",
"issued_at": "2026-10-15T09:30:00+02:00",
"due_at": "2026-10-15T09:30:00+02:00",
"returned_at": "2026-10-15T09:30:00+02:00"
}
]