EZRentOut

EZRentOut API

Introduction

EZRENTOUT API is made available to all paying clients to allow for custom integrations. Fair Use applies. API setting updates require the account owner to be logged in. To get started go to Settings, and enable API for the company (disabled by default) and generate an access token. Access token will be used to authenticate each request, ensure you keep this secret and regenerate if its compromised. For security purposes, have each request made over SSL i.e https. The access token should be provided in the http headers for all requests. For issues and bug reports, email us at info@ezrentout.com
Following constants are used in the API documentation.

Constants

  <COMPANY_TOKEN>   Access token generated from the settings page.
  <SUBDOMAIN>       Company name used in signup, also visible in the URL when logged in, 
                    eg https://<SUBDOMAIN>.ezrentout.com/.
  <BASKET#>         The Basket# that is unique to each basket.
  <ASSET_NAME>      Name of an asset, must be a minimum of 3 characters. 
  <GROUP_NAME>      Name of a group, must be a minimum of 3 characters.
  <SUBGROUP_NAME>   Name of a sub group, must be a minimum of 3 characters.
  <GROUP_ID>        Each asset belongs to a Group represented by a Group ID. 
                    Click here to retrieve groups.
  <SUBGROUP_ID>     The ID for a subgroup that is associated or belongs to a group.
                    Click here to retrieve subgroups.
  <LOCATION_NAME>   An asset may have one location associated to it, this being its name.
  <LOCATION_ID>     Click here to retrieve locations.
  <CITY_NAME>       The city for a location.
  <PAGE_NUM>        Results returned from each API call are limited in number. 
                    To access the subsequent result page, increase the PAGE_NUM.
  <ASSET#>          The Asset# that is unique to each asset. See retrieve all assets.
  <COMMENTS>        Assets, Services, Groups etc can have comments added to them. 
  <USER_ID>         The ID's of members in our system. See retrieve all members
  <SALVAGE_VALUE>   Retired assets require a salvage value for reporting purposes.
  <QUANTITY>        Quantity of Inventory, while adding stock or new sale.
  <PRICE>           Price of Inventory per stock item, while adding stock or new sale.
  <EMAIL_ADDRESS>   Email address of a member.
  <USER_FIRST_NAME> Members first name.
  <USER_LAST_NAME>  Members last name.

Orders

Rent out assets and sell inventory items to your customers through orders.

Create Order

Customer field is mandatory.

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "basket[description]=Description" \
      -d "basket[customer_id]=<CUSTOMER_ID>" \ 
      -d "expected_checkout_date=mm/dd/yyyy" \
      -d "expected_checkout_time=hh:mm" \
      -d "due_date=mm/dd/yyyy" \
      -d "start_time=hh:mm" \
      -d "asset_ids=<ASSET#>,<ASSET#>,<ASSET#>" \
      https://<SUBDOMAIN>.ezrentout.com/baskets.api

Add Assets To Order

Asset Ids are mandatory.

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "asset_ids=<ASSET#>,<BUNDLE_ID>-b,<ASSET#>,<BUNDLE_ID>-b" \
      https://<SUBDOMAIN>.ezrentout.com/baskets/<ORDER#>/update_basket_from_show.api

You can add both Asset and Bundle to an Order. To add an asset, specify <ASSET#> and to add a bundle, specify <BUNDLE_ID> + '-b'

Take 'asset_ids=2,25-b' as an example. Here '2' is the Asset# and '25' is the bundle_id with suffix '-b'


Update Order

To update an Order run the following command.

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "basket[identification_number]=Identification Number" \
      -d "expected_checkout_date=mm/dd/yyyy" \
      -d "due_date=mm/dd/yyyy" \
      -d "basket[location_id]=<LOCATION_ID>" \
      -d "basket[customer_id]=<CUSTOMER_ID>" \ 
      -d "basket[order_discount]=Order Discount" \
      -d "basket[assigned_to_id]=<ASSIGNED_TO_ID>" \
      -d "basket[description]=Description" \
      -d "basket[invoice_heading]=Invoice Heading" \
      -d "basket[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
      https://<SUBDOMAIN>.ezrentout.com/baskets/<ORDER#>.api

You can update these attributes for an order:

Draft / Web Order:
identification_number, expected_checkout_date, due_date, bill_from, bill_to, location_id, customer_id, order_discount, assigned_to_id, description, invoice_heading

Booked / Payment Pending:
identification_number, assigned_to_id, description, invoice_heading

Rented Out:
identification_number, due_date, bill_to, assigned_to_id, description, invoice_heading

Completed / Void:
identification_number, description, invoice_heading
Values provided should obey the following rules:
order_discount:
Between 0 and 100
location_id:
A valid location_id from your company's locations
customer_id:
A valid customer_id from your company's customers
assigned_to_id:
A valid user id from your company's users
due_date / bill_from:
Any date greater than the expected_checkedout_date
bill_to:
Any date less than the due_date
Remember that all the dates should be in
MM/DD/YYYY
format

Retrieve all Orders

To retrieve all orders run the following command

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "filters[all]=all" \
      https://<SUBDOMAIN>.ezrentout.com/baskets.api?page=<PAGE_NUM | DEFAULT = 1>

Retrieve details of an Order

Specify Order# in the command below to retrieve details of an order.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
https://<SUBDOMAIN>.ezrentout.com/baskets/<ORDER#>.api

Retrieve Order history

Specify the Order# in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X GET
https://<SUBDOMAIN>.ezrentout.com/baskets/<ORDER#>/history.api?

Customers

Create Customer

Customer first and last name is mandatory field. To set country attribute of a country use two letter country codes

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "customer[description]=Description" \
      -d "customer[first_name]=first name" \ 
      -d "customer[last_name]=last name" \
      -d "customer[employee_identification_number]=identification number" \
      -d "customer[collect_tax]=TRUE|FALSE" \
      -d "customer[email]=email" \
      -d "customer[subscribed_to_emails]=TRUE|FALSE" \
      -d "customer[address_name]=address_name" \
      -d "customer[address]=address line 1" \
      -d "customer[address_line_2]=address line 2" \
      -d "customer[city]=city" \
      -d "customer[state]=state" \
      -d "customer[country]=two_letter_country_code" \
      -d "customer[phone_number]=phone number" \
      -d "customer[fax]= fax" \
      https://<SUBDOMAIN>.ezrentout.com/customers.api

Retrieve all Customers

To retrieve all customers run the following command

curl  -H "token:<COMPANY_TOKEN>" -X GET \
https://<SUBDOMAIN>.ezrentout.com/customers.api?page=<PAGE_NUM | DEFAULT = 1>

Retrieve details of a Customer

Specify in the command below to retrieve details of an customer.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
https://<SUBDOMAIN>.ezrentout.com/customers/<CUSTOMER_ID>.api

Update Customer

Specify customer[email], customer[first_name], customer[last_name], and <CUSTOMER_ID> in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "customer[description]=Description" \
      -d "customer[first_name]=first name" \ 
      -d "customer[last_name]= last name" \
      -d "customer[employee_identification_number]=identification number" \
      -d "customer[collect_tax]=TRUE|FALSE" \
      -d "customer[email]=email \
      -d "customer[subscribed_to_emails]=TRUE|FALSE" \
      -d "customer[phone_number]=phone number" \
      -d "customer[fax]= fax" \
      https://<SUBDOMAIN>.ezrentout.com/customers/<CUSTOMER_ID>.api

Delete Customer

curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
https://<SUBDOMAIN>.ezrentout.com/customers/<CUSTOMER_ID>.api

Mark as active

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
https://<SUBDOMAIN>.ezrentout.com/customers/<CUSTOMER_ID>/mark_active.api

Mark as inactive

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
https://<SUBDOMAIN>.ezrentout.com/customers/<CUSTOMER_ID>/mark_inactive.api

Filters

  curl -H "token:<COMPANY_TOKEN>" -X GET \
        https://<SUBDOMAIN>.ezrentout.com/customers.api \
        -d "filter=email" \
        --data-urlencode "filter_val=<EMAIL>" \
        -d "page=<PAGE_NUM | DEFAULT = 1>"

Specify PAGE_NUM to access customers after the first 25, each page having up to 25 customers. Response also has total number of pages.

Options for filter include:

  email, category, taxed, non_taxed, inactive_customers, subscribed_emails, not_subscribed_emails, checked_out_orders,
  completed_orders, checked_out_items, account_name, contact_owner

However for filter options like email where extra information is required, you need to specify the filter_val as well. For example, in case of email, filter_val will be the email for the customer. So the command will be:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/customers.api? \
      filter=email&filter_val=<EMAIL> \
      &page=<PAGE_NUM | DEFAULT = 1>

For completed_orders filter, you need to specify filter_val. For example, you want to filter customers having completed orders greater than 50. You need to specify filter_val= > 50


Fixed Assets

Fixed assets are long term assets that need to be checked out and checked in to users. Examples include laptops, iPhones etc.

Create asset

Specify fixed_asset[name], fixed_asset[group_id] (see Retrieve groups) and fixed_asset[purchased_on]. These fields are mandatory. Also specify atleast one of rental pricing value(per_minute, hourly, daily, weekly, monthly).Option field is fixed_asset[location_id] (see Retrieve locations) in the command below. To pass custom fields specify cust_attr[custom field name] (see Retrieve custom fields)

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "fixed_asset[name]=<ASSET_NAME>" \
      -d "fixed_asset[group_id]=<GROUP_ID>" \
      -d "fixed_asset[purchased_on]=mm/dd/yyyy" \
      -d "fixed_asset[location_id]=<LOCATION_ID>" \
      -d "fixed_asset[rental_price_attributes][per_minute]=number" \
      -d "fixed_asset[rental_price_attributes][hourly]=number" \
      -d "fixed_asset[rental_price_attributes][daily]=number" \
      -d "fixed_asset[rental_price_attributes][weekly]=number" \
      -d "fixed_asset[rental_price_attributes][monthly]=number" \
      -d "fixed_asset[image_url]=<IMAGE_URL>" \
      -d "fixed_asset[document_urls]=<DOCUMENT_URLS>" \
      https://<SUBDOMAIN>.ezrentout.com/assets.api

You can add up to 5 documents to an asset when creating it. To do this, add the 5 document links


Retrieve all Assets

To retrieve all assets run the following command. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links include show_image_urls in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets.api?page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access assets after the first 25, each page having up to 25 assets. Response also has total number of pages.


Retrieve all Rented Out Assets

To retrieve all currently rented out assets run the following command. To include document links in the result pass show_document_urls and for image links pass show_image_urls in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets/filter.api? \ 
      status=checked_out&page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access assets after the first 25, each page having up to 25 assets. Response also has total number of pages.


Retrieve details of an asset

Specify Asset# in the command below to retrieve details of an asset. To include links in the result pass show_document_urls, for the image links pass show_image_urls and to include item's custom fields in the result pass include_custom_fields in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>.api

Update asset

Specify fixed_asset[name], fixed_asset[group_id] (see Retrieve groups) and fixed_asset[purchased_on]. You can also pass fixed_asset[location_id] (see Retrieve locations) in the command below. To pass custom fields specify cust_attr[custom field name] (see Retrieve custom fields)

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "fixed_asset[name]=<ASSET_NAME>" \
      -d "fixed_asset[group_id]=<GROUP_ID>" \
      -d "fixed_asset[purchased_on]=mm/dd/yyyy" \
      -d "fixed_asset[location_id]=<LOCATION_ID>" \
      -d "fixed_asset[image_url]=<IMAGE_URL>" \
      -d "fixed_asset[document_urls]=<DOCUMENT_URLS>" \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>.api

You can add up to 5 documents to an asset when updating it. To do this, add the 5 document links


Delete Asset

Specify the Asset# in the command below to delete an asset.

curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>.api

Retrieve asset history

Specify the Asset# and page# in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>/history_paginate.api? \
      page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access history after the first 5, each page having up to 5 history entries. Response also has total number of pages.


Search

Specify the name of the asset in the 'search' parameter (or use the # symbol followed by the Item Number, or the @ symbol followed by the Identification Number) to bring up details. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links pass show_image_urls in optional parameter. Results are paginated.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "search=<ASSET_NAME>"
      -d "facet=FixedAsset"
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "page=<PAGE_NUM | DEFAULT = 1>" 
      https://<SUBDOMAIN>.ezrentout.com/search.api

Filters

Filters can be applied to retrieve fixed assets. To include document links in the result pass show_document_urls and for image links pass show_image_urls in optional parameter. Specify the filter_param_val and status in the following command

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      "https://<SUBDOMAIN>.ezrentout.com/assets/filter.api? \
      status=<FILTER_OPTION>&filter_param_val=<FILTER_PARAM_VALUE> \
      &page=<PAGE_NUM | DEFAULT = 1>"

Specify PAGE_NUM to access assets after the first 25, each page having up to 25 assets. Response also has total number of pages.

Options for status include:

available, assets_being_serviced, availability_range, checked_out, group, location, 
overdue, possessions_of, reserved, product_model_number, items_in_order,
reservation_starting_today, retired and update_time.

For filter options like available, filter_param_val is not required. For example, the command for retrieving available assets is:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      "https://<SUBDOMAIN>.ezrentout.com/assets/filter.api? \
      status=available&page=<PAGE_NUM | DEFAULT = 1>"  

However for filter options like possessions_of where extra information is required, you need to specify the filter_param_val as well. For example, in case of possessions_of, filter_param_val will be the id for the user whose assets you want to retrieve. So the command will be:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      "https://<SUBDOMAIN>.ezrentout.com/assets/filter.api? \
      status=possessions_of&filter_param_val=<USER_ID> \
      &page=<PAGE_NUM | DEFAULT = 1>"

Example

The command to check availability of assets will be:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "status=availability_range"" \
      -d "filter_param_val=<START_DATE>,<END_DATE>" \
      https://<SUBDOMAIN>.ezrentout.com/assets/filter.api

Retire asset

Specify salvage value in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "fixed_asset[salvage_value]=<SALVAGE_VALUE>" \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>/retire.api

Inventory

Inventory is fast moving, and the concern is more in terms of stocks added and removed. Examples include printer paper, pens etc that are consumed rather than assigned for possession. Inventory is also referred to as Volatile asset.

Create Inventory

Specify volatile_asset[name] and volatile_asset[group_id] (see Retrieve groups). These fields are mandatory.

You can also pass volatile_asset[location_id] (see Retrieve locations) in the command below. To pass custom fields specify cust_attr[custom field name] (see Retrieve custom fields)
curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "volatile_asset[name]=<ASSET_NAME>"" \
      -d "volatile_asset[group_id]=<GROUP_ID>" \
      -d "volatile_asset[location_id]=<LOCATION_ID>" \
      -d "volatile_asset[image_url]=<IMAGE_URL>" \
      -d "volatile_asset[document_urls]=<DOCUMENT_URLS>" \ 
      https://<SUBDOMAIN>.ezrentout.com/inventory.api

You can add up to 5 documents to an asset when creating it. To do this, add the 5 document links


Retrieve all Inventories

To retrieve all inventories run the following command. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links pass show_image_urls in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      https://<SUBDOMAIN>.ezrentout.com/inventory.api?page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access inventory after the first 25, each page having up to 25 assets. Response also has total number of pages.


Retrieve details of an asset

Specify Asset# in the command below to retrieve details of an asset. For document links in the result pass show_document_urls and for image links pass show_image_urls in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>.api

Retrieve details of Inventory

Specify the Asset# in the command below to retrieve details of inventory. To include document links in the result pass show_document_urls, for image links pass show_image_urls and to include item's custom fields in the result pass include_custom_fields in optional parameter in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>.api

Update Inventory

Specify volatile_asset[name] and volatile_asset[group_id] (see Retrieve groups)

You can also pass volatile_asset[location_id] (see Retrieve locations) in the command below.
curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "volatile_asset[name]=<ASSET_NAME>"" \
      -d "volatile_asset[group_id]=<GROUP_ID>" \
      -d "volatile_asset[location_id]=<LOCATION_ID>" \
      -d "volatile_asset[image_url]=<IMAGE_URL>" \
      -d "volatile_asset[document_urls]=<DOCUMENT_URLS>" \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>.api

You can add up to 5 documents to an inventory when updating it. To do this, add the 5 document links


Delete Inventory

Specify the Asset# in the command below to delete an inventory.

curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>.api

Add Stock

Specify the line_item[quantity] and line_item[price] in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "line_item[quantity]=<QUANTITY>" \
      -d "line_item[price]=<PRICE>" \
      -d "order_type=add stock" \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>/order.api

New Sale

Specify the line_item[quantity] and line_item[price] in the command below. To get locations (see Retrieve locations)

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "line_item[quantity]=<QUANTITY>" \
      -d "line_item[price]=<PRICE>" \
      -d "line_item[comments]=<COMMENTS"> \
      -d "line_item[location_id]=<LOCATION_ID>" \
      -d "order_type=new sale" \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>/order.api

Retrieve inventory history

Specify the Asset# and page# in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/inventory/<ASSET#>/history.api? \
      page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access history after the first 5, each page having up to 5 history entries. Response also has total number of pages.


Search

Specify the name of the inventory in the 'search' parameter (or use the # symbol followed by the Item Number, or the @ symbol followed by the Identification Number) to bring up details. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links pass show_image_urls in optional parameter. Results are paginated.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "search=<INVENTORY_NAME>"
      -d "facet=VolatileAsset"
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "page=<PAGE_NUM | DEFAULT = 1>" 
      https://<SUBDOMAIN>.ezrentout.com/search.api

Filters

Filters can be applied to retrieve volatile assets. Specify the filter_param_val and status in the following command

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      "https://<SUBDOMAIN>.ezrentout.com/inventory/filter.api? \
      status=<FILTER_OPTION>&filter_param_val=<FILTER_PARAM_VALUE> \
      &page=<PAGE_NUM | DEFAULT = 1>"

Specify PAGE_NUM to access assets after the first 25, each page having up to 25 assets. Response also has total number of pages.

Options for status include:

group, items_in_order, location, low_stock, quantity_range, reserved, update_time.

For filter options like low_stock, filter_param_val is not required. For example, the command for retrieving available assets is:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      "https://<SUBDOMAIN>.ezrentout.com/inventory/filter.api? \
      status=available&page=<PAGE_NUM | DEFAULT = 1>"  

However for filter options like quantity_range where extra information is required, you need to specify the filter_param_val as well. For example, in case of quantity_range, filter_param_val will be the range for the quantity. So the command will be:

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      "https://<SUBDOMAIN>.ezrentout.com/inventory/filter.api? \
      status=quantity_range&filter_param_val=<RANGE_BEGIN,RANGE_END> \
      &page=<PAGE_NUM | DEFAULT = 1>"

Asset Stock

Asset stock is tracked in bulk, with quantities that can be added or moved between locations. Examples include bits of hardware or furniture that you'd like to track the custodianship of, but without needing to know which specific item is with which person..

Create Asset Stock

Specify stock_asset[name] and stock_asset[group_id] (see Retrieve groups). These fields are mandatory.

You can also pass stock_asset[location_id] (see Retrieve locations) in the command below. To pass custom fields specify cust_attr[custom field name] (see Retrieve custom fields)
curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "stock_asset[name]=<ASSET_NAME>"" \
      -d "stock_asset[group_id]=<GROUP_ID>" \
      -d "stock_asset[location_id]=<LOCATION_ID>" \
      -d "stock_asset[image_url]=<IMAGE_URL>" \
      -d "stock_asset[document_urls]=<DOCUMENT_URLS>" \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets.api

You can add up to 5 documents to an asset when creating it. To do this, add the 5 document links


Retrieve all Asset Stock

To retrieve all asset stock run the following command. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links pass show_image_urls in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets.api?page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access asset stock after the first 25, each page having up to 25 assets. Response also has total number of pages.


Retrieve details of Asset Stock

Specify the Asset Stock# in the command below to retrieve details of asset stock. For document links in the result pass show_document_urls, for image links pass show_image_urls and to include item's custom fields in the result pass include_custom_fields in optional parameter in optional parameter

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets/<AssetStock#>.api

Update Asset Stock

Specify stock_asset[name] and stock_asset[group_id] (see Retrieve groups)

You can also pass stock_asset[location_id] (see Retrieve locations) in the command below.
curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "stock_asset[name]=<ASSET_NAME>"" \
      -d "stock_asset[group_id]=<GROUP_ID>" \
      -d "stock_asset[location_id]=<LOCATION_ID>" \
      -d "stock_asset[image_url]=<IMAGE_URL>" \
      -d "stock_asset[document_urls]=<DOCUMENT_URLS>" \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets/<ASSET#>.api

You can add up to 5 documents to an asset stock when updating it. To do this, add the 5 document links


Delete Asset Stock

Specify the Asset# in the command below to delete an asset stock.

curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets/<ASSET#>.api

Add Stock

Specify the line_item[quantity] and line_item[price] in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "line_item[quantity]=<QUANTITY>" \
      -d "line_item[price]=<PRICE>" \
      -d "order_type=add stock" \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets/<ASSET#>/order.api

Retrieve Asset Stock history

Specify the Asset# and page# in the command below.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/stock_assets/<ASSET#>/history.api? \
      page=<PAGE_NUM | DEFAULT = 1>

Specify PAGE_NUM to access history after the first 5, each page having up to 5 history entries. Response also has total number of pages.


Search

Specify the name of the asset stock in the 'search' parameter (or use the # symbol followed by the Item Number, or the @ symbol followed by the Identification Number) to bring up details. To include item custom fields in the result pass include_custom_fields, for document links pass show_document_urls and for image links pass show_image_urls in optional parameter. Results are paginated.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "search=<ASSET_STOCK_NAME>"
      -d "facet=StockAsset"
      -d "include_custom_fields=true" \
      -d "show_document_urls=true" \
      -d "show_image_urls=true" \
      -d "show_document_details=true" \
      -d "page=<PAGE_NUM | DEFAULT = 1>" 
      https://<SUBDOMAIN>.ezrentout.com/search.api

Members

Create member

Specify user[email], user[first_name], user[last_name] and user[role_id]. These are mandatory fields.

  • For creating Administrator use role_id = 1
  • For creating Staff user use role_id = 2
curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "user[email]=<EMAIL_ADDRESS>" \
      -d "user[role_id]=<ROLE_ID>" \
      -d "user[first_name]=<USER_FIRST_NAME>" \
      -d "user[last_name]=<USER_LAST_NAME>" \
      -d "user[address_name]=<ADDRESS_NAME>" \
      -d "user[address]=<ADDRESS LINE 1>" \
      -d "user[address_line_2]=<ADDRESS LINE 2>" \
      -d "user[state]=<STATE>" \
      -d "user[country]=<TWO_LETTER_COUNTRY_CODE>" \
      -d "user[phone_number]=<PHONE NUMBER>" \
      -d "user[fax]=<FAX>" \
      -d "user[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
      https://<SUBDOMAIN>.ezrentout.com/members.api

Retrieve all members

To retrieve all members of the company run the command below. To include item custom fields in the result, pass optional parameter include_custom_fields

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/members.api?page=<PAGE_NUM>

Specify PAGE_NUM to access members after the first 25, each page having up to 25 members. Specify all in 'page' parameter to retrieve all members. This parameter is optional


Retrieve details of a user

Specify the <USER_ID> in the command below to retrieve details of a user. To include item custom fields in the result, pass optional parameter include_custom_fields

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/members/<USER_ID>.api

Update member

Specify user[email], user[first_name], user[last_name], user[role_id] and <USER_ID> in the command below. You cannot update the details of company owner.

  • For creating Admin user pass role_id = 1
  • For creating Staff user pass role_id = 2
curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "user[email]=<EMAIL_ADDRESS>" \
      -d "user[role_id]=<ROLE_ID>" \
      -d "user[first_name]=<USER_FIRST_NAME>" \
      -d "user[last_name]=<USER_LAST_NAME>" \
      -d "user[phone_number]=<PHONE NUMBER>" \
      -d "user[fax]=<FAX>" \
      https://<SUBDOMAIN>.ezrentout.com/members/<USER_ID>.api

Activate user

Specify the <USER_ID> in the command below to activate user

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      https://<SUBDOMAIN>.ezrentout.com/members/<USER_ID>/activate.api

Deactivate user

Specify the <USER_ID> in the command below to deactivate user.

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      https://<SUBDOMAIN>.ezrentout.com/members/<USER_ID>/deactivate.api

Locations

Create location

Specify location[name] in the command below. Its a mandatory field. You can also pass location[city], location[state], location[zipcode], location[street1], location[street2] and location[description] (optional).

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "location[name]=<LOCATION_NAME>" \
      -d "location[city]=<CITY_NAME>" \ 
      https://<SUBDOMAIN>.ezrentout.com/locations.api

Retrieve locations

Retrieve all locations.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/locations/get_line_item_locations.api

Update location

Specify location[name] and <LOCATION_ID> in the command below. location[name] is a mandatory field. You can also pass location[city], location[state], location[zipcode], location[street1], location[street2] And location[description] (optional).

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "location[name]=<LOCATION_NAME>" \
      -d "location[city]=<CITY_NAME>" \ 
      https://<SUBDOMAIN>.ezrentout.com/locations/<LOCATION#>.api

Bundles

Retrieve bundles

Retrieve all the bundles.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/bundles.api?page=<PAGE_NUM>

Specify PAGE_NUM to access bundles after the first 25, each page having up to 25 bundles. This parameter is optional.


Retrieve details of a bundle

Specify Bundle# in the command below to retrieve details of a bundle.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/bundles/<BUNDLE_ID>.api

Groups

Create group

Specify group[name] in the command below. It's a mandatory field. You can also pass group[description] and group[depreciation_rate](optional).

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "group[name]=<GROUP_NAME>" \
      -d "group[description]=<DESCRIPTION>" \
      -d "group[depreciation_rate]=<DEPRECIATION_RATE>" \
      https://<SUBDOMAIN>.ezrentout.com/groups.api

Retrieve groups

Retrieve all the groups

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "show_document_details=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets/classification_view.api?page=<PAGE_NUM>

Specify PAGE_NUM to access groups after the first 25, each page having up to 25 groups. This parameter is optional


Subgroups

Create subgroup

Specify sub_group[name] in the command below. It's a mandatory field. You can also pass sub_group[description](optional).

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "sub_group[name]=<SUBGROUP_NAME>" \
      -d "sub_group[description]=<DESCRIPTION>" \
      https://<SUBDOMAIN>.ezrentout.com/groups/<GROUP_ID>/sub_groups.api

Retrieve subgroups

To retrieve all subgroups, run the following command. To retrieve subgroups of a specific group only, pass optional parameter group_id.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "group_id=<GROUP_ID>" \
      https://<SUBDOMAIN>.ezrentout.com/groups/get_sub_groups.api

Retrieve details of a subgroup.

To retrieve details of a specific subgroup, run the following command

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      http://<SUBDOMAIN>.ezrentout.com/groups/<GROUP_ID>/sub_groups/<SUBGROUP_ID>.api

Vendors

Create Vendor

Specify vendor[name]. This is a mandatory field.

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "vendor[name]=<NAME>" \
      -d "vendor[description]=<DESCRIPTION>" \
      -d "vendor[website]=<WEBSITE>" \
      -d "vendor[address]=<ADDRESS>" \
      -d "vendor[contact_person_name]=<CONTACT_PERSON_NAME>" \
      -d "vendor[email]=<EMAIL>" \
      -d "vendor[phone_number]=<PHONE NUMBER>" \
      -d "vendor[fax]=<FAX>" \
      -d "vendor[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
      https://<SUBDOMAIN>.ezrentout.com/vendors.api

Retrieve vendors

Retrieve all the vendors. To include item custom fields in the result, pass optional parameter include_custom_fields

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/assets/vendors.api?page=<PAGE_NUM>

Specify PAGE_NUM to access vendors after the first 25, each page having up to 25 vendors. This parameter is optional

Retrieve vendor

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      -d "include_custom_fields=true" \
      https://<SUBDOMAIN>.ezrentout.com/vendors/<VENDOR_ID>.api

Update Vendor

curl  -H "token:<COMPANY_TOKEN>" -X PUT \
      -d "vendor[name]=<NAME>" \
      -d "vendor[description]=<DESCRIPTION>" \
      -d "vendor[website]=<WEBSITE>" \
      -d "vendor[address]=<ADDRESS>" \
      -d "vendor[contact_person_name]=<CONTACT_PERSON_NAME>" \
      -d "vendor[email]=<EMAIL>" \
      -d "vendor[phone_number]=<PHONE NUMBER>" \
      -d "vendor[fax]=<FAX>" \
      -d "vendor[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
      https://<SUBDOMAIN>.ezrentout.com/vendors/<VENDOR_ID>.api

Custom Fields

Retrieve custom fields

Retrieve all the custom fields

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.ezrentout.com/assets/custom_attributes.api

Custom fields history

Retrieve history of a custom field for a specific asset.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      http://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>/custom_attribute_history.api?custom_attribute_id=<CUSTOM_FIELD_ID>

Comments

Create

Specify comment[content]. This field is mandatory.

 curl  -H "token:<COMPANY_TOKEN>" -X POST \
       -d "comment[content]=<CONTENT>" \
       -d "created_by_id=<USER_ID>" \
       https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>/comments.api
 

Retrieve all Comments

To retrieve all the comments for a specific item, run the following command:

 curl  -H "token:<COMPANY_TOKEN>" -X GET \
       -d "created_by_id=<USER_ID>" \
       https://<SUBDOMAIN>.ezrentout.com/assets/<ASSET#>/comments.api?page=<PAGE_NUM | DEFAULT = 1>
 

Specify PAGE_NUM to access comments after the first 25, each page having up to 25 comments. Response also has the total number of pages. To retrieve all the comments of a specific user, include created_by_id in optional parameters.