API

Rental APIs

POST rental/units

Creates a new rental unit

HTTP method POST
URI https://api.rambase.net/rental/units
Supported formats Xml, Html, Json (ex. $format=json)
Custom fields Custom fields supported
Successful HTTP status code 201
API resource identifier 4788, version 12

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
<RentalUnit>
2
     <Description
Description

Description of rental unit

This field is optional.

>
{String}</Description>
3
     <Availability
Availability

This field is optional.

>
4
          <AvailableFromDate
AvailableFromDate

Date from which the rental unit is available

This field is optional.

>
{Date}</AvailableFromDate>
5
          <EndOfLifeDate
EndOfLifeDate

Date to which the rental unit is available

This field is optional.

>
{Date}</EndOfLifeDate>
6
     </Availability>
7
     <ProductCollection
ProductCollection

Product collection

This field is optional.

>
8
          <ProductId
ProductId

Product identifier

Minimum value: 10000

This field is optional.

>
{Integer}</ProductId>
9
     </ProductCollection>
10
     <Product
Product

Required/mandatory field

Product assigned to rental unit

>
11
          <ProductId
ProductId

Required/mandatory field

Product identifier

Minimum value: 10000

>
{Integer}</ProductId>
12
     </Product>
13
     <ProductUnit
ProductUnit

Product unit assigned to rental unit

This field is optional.

>
14
          <ProductUnitId
ProductUnitId

Product unit identifier

Minimum value: 100000

This field is optional.

>
{Integer}</ProductUnitId>
15
     </ProductUnit>
16
</RentalUnit>
1
{
2
     "rentalUnit": {
3
          "description
Description

Description of rental unit

This field is optional.

":
"{String}",
4
          "availability
Availability

This field is optional.

":
{
5
               "availableFromDate
AvailableFromDate

Date from which the rental unit is available

This field is optional.

":
"{Date}",
6
               "endOfLifeDate
EndOfLifeDate

Date to which the rental unit is available

This field is optional.

":
"{Date}"
7
          },
8
          "productCollection
ProductCollection

Product collection

This field is optional.

":
{
9
               "productId
ProductId

Product identifier

Minimum value: 10000

This field is optional.

":
"{Integer}"
10
          },
11
          "product
Product

Required/mandatory field

Product assigned to rental unit

":
{
12
               "productId
ProductId

Required/mandatory field

Product identifier

Minimum value: 10000

":
"{Integer}"
13
          },
14
          "productUnit
ProductUnit

Product unit assigned to rental unit

This field is optional.

":
{
15
               "productUnitId
ProductUnitId

Product unit identifier

Minimum value: 100000

This field is optional.

":
"{Integer}"
16
          }
17
     }
18
}

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.
$showDomainDescriptions Boolean, optional Set to "true" to include domain descriptions for fields using domain values. See the Domain values page for more information. Default value is false.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]
$showCustomFields Boolean, optional Set to "true" to include custom fields. Default value is false.

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
<RentalUnit>
2
     <RentalUnitId
RentalUnitId

Rental unit identifier

>
{Integer}</RentalUnitId>
3
     <Status
Status

Status

Possible domain values can be found here

>
{String}</Status>
4
     <Description
Description

Description of rental unit

>
{String}</Description>
5
     <OperationalStatus
OperationalStatus

Assignment status of a given rental unit for current day

Possible domain values can be found here

>
{Integer}</OperationalStatus>
6
     <Availability>
7
          <AvailableFromDate
AvailableFromDate

Date from which the rental unit is available

>
{Date}</AvailableFromDate>
8
          <BlockedForRental
BlockedForRental

Indicates if a rental unit is blocked for rental

>
{Boolean}</BlockedForRental>
9
          <EndOfLifeDate
EndOfLifeDate

Date to which the rental unit is available

>
{Date}</EndOfLifeDate>
10
     </Availability>
11
     <MainImage>
12
          <FileId
FileId

File identifier

>
{Integer}</FileId>
13
          <FileLink
FileLink

File reference

>
{String}</FileLink>
14
          <ProductId
ProductId

Product identifier

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

Name of the product

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

Description of the product

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

Product reference

>
{String}</ProductLink>
18
          <ProductId
ProductId

Product identifier

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

Name of the product

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

Description of the product

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

Product reference

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

Product unit identifier

>
{Integer}</ProductUnitId>
23
          <Status
Status

Status of product unit

Possible domain values can be found here

>
{Integer}</Status>
24
          <SerialNumber
SerialNumber

Serial number

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

Product unit reference

>
{String}</ProductUnitLink>
26
     </MainImage>
27
     <CurrentLocation
CurrentLocation

Current location of rental unit

>
28
          <LocationId
LocationId

Location identifier

>
{Integer}</LocationId>
29
          <ShortName
ShortName

Unique abbreviation/short name of the location

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

Location reference

>
{String}</LocationLink>
31
     </CurrentLocation>
32
     <HomeLocation
HomeLocation

Home location of rental unit

>
33
          <LocationId
LocationId

Location identifier

>
{Integer}</LocationId>
34
          <ShortName
ShortName

Unique abbreviation/short name of the location

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

Location reference

>
{String}</LocationLink>
36
     </HomeLocation>
37
     <FixedAsset
FixedAsset

Fixed asset assigned to rental unit

>
38
          <FixedAssetId
FixedAssetId

Fixed asset identifier

>
{Integer}</FixedAssetId>
39
          <Status
Status

Status of fixed asset

Possible domain values can be found here

>
{Integer}</Status>
40
          <Name
Name

Name of fixed asset

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

Description of fixed asset

>
{String}</Description>
42
     </FixedAsset>
43
     <InitialReceptionItem
InitialReceptionItem

Initial goods reception that was used when moving a product from sales to the rental fleet

>
44
          <GoodsReceptionItemId
GoodsReceptionItemId

Item-/line-number of the goods reception

>
{Integer}</GoodsReceptionItemId>
45
          <GoodsReception>
46
               <GoodsReceptionId
GoodsReceptionId

Goods reception identifier

>
{Integer}</GoodsReceptionId>
47
               <GoodsReceptionLink
GoodsReceptionLink

Goods reception identifier

>
{String}</GoodsReceptionLink>
48
          </GoodsReception>
49
          <GoodsReceptionItemLink
GoodsReceptionItemLink

Goods reception item reference

>
{String}</GoodsReceptionItemLink>
50
     </InitialReceptionItem>
51
     <CurrentReceptionItem
CurrentReceptionItem

The current goods reception that the rental unit is located on. This will get a new value each time the rental unit is returned from rent.

>
52
          <GoodsReceptionItemId
GoodsReceptionItemId

Item-/line-number of the goods reception

>
{Integer}</GoodsReceptionItemId>
53
          <GoodsReception>
54
               <GoodsReceptionId
GoodsReceptionId

Goods reception identifier

>
{Integer}</GoodsReceptionId>
55
               <GoodsReceptionLink
GoodsReceptionLink

Goods reception identifier

>
{String}</GoodsReceptionLink>
56
          </GoodsReception>
57
          <GoodsReceptionItemLink
GoodsReceptionItemLink

Goods reception item reference

>
{String}</GoodsReceptionItemLink>
58
     </CurrentReceptionItem>
59
     <Owner
Owner

Owner of the rental unit

>
60
          <ObjectType
ObjectType

ObjectType of the owner, can be either a customer (CUS) or a supplier (SUP).

>
{String}</ObjectType>
61
          <ObjectId
ObjectId

Account code of owner

>
{Integer}</ObjectId>
62
          <Name
Name

Name of the customer/supplier, or last name if it is a person.

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

First name of the customer/supplier

>
{String}</FirstName>
64
          <ObjectLink
ObjectLink

Owner reference

>
{String}</ObjectLink>
65
     </Owner>
66
     <Total
Total

The total price in company currency from the goods reception, or Balance from the fixed asset if the rental unit is tied to a fixed asset

>
{Decimal}</Total>
67
</RentalUnit>
1
{
2
     "rentalUnit": {
3
          "rentalUnitId
RentalUnitId

Rental unit identifier

":
"{Integer}",
4
          "status
Status

Status

Possible domain values can be found here

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

Description of rental unit

":
"{String}",
6
          "operationalStatus
OperationalStatus

Assignment status of a given rental unit for current day

Possible domain values can be found here

":
"{Integer}",
7
          "availability": {
8
               "availableFromDate
AvailableFromDate

Date from which the rental unit is available

":
"{Date}",
9
               "blockedForRental
BlockedForRental

Indicates if a rental unit is blocked for rental

":
"{Boolean}",
10
               "endOfLifeDate
EndOfLifeDate

Date to which the rental unit is available

":
"{Date}"
11
          },
12
          "mainImage": {
13
               "fileId
FileId

File identifier

":
"{Integer}",
14
               "fileLink
FileLink

File reference

":
"{String}",
15
               "productId
ProductId

Product identifier

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

Name of the product

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

Description of the product

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

Product reference

":
"{String}",
19
               "productId
ProductId

Product identifier

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

Name of the product

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

Description of the product

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

Product reference

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

Product unit identifier

":
"{Integer}",
24
               "status
Status

Status of product unit

Possible domain values can be found here

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

Serial number

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

Product unit reference

":
"{String}"
27
          },
28
          "currentLocation
CurrentLocation

Current location of rental unit

":
{
29
               "locationId
LocationId

Location identifier

":
"{Integer}",
30
               "shortName
ShortName

Unique abbreviation/short name of the location

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

Location reference

":
"{String}"
32
          },
33
          "homeLocation
HomeLocation

Home location of rental unit

":
{
34
               "locationId
LocationId

Location identifier

":
"{Integer}",
35
               "shortName
ShortName

Unique abbreviation/short name of the location

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

Location reference

":
"{String}"
37
          },
38
          "fixedAsset
FixedAsset

Fixed asset assigned to rental unit

":
{
39
               "fixedAssetId
FixedAssetId

Fixed asset identifier

":
"{Integer}",
40
               "status
Status

Status of fixed asset

Possible domain values can be found here

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

Name of fixed asset

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

Description of fixed asset

":
"{String}"
43
          },
44
          "initialReceptionItem
InitialReceptionItem

Initial goods reception that was used when moving a product from sales to the rental fleet

":
{
45
               "goodsReceptionItemId
GoodsReceptionItemId

Item-/line-number of the goods reception

":
"{Integer}",
46
               "goodsReception": {
47
                    "goodsReceptionId
GoodsReceptionId

Goods reception identifier

":
"{Integer}",
48
                    "goodsReceptionLink
GoodsReceptionLink

Goods reception identifier

":
"{String}"
49
               },
50
               "goodsReceptionItemLink
GoodsReceptionItemLink

Goods reception item reference

":
"{String}"
51
          },
52
          "currentReceptionItem
CurrentReceptionItem

The current goods reception that the rental unit is located on. This will get a new value each time the rental unit is returned from rent.

":
{
53
               "goodsReceptionItemId
GoodsReceptionItemId

Item-/line-number of the goods reception

":
"{Integer}",
54
               "goodsReception": {
55
                    "goodsReceptionId
GoodsReceptionId

Goods reception identifier

":
"{Integer}",
56
                    "goodsReceptionLink
GoodsReceptionLink

Goods reception identifier

":
"{String}"
57
               },
58
               "goodsReceptionItemLink
GoodsReceptionItemLink

Goods reception item reference

":
"{String}"
59
          },
60
          "owner
Owner

Owner of the rental unit

":
{
61
               "objectType
ObjectType

ObjectType of the owner, can be either a customer (CUS) or a supplier (SUP).

":
"{String}",
62
               "objectId
ObjectId

Account code of owner

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

Name of the customer/supplier, or last name if it is a person.

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

First name of the customer/supplier

":
"{String}",
65
               "objectLink
ObjectLink

Owner reference

":
"{String}"
66
          },
67
          "total
Total

The total price in company currency from the goods reception, or Balance from the fixed asset if the rental unit is tied to a fixed asset

":
"{Decimal}"
68
     }
69
}

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 106410 HTTP 404 Rental assignment not found
Error 100053 HTTP 403 You have only admittance to your own suppliers
Error 101420 HTTP 404 Setting definition not found
Error 107320 HTTP 400 Already exists rental unit with selected serial number.
Error 109293 HTTP 400 It is not allowed to assign a fixed asset to a rental unit owned by a third party
Error 109035 HTTP 400 Only active fixed assets are allowed (ST=3 or ST=4 or ST=8)
Error 109170 HTTP 400 The selected fixed asset is already assigned to a rental unit. You cannot assign the same fixed asset multiple times.
Error 109670 HTTP 400 The connection to the fixed asset cannot be removed because it has financial transactions or the rental unit is currently on rent
Error 101235 HTTP 404 Goods reception item {0} not found
Error 107276 HTTP 400 Serial number of registered rental unit cannot be modified
Error 109482 HTTP 400 The availability start date for non-owners must not precede the rental unit's availability date
Error 109483 HTTP 400 The end date of availability for non-owners cannot be later than the end date of the rental unit