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
1

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