API

Rental APIs

POST rental/check-ins/{checkinId}/items

Add new item to rental check-in

HTTP method POST
URI https://api.rambase.net/rental/check-ins/{checkinId}/items
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {checkinId} Rental check-in identifier
Integer, minimum 100000
Successful HTTP status code 201
API resource identifier 7122, version 4

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
<RentalCheckInItem>
2
     <CheckInDate
CheckInDate

Date the rental unit was checked-in

This field is optional.

>
{Date}</CheckInDate>
3
     <RentalContractItem>
4
          <RentalContractItemId
RentalContractItemId

Required/mandatory field

Rental contract item identifier

Minimum value: 1

>
{Integer}</RentalContractItemId>
5
          <RentalContract>
6
               <RentalContractId
RentalContractId

Required/mandatory field

Rental contract identifier

Minimum value: 100000

>
{Integer}</RentalContractId>
7
          </RentalContract>
8
     </RentalContractItem>
9
     <Location>
10
          <LocationId
LocationId

Required/mandatory field

Location identifier

Minimum value: 10000

>
{Integer}</LocationId>
11
     </Location>
12
     <StockLocation
StockLocation

This field is optional.

>
13
          <StockLocationId
StockLocationId

Stock location identifier

Minimum value: 100000

This field is optional.

>
{Integer}</StockLocationId>
14
     </StockLocation>
15
     <RentalUnit>
16
          <RentalUnitId
RentalUnitId

Required/mandatory field

Rental unit identifier

Minimum value: 100000

>
{Integer}</RentalUnitId>
17
     </RentalUnit>
18
</RentalCheckInItem>
1
{
2
     "rentalCheckInItem": {
3
          "checkInDate
CheckInDate

Date the rental unit was checked-in

This field is optional.

":
"{Date}",
4
          "rentalContractItem": {
5
               "rentalContractItemId
RentalContractItemId

Required/mandatory field

Rental contract item identifier

Minimum value: 1

":
"{Integer}",
6
               "rentalContract": {
7
                    "rentalContractId
RentalContractId

Required/mandatory field

Rental contract identifier

Minimum value: 100000

":
"{Integer}"
8
               }
9
          },
10
          "location": {
11
               "locationId
LocationId

Required/mandatory field

Location identifier

Minimum value: 10000

":
"{Integer}"
12
          },
13
          "stockLocation
StockLocation

This field is optional.

":
{
14
               "stockLocationId
StockLocationId

Stock location identifier

Minimum value: 100000

This field is optional.

":
"{Integer}"
15
          },
16
          "rentalUnit": {
17
               "rentalUnitId
RentalUnitId

Required/mandatory field

Rental unit identifier

Minimum value: 100000

":
"{Integer}"
18
          }
19
     }
20
}

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
<RentalCheckInItem>
2
     <RentalCheckInItemId
RentalCheckInItemId

Rental check-in item identifier

>
{Integer}</RentalCheckInItemId>
3
     <CheckInDate
CheckInDate

Date the rental unit was checked-in

>
{Date}</CheckInDate>
4
     <RentalContractItem>
5
          <RentalContractItemId
RentalContractItemId

Rental contract item identifier

>
{Integer}</RentalContractItemId>
6
          <LineNumber
LineNumber

Line- or sequence number of the item

>
{Integer}</LineNumber>
7
          <InitialRentalContractItem>
8
               <RentalContractItemId
RentalContractItemId

Rental contract item identifier

>
{Integer}</RentalContractItemId>
9
          </InitialRentalContractItem>
10
          <Quantity
Quantity

Number of units ordered

>
{Integer}</Quantity>
11
          <OnRentDays
OnRentDays

Estimated number of days with active rental or subscription

>
{Integer}</OnRentDays>
12
          <RentalContract>
13
               <RentalContractId
RentalContractId

Rental contract identifier

>
14
                    <CustomerId
CustomerId

Customer identifier

>
{Integer}</CustomerId>
15
                    <Name
Name

Name of customer (name of company or surname/familyname/lastname of a person)

>
{String}</Name>
16
                    <FirstName
FirstName

Secondary name of a company or firstname of a person

>
{String}</FirstName>
17
                    <CustomerLink
CustomerLink

Customer reference

>
{String}</CustomerLink>
18
               </RentalContractId>
19
               <RentalContractLink
RentalContractLink

Rental contract reference

>
{String}</RentalContractLink>
20
          </RentalContract>
21
          <RentalContractItemLink
RentalContractItemLink

Rental contract item reference

>
{String}</RentalContractItemLink>
22
     </RentalContractItem>
23
     <Location>
24
          <LocationId
LocationId

Location identifier

>
{Integer}</LocationId>
25
          <Name
Name

Name of warehouse location

>
{String}</Name>
26
          <ShortName
ShortName

Unique abbreviation/short name of the location

>
{String}</ShortName>
27
          <LocationLink
LocationLink

Location reference

>
{String}</LocationLink>
28
     </Location>
29
     <StockLocation>
30
          <StockLocationId
StockLocationId

Stock location identifier

>
{Integer}</StockLocationId>
31
          <Name
Name

Name of stock location

>
{String}</Name>
32
          <Label
Label

Name of current- and parent stock locations, including seperator for location

>
{String}</Label>
33
          <StockLocationLink
StockLocationLink

Stock location reference

>
{String}</StockLocationLink>
34
     </StockLocation>
35
     <RentalUnit>
36
          <RentalUnitId
RentalUnitId

Rental unit identifier

>
37
               <ProductId
ProductId

Product identifier

>
{Integer}</ProductId>
38
               <Name
Name

Name of the product

>
{String}</Name>
39
               <Description
Description

Description of the product

>
{String}</Description>
40
               <ProductLink
ProductLink

Product reference

>
{String}</ProductLink>
41
               <ProductUnitId
ProductUnitId

Product unit identifier

>
{Integer}</ProductUnitId>
42
               <SerialNumber
SerialNumber

Serial number

>
{String}</SerialNumber>
43
               <ProductUnitLink
ProductUnitLink

Product unit reference

>
{String}</ProductUnitLink>
44
          </RentalUnitId>
45
          <RentalUnitLink
RentalUnitLink

Rental unit reference

>
{String}</RentalUnitLink>
46
          <RemainingOnRentQuantity
RemainingOnRentQuantity

The sum of all rental units linked to a specific rental contract item that are currently still rented out (not returned or expired)

>
{Integer}</RemainingOnRentQuantity>
47
     </RentalUnit>
48
</RentalCheckInItem>
1
{
2
     "rentalCheckInItem": {
3
          "rentalCheckInItemId
RentalCheckInItemId

Rental check-in item identifier

":
"{Integer}",
4
          "checkInDate
CheckInDate

Date the rental unit was checked-in

":
"{Date}",
5
          "rentalContractItem": {
6
               "rentalContractItemId
RentalContractItemId

Rental contract item identifier

":
"{Integer}",
7
               "lineNumber
LineNumber

Line- or sequence number of the item

":
"{Integer}",
8
               "initialRentalContractItem": {
9
                    "rentalContractItemId
RentalContractItemId

Rental contract item identifier

":
"{Integer}"
10
               },
11
               "quantity
Quantity

Number of units ordered

":
"{Integer}",
12
               "onRentDays
OnRentDays

Estimated number of days with active rental or subscription

":
"{Integer}",
13
               "rentalContract": {
14
                    "rentalContractId
RentalContractId

Rental contract identifier

":
{
15
                         "customerId
CustomerId

Customer identifier

":
"{Integer}",
16
                         "name
Name

Name of customer (name of company or surname/familyname/lastname of a person)

":
"{String}",
17
                         "firstName
FirstName

Secondary name of a company or firstname of a person

":
"{String}",
18
                         "customerLink
CustomerLink

Customer reference

":
"{String}"
19
                    },
20
                    "rentalContractLink
RentalContractLink

Rental contract reference

":
"{String}"
21
               },
22
               "rentalContractItemLink
RentalContractItemLink

Rental contract item reference

":
"{String}"
23
          },
24
          "location": {
25
               "locationId
LocationId

Location identifier

":
"{Integer}",
26
               "name
Name

Name of warehouse location

":
"{String}",
27
               "shortName
ShortName

Unique abbreviation/short name of the location

":
"{String}",
28
               "locationLink
LocationLink

Location reference

":
"{String}"
29
          },
30
          "stockLocation": {
31
               "stockLocationId
StockLocationId

Stock location identifier

":
"{Integer}",
32
               "name
Name

Name of stock location

":
"{String}",
33
               "label
Label

Name of current- and parent stock locations, including seperator for location

":
"{String}",
34
               "stockLocationLink
StockLocationLink

Stock location reference

":
"{String}"
35
          },
36
          "rentalUnit": {
37
               "rentalUnitId
RentalUnitId

Rental unit identifier

":
{
38
                    "productId
ProductId

Product identifier

":
"{Integer}",
39
                    "name
Name

Name of the product

":
"{String}",
40
                    "description
Description

Description of the product

":
"{String}",
41
                    "productLink
ProductLink

Product reference

":
"{String}",
42
                    "productUnitId
ProductUnitId

Product unit identifier

":
"{Integer}",
43
                    "serialNumber
SerialNumber

Serial number

":
"{String}",
44
                    "productUnitLink
ProductUnitLink

Product unit reference

":
"{String}"
45
               },
46
               "rentalUnitLink
RentalUnitLink

Rental unit reference

":
"{String}",
47
               "remainingOnRentQuantity
RemainingOnRentQuantity

The sum of all rental units linked to a specific rental contract item that are currently still rented out (not returned or expired)

":
"{Integer}"
48
          }
49
     }
50
}

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 102738 HTTP 404 Price list not found
Error 100055 HTTP 403 You have only admittance to your own objects
Error 109843 HTTP 400 Not allowed for rental contracts with registered items (status 2)
Error 109862 HTTP 400 Not allowed for already cancelled rental items
Error 109846 HTTP 400 Not allowed for rental contracts with items pending final invoice (status 8)
Error 108955 HTTP 400 Not allowed for closed rental contract items
Error 108830 HTTP 400 Rental contract item is not active
Error 109122 HTTP 400 Not allowed for rental subscription items
Error 100199 HTTP 404 Location is not found
Error 101294 HTTP 400 Location is not active (status 4)
Error 101327 HTTP 400 The stock location has to be active (status 4)
Error 110138 HTTP 400 Stock location {0} does not belong to {1} location
Error 109463 HTTP 400 Rental unit is not active (ST=4)
Error 110133 HTTP 400 Rental unit {0} is already added to this check‑in
Error 110152 HTTP 400 The rental unit '{0}' assigned to '{1}' rental item has not been shipped yet
Error 110153 HTTP 400 The rental unit '{0}' assigned to '{1}' rental item has been already returned to the rental fleet
Error 110136 HTTP 400 Rental unit {0} is not assigned to {1}
Error 110119 HTTP 400 Return date is not defined