Asset Intelligence and Management

Developers

AssetSonar API

Introduction

AssetSonar API is made available to all paying clients to allow for custom integrations. Fair usage policy applies. For the API setting to work, Account Owner must be logged in. To get started, go to Settings --> Add Ons --> API Integration --> Select Enabled (disabled by default). Once done, generate an Access Token. The Access Token will be used to authenticate each request. Please ensure that you keep this secret and regenerate if it is 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@assetsonar.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, 
        e.g. https://<SUBDOMAIN>.assetsonar.com/.
        <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 Subgroup, 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>     Groups may have subgroups, represented by a Subgroup ID.
        Click here to retrieve subgroups.
        <LOCATION_NAME>   Name of a Location, must be a minimum of 3 characters.
        <LOCATION_ID>     Each Location has a unique Location ID. Click here to retrieve Locations.
        <CITY_NAME>       The name of the city that the Location is in.
        <PAGE_NUM>        Results returned from each API call are limited in number. 
        To access the subsequent results, go to the relevant page.
        <ASSET#>          Each Asset has a unique Asset#. Click here to retrieve all assets.
        <COMMENTS>        Assets, Services, Groups, etc can have comments added to them. 
        <USER_ID>         Each User in the system has a unique User ID. Click here to retrieve all Users.
        <SALVAGE_VALUE>   Retired Assets require a salvage value for reporting purposes.
        <QUANTITY>        Quantity of Inventory when adding or removing stock.
        <SOFTWARE_NAME>   Name of software, must be a minimum of 1 character.
        <SOFTWARE_TYPE>   Type of software, must be either installed or cloud.
        <PRICE>           Price of Inventory per stock item when adding or removing stock.
        <EMAIL_ADDRESS>   Email address of a User.
        <USER_FIRST_NAME> Users first name.
        <USER_LAST_NAME>  Users last name.
      

API Usage Limits for In-trial Customers

If you are an in-trial customer with AssetSonar, please note that we have defined API usage limits. You are allowed a certain number of requests (approx. 1000) per day. If this rate limit is exceeded, the API responds with an “HTTP 429 Too Many Requests” response code along with a body specifying the reason for the rate limit error. The rate limits can be detected by checking if the response code is 429.

Retry-After Header

The 429 response always includes a Retry-After header that lets you know how many seconds to wait before retrying. If you re-submit the request before the retry period expires, the request will fail and return the same or longer period.

        Retry-After: 3600
      

Monitoring Usage

The rate limits are defined on a per day basis. Custom headers are added to each API response to allow monitoring of usage activity.

        X-Rate-Limit: 1000
        X-Rate-Limit-Remaining: 999
      

Fixed Assets

Fixed Assets are long-term Assets that need to be checked out and checked in to Users. Examples include laptops and iPhones.

Create Asset

Specify fixed_asset[name], fixed_asset[group_id] (see how to retrieve Groups) and fixed_asset[purchased_on]. These fields are mandatory. fixed_asset[location_id] in the command below is an optional field (see how to retrieve Locations). To pass custom fields, specify cust_attr[custom field name] (see how to 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[sub_group_id]=<SUB_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_URL1>" \
        -d "fixed_asset[document_urls][]=<DOCUMENT_URL2>" \
        -d "fixed_asset[identifier]=<IDENTIFICATION_NUMBER>" \
        https://<SUBDOMAIN>.assetsonar.com/assets.api
      

You can attach 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 the optional parameter include_custom_fields

          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>.assetsonar.com/assets.api?page=<PAGE_NUM | DEFAULT = 1>
        

Each page has 25 Assets. Specify PAGE_NUM to access subsequent Assets.


Retrieve checked out Assets

To retrieve all currently checked out Assets, run the following command.

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

Each page has 25 Assets. Specify PAGE_NUM to access subsequent Assets. The response also has the 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 image links, pass show_image_urls and to include item custom fields in the result, pass include_custom_fields in the optional parameter. To include System Details or Hardware Details, pass 'include_system_details' or 'include_hardware_details' respectively.

          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" \
          -d "include_system_details=true" \
          -d "include_hardware_details=true" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>.api
        

Update GPS location Coordinates of an asset

Specify the Asset# and coordinates(`latitude` and `longitude`) in the command below to track the asset location. `gps_asset_id` is an optional parameter.

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "gps_asset_id=<GPS_ASSET_ID>" \
      -d "latitude=<LATITUDE_VALUE>" \
      -d "longitude=<LONGITUDE_VALUE>" \
      https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/gps_coordinates.api

Update Asset

Specify fixed_asset[name], fixed_asset[group_id] (see how to retrieve Groups) and fixed_asset[purchased_on]. You can also pass fixed_asset[location_id] (see how to retrieve Locations) in the command below. To pass custom fields, specify cust_attr[custom field name] (see how to 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[sub_group_id]=<SUB_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_URL1>" \
          -d "fixed_asset[document_urls][]=<DOCUMENT_URL2>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>.api
        

You can attach 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>.assetsonar.com/assets/<ASSET#>.api
        

Check in an Asset

Specify the Asset# in the command to check in an Asset (see how to retrieve Locations).

          curl  -H "token:<COMPANY_TOKEN>" -X PUT \
          -d "checkin_values[location_id]=<LOCATION_ID>" \
          -d "checkin_values[comments]=<COMMENTS>" \ 
          -d "checkin_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/checkin.api
        

Check out an Asset

Specify either user_id or user_email in the command for the User that you want to check out the Asset to (see how to retrieve Users). In case you specify both parameters, priority will be given to user_id.

To check out an item indefinitely, do not provide the till and till_time parameters.

          curl  -H "token:<COMPANY_TOKEN>" -X PUT \
          -d "checkout_values[location_id]=<LOCATION_SEQUENCE_ID>" \
          -d "checkout_values[comments]=<COMMENTS>" \ 
          -d "till=<Date>" \
          -d "till_time=<Time>" \
          -d "checkout_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/checkout.api?user_id=<USER_ID>
        

Retrieve Asset history

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

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

Each page has 5 records. Specify PAGE_NUM to access subsequent records. The response also has the total number of pages.


Extend checkout

Specify the Asset# in the command below.

          curl  -H "token:<COMPANY_TOKEN>" -X PUT \
          -d "till=mm/dd/yyyy" -d "till_time=hh:mm" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/extend_checkout.api
        

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 its details. To include item custom fields in the result, pass the optional parameter include_custom_fields. 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>.assetsonar.com/search.api
        

Verification Request

To send a Verification Request to the custodian of an asset, run the following command specifying the Asset #.

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

To acknowledge possesion of an asset, specify User ID of the custodian and Asset # of the checked out asset. To get user_id (see Retrieve members). If response is not mentioned, then asset will be considered as 'Verified'. The condition and notes are optional parameters here.

          curl  -H "token:<COMPANY_TOKEN>" -X POST  \
          -d "user_id=<USER_ID>" \
          -d "audit[response]=<RESPONSE_TYPE>" \
          -d "audit[condition]"=<ASSET_CONDITION>" \
          -d "audit[notes]"=<NOTES>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/verify_possession.api
        

To cancel verification of as asset, specify User ID of the custodian and Asset # of the checked out asset. To get user_id (see Retrieve members).

          curl  -H "token:<COMPANY_TOKEN>" -X PUT  \
          -d "user_id=<USER_ID>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/cancel_verification.api
        

Mass Verification Requests

To send a Verification Request to the custodians of mutiple assets, specify seqs parameter as comma separated values of assets numbers and run the following command.

          curl  -H "token:<COMPANY_TOKEN>" -X POST  \
          -d "seqs=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
          -d "audit[notes]=<NOTES>" \"
          https://<SUBDOMAIN>.assetsonar.com/assets/mass_verification_requests.api
        

To acknowledge custody of mutiple assets, specify User ID of the custodian and specify seqs parameter as comma separated values of assets numbers of checked out assets. To get user_id (see Retrieve members). If response is not mentioned, then asset will be considered as 'Verified'. The condition and notes are optional parameters here.

          curl  -H "token:<COMPANY_TOKEN>" -X POST  \
          -d "user_id=<USER_ID>" \
          -d "seqs=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
          -d "audit[response]=<RESPONSE_TYPE>" \
          -d "audit[condition]"=<ASSET_CONDITION>" \
          -d "audit[notes]"=<NOTES>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/mass_verify_possessions.api
        

To cancel verification of mutiple assets, specify User ID of the custodian and specify seqs parameter as comma separated values of assets numbers of checked out assets. To get user_id (see Retrieve members).

          curl  -H "token:<COMPANY_TOKEN>" -X PATCH  \
          -d "user_id=<USER_ID>" \
          -d "seqs=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
          https://<SUBDOMAIN>.assetsonar.com/assets/mass_cancel_verifications.api
        

To view last verification status of mutiple assets specify seqs parameter as comma separated values of assets numbers of checked out assets and run the following command.

          curl  -H "token:<COMPANY_TOKEN>" -X GET  \
          -d "seqs=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
          https://<SUBDOMAIN>.assetsonar.com/assets/verification_status.api
        

Retire Asset

The fixed_asset[retired_on] and fixed_asset[retire_reason_id] (learn how to retrieve all retire reasons) fields are mandatory; the fixed_asset[salvage_value] is an optional parameter.

          curl  -H "token:<COMPANY_TOKEN>" -X PUT \
          -d "fixed_asset[salvage_value]=<SALVAGE_VALUE>" \
          -d "fixed_asset[retired_on]=mm/dd/yyyy" \
          -d "fixed_asset[retire_reason_id]=<RETIRE_REASON_ID>"
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/retire.api
        

Activate retired asset

LOCATION_ID can be mandatory, optional or not required based on company settings.

          curl  -H "token:<COMPANY_TOKEN>" -X PUT \
          -d "fixed_asset[location_id]=<LOCATION_ID>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/activate.api
        

Filters

Filters can be applied to retrieve Fixed 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 "include_custom_fields=true" \
          -d "show_image_urls=true" \
          -d "show_document_details=true" \
          "https://<SUBDOMAIN>.assetsonar.com/assets/filter.api?&status=<FILTER_OPTION>filter_param_val=<FILTER_PARAM_VALUE>&page=<PAGE_NUM | DEFAULT = 1>"
        

Each page has 25 Assets. Specify PAGE_NUM to access subsequent Assets. The response also has the total number of pages.

Options for status include:

        
          available, assets_being_serviced, availability_range, checked_out, checkin_overdue,
          checkin_due_today, due_today, group, items_in_order, location, my_pending_audit,
          my_possessions, my_user_listing, outside_user_listing, overdue, pending audit,
          possessions_of, possessions_of_email, product_model_number, reservation_starting_today,
          retired and update_time, type.
        

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

        
          curl  -H "token:<COMPANY_TOKEN>" -X GET \
          "https://<SUBDOMAIN>.assetsonar.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 the 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 \
          "https://<SUBDOMAIN>.assetsonar.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 "status=availability_range"" \
          -d "filter_param_val=<START_DATE>~<END_DATE>" \
          https://<SUBDOMAIN>.assetsonar.com/assets/filter.api
        

Filter by Subgroup

To filter details by a specific Subgroup, run the following command:

API command here:

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

Define the parameters mentioned below in the above command:

  1. FILTER_OPTION: Choose "group" from the above list of "Options for Status".
  2. GROUP_ID: Specify the <group_ID> of the Group associated with the Subgroup details you are retrieving.
  3. SUBGROUP_ID: Specify the <subgroup_ID> of the Subgroup details you are retrieving.

Custom Filters

Applying custom filters to fixed assets is a two-step process:

Step 1: Retrieve IDs of all the custom filters for the given asset type i.e. fixed assets in this case using the command below

          curl  -H "token:<COMPANY_TOKEN>" -X GET \
          -d "assets_type=fixed_assets" \
          https://<SUBDOMAIN>.assetsonar.com/custom_filters.api
        

Step 2: To apply the custom filter, specify the preferred ID in custom_filter_id, and enter it in status and filter param val for the command below. Moreover specifying assets_type is mandatory.

          curl  -H "token:<COMPANY_TOKEN>" -X GET \
          -d "show_document_urls=true" \
          -d "include_custom_fields=true" \
          -d "show_image_urls=true" \
          -d "show_document_details=true" \
          -d "assets_type=fixed_assets" \
          "https://<SUBDOMAIN>.assetsonar.com/assets/filter.api? \
          status=custom_filter_<custom_filter_id>&filter_param_val=<custom_filter_id> \
          &page=<PAGE_NUM | DEFAULT = 1>"
        

Reserved Dates

Specify the Asset # in the command below to retrieve reserved dates of the Asset.

          curl  -H "token:<COMPANY_TOKEN>" -X GET \
          https://<SUBDOMAIN>.assetsonar.com/assets/<Asset#>/reserved_dates.api
        

Cancel Item Reservation

Specify the Reservation Request ID in the command below to cancel the reservation. Reservation Request ID can be retreived from Reservation Requests - Retrieve Requests API.

          curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
          https://<SUBDOMAIN>.assetsonar.com/checkout_requests/<ID#>/cancel_reservation.api
        

Inventory

Inventory is fast moving and consumable. It's added or removed in terms of stock. Examples include printer paper and pens that are consumed rather than assigned for possession. Inventory items are also referred to as Volatile Assets.

Create Inventory

Specify volatile_asset[name] and volatile_asset[group_id] (see how to retrieve Groups). These fields are mandatory.

You can also pass volatile_asset[location_id] (see how to retrieve Locations) in the command below. To pass custom fields, specify cust_attr[custom field name] (see how to 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_URL1>" \
            -d "volatile_asset[document_urls][]=<DOCUMENT_URL2>" \
            -d "volatile_asset[identifier]=<IDENTIFICATION_NUMBER>" \
            https://<SUBDOMAIN>.assetsonar.com/inventory.api
          

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


Retrieve all Inventory items

To retrieve all inventory items, run the following command. To include item custom fields in the result, pass the optional parameter include_custom_fields.

            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>.assetsonar.com/inventory.api?page=<PAGE_NUM | DEFAULT = 1>
          

Each page has 25 Inventory items. Specify PAGE_NUM to access subsequent Inventory items. The response also has the total number of pages.


Retrieve details of an Asset

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

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

Retrieve Inventory details

Specify the Inventory# in the command below to retrieve details of an Inventory item. To include document links in the result, pass show_document_urls. For image link, pass show_image_urls and to include item's custom fields in the result, pass include_custom_fields in the 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>.assetsonar.com/inventory/<ASSET#>.api
          

Update Inventory

Specify volatile_asset[name] and volatile_asset[group_id] (see how to retrieve Groups).

You can also pass volatile_asset[location_id] (see how to 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_URL1>" \
            -d "volatile_asset[document_urls][]=<DOCUMENT_URL2>" \
            https://<SUBDOMAIN>.assetsonar.com/inventory/<ASSET#>.api
          

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


Delete Inventory

Specify the Inventory# in the command below to delete an Inventory item.

              curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
              https://<SUBDOMAIN>.assetsonar.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 "add_stock_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
              -d "order_type=Add Stock" \
              https://<SUBDOMAIN>.assetsonar.com/inventory/<ASSET#>/order.api
            

Transfer Stock

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

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "transfer_stock[quantity]=<QUANTITY>" \
              -d "price=<PRICE>" \
              -d "from_location=<LOCATION_ID>" \
              -d "to_location=<LOCATION_ID>" \
              -d "transfer_stock[comments]=<COMMENTS>" \
              https://<SUBDOMAIN>.assetsonar.com/inventory/<ASSET#>/transfer_stock.api
            

New Sale

Specify the line_item[quantity] and line_item[price] in the command below (see how to 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 "remove_stock_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
              -d "order_type=New Sale" \
              https://<SUBDOMAIN>.assetsonar.com/inventory/<ASSET#>/order.api
            

Retrieve Inventory history

Specify the Inventory# and Page# in the command below.

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

Each page has 25 Inventory items. Specify PAGE_NUM to access subsequent Inventory items. The response also has the total number of pages.


Search

Specify the name of the Inventory item in the 'search' parameter (or use the # symbol followed by the Inventory Number, or the @ symbol followed by the Identification Number) to bring up its details. To include item custom fields in the result, pass optional parameter include_custom_fields. 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>.assetsonar.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 "include_custom_fields=true" \
              -d "show_image_urls=true" \
              -d "show_document_details=true" \
              "https://<SUBDOMAIN>.assetsonar.com/inventory/filter.api? \
              status=<FILTER_OPTION>&filter_param_val=<FILTER_PARAM_VALUE> \
              &page=<PAGE_NUM | DEFAULT = 1>"
            

Each page has 25 Inventory items. Specify PAGE_NUM to access subsequent Inventory items. The response also has the total number of pages.

Options for status include:

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

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

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

Filter by Subgroup

To filter details by a specific Subgroup, run the following command:

API command here:

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

Define the parameters mentioned below in the above command:

  1. FILTER_OPTION: Choose "group" from the above list of "Options for Status".
  2. GROUP_ID: Specify the <group_ID> of the Group associated with the Subgroup details you are retrieving.
  3. SUBGROUP_ID: Specify the <subgroup_ID> of the Subgroup details you are retrieving.

Custom Filters

Applying custom filters to inventory is a two-step process:

Step 1: Retrieve IDs of all the custom filters for the given asset type i.e. volatile assets in this case using the command below

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "assets_type=volatile_assets" \
              https://<SUBDOMAIN>.assetsonar.com/custom_filters.api
            

Step 2: To apply the custom filter, specify the preferred ID in custom_filter_id, and enter it in status and filter param val for the command below. Moreover specifying assets_type is mandatory.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "show_document_urls=true" \
              -d "show_image_urls=true" \
              -d "include_custom_fields=true" \
              -d "show_document_details=true" \
              -d "assets_type=volatile_assets" \
              "https://<SUBDOMAIN>.assetsonar.com/inventory/filter.api? \
              status=custom_filter_<custom_filter_id>&filter_param_val=<custom_filter_id> \
              &page=<PAGE_NUM | DEFAULT = 1>"
            

Retrieve Inventory quantity for a location

Specify the Item# in the asset_id field and the Location# in the location_id field, and run the following command to retrieve stock quantity at a specific location.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "asset_id=<ASSET_ID>" \
              -d "location_id=<LOCATION_ID>" \
              https://<SUBDOMAIN>.assetsonar.com/locations/get_quantity_by_location.api
            

Reserved Dates

Specify the Inventory # in the command below to retrieve reserved dates of the Inventory.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              https://<SUBDOMAIN>.assetsonar.com/assets/<Inventory#>/reserved_dates.api
            

Location Based Thresholds

Specify the Inventory # in the command below to retrieve location specific threshold details of the Inventory.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
      https://<SUBDOMAIN>.assetsonar.com/inventory/<Inventory#>/location_based_thresholds.api

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 how to retrieve Groups). These fields are mandatory.

You can also pass stock_asset[location_id] (see how to retrieve Locations) in the command below. To pass custom fields, specify cust_attr[custom field name] (see how to 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_URL1>" \
              -d "stock_asset[document_urls][]=<DOCUMENT_URL2>" \
              -d "stock_asset[identifier]=<IDENTIFICATION_NUMBER>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets.api
            

You can attach up to 5 documents to an Asset Stock item 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 the optional parameter include_custom_fields.

              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>.assetsonar.com/stock_assets.api?page=<PAGE_NUM | DEFAULT = 1>
            

Each page has 25 Asset Stock items. Specify PAGE_NUM to access subsequent items. The response also has the total number of pages.


Retrieve Asset Stock details

Specify the Asset Stock# in the command below to retrieve details of the 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.

              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>.assetsonar.com/stock_assets/<AssetStock#>.api
            

Update Asset Stock

Specify stock_asset[name] and stock_asset[group_id] (see how to retrieve Groups).

You can also pass stock_asset[location_id] (see how to 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_URL1>" \
              -d "stock_asset[document_urls][]=<DOCUMENT_URL2>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>.api
            

You can attach 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 Stock# in the command below to delete an Asset Stock item.

              curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
              https://<SUBDOMAIN>.assetsonar.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 "add_stock_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
              -d "order_type=Add Stock" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/order.api
            

Transfer Stock

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

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "transfer_stock[quantity]=<QUANTITY>" \
              -d "price=<PRICE>" \
              -d "from_location=<LOCATION_ID>" \
              -d "to_location=<LOCATION_ID>" \
              -d "transfer_stock[comments]=<COMMENTS>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/transfer_stock.api
            

Check out

Specify the line_item[quantity] and line_item[price] in the command below (see how to retrieve Locations).

To check out an item indefinitely, do not provide the till and till_time parameters.

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "line_item[quantity]=<QUANTITY>" \
              -d "line_item[price]=<PRICE>" \
              -d "line_item[checked_out_to_location_id]=<To Location>" \
              -d "line_item[comments]=<Comments>" \
              -d "line_item[location_id]=<LOCATION_ID>" \
              -d "till=<Date>"
              -d "till_time=<Time>"
              -d "remove_stock_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
              -d "user={ "id" = <USERID> }
              -d "order_type=checkout" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/order.api
            

Checkin

Specify the line_item[quantity] in the command below. To get line items (see Retrieve line items)

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "selected_line_items=<SELECTED_LINE_ITEMS>" \
              -d "line_item[quantity]=<QUANTITY>" \
              -d "line_item[location_id]=<From Location>" \
              -d "remove_stock_values[override_conflicting_reservations]=true" \
              -d "actual_checkin_on=<Date>" \
              -d "actual_checkin_on_time=<Time>" \
              -d "line_item[comments]=<COMMENTS>" \
              -d "order_type=checkin" \
              -d "checkin_stock_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/checkin.api
            

Retrieve Asset Stock history

Specify the Asset Stock# and Page# in the command below.

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

Each page has 5 records. Specify PAGE_NUM to access subsequent records. The response also has the total number of pages.


Extend Checkout

Specify the Asset# and SELECTED_LINE_ITEMS in the command below.

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "selected_line_items=<SELECTED_LINE_ITEMS>" \
              -d "till=mm/dd/yyyy" \
              -d "till_time=hh:mm" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/mass_extend_checkout_items.api
            

Retrieve Current Checkouts

To retrieve checkout out line items of a stock run the following command.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "current_checkout_status=<CURRENT_CHECKOUT_STATUS>" \
              -d "user_id=<USER_ID>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/<ASSET#>/get_current_checkouts.api
            

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 its details. To include item's custom fields in the result, pass the optional parameter include_custom_fields. 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>.assetsonar.com/search.api
            

Retrieve Stock Asset quantity for a location

Specify the Item# in the asset_id field and the Location# in the location_id field, and run the following command to retrieve stock quantity at a specific location.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "asset_id=<ASSET_ID>" \
              -d "location_id=<LOCATION_ID>" \
              https://<SUBDOMAIN>.assetsonar.com/locations/get_quantity_by_location.api
            

Filters

Filters can be applied to retrieve stock 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 "include_custom_fields=true" \
              -d "show_image_urls=true" \
              -d "show_document_details=true" \
              "https://<SUBDOMAIN>.assetsonar.com/stock_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:

        
              location, possessions_of, low_stock, quantity_range, reserved, retired, update_time, group, items_in_order
            

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

        
              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              "https://<SUBDOMAIN>.assetsonar.com/stock_assets/filter.api? \
              status=low_stock&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 \
              "https://<SUBDOMAIN>.assetsonar.com/stock_assets/filter.api? \
              status=possessions_of&filter_param_val=<USER_ID> \
              &page=<PAGE_NUM | DEFAULT = 1>"
            

Filter by Subgroup

To filter details by a specific Subgroup, run the following command:

API command here:

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "show_document_urls=true" \
              -d "show_image_urls=true" \
              -d "show_document_details=true" \
              -d "status=<FILTER_OPTION>" \
              -d "filter_param_val=<GROUP_ID>" \
              -d "sub_group_param_val=<SUB_GROUP_ID>" \
              -d "page=<PAGE_NUM | DEFAULT = 1>" \
              https://<SUBDOMAIN>.assetsonar.com/stock_assets/filter.api
            

Define the parameters mentioned below in the above command:

  1. FILTER_OPTION: Choose "group" from the above list of "Options for Status".
  2. GROUP_ID: Specify the <group_ID> of the Group associated with the Subgroup details you are retrieving.
  3. SUBGROUP_ID: Specify the <subgroup_ID> of the Subgroup details you are retrieving.

Custom Filters

Applying custom filters to stock assets is a two-step process:

Step 1: Retrieve IDs of all the custom filters for the given asset type i.e. stock assets in this case using the command below

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "assets_type=stock_assets" \
              https://<SUBDOMAIN>.assetsonar.com/custom_filters.api
            

Step 2: To apply the custom filter, specify the preferred ID in custom_filter_id, and enter it in status and filter param val for the command below. Moreover specifying assets_type is mandatory.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              -d "show_document_urls=true" \
              -d "include_custom_fields=true" \
              -d "show_image_urls=true" \
              -d "show_document_details=true" \
              -d "assets_type=stock_assets" \
              "https://<SUBDOMAIN>.assetsonar.com/stock_assets/filter.api? \
              status=custom_filter_<custom_filter_id>&filter_param_val=<custom_filter_id> \
              &page=<PAGE_NUM | DEFAULT = 1>"
            

Reserved Dates

Specify the Asset Stock # in the command below to retrieve reserved dates of the Asset Stock.

              curl  -H "token:<COMPANY_TOKEN>" -X GET \
              https://<SUBDOMAIN>.assetsonar.com/assets/<Asset Stock#>/reserved_dates.api
            

Location Based Thresholds

Specify the Asset Stock # in the command below to retrieve location specific threshold details of the Asset Stock.

curl  -H "token:<COMPANY_TOKEN>" -X GET \
    https://<SUBDOMAIN>.assetsonar.com/stock_assets/<Asset Stock#>/location_based_thresholds.api

Members


Create a Member

Specify user[email], user[first_name], user[last_name] and user[role_id]. These are mandatory fields. *user[email] is optional if login_enabled = false

  • For creating Administrator, use role_id = 1
  • For creating Staff User, use role_id = 2
  • For creating a custom role user, enter the role_id associated to the role (You can retrieve role_id via the API call for 'Retrieve Roles')

To pass custom fields, specify user[custom_attributes][custom field name] (see how to retrieve custom fields). e.g. if you have a custom field called “Manager Full Name”, then you would use “user[custom_attributes][Manager_Full_Name] = <value>

              curl  -H "token:<COMPANY_TOKEN>" -X POST \
              -d "user[email]=<EMAIL_ADDRESS>" \
              -d "user[employee_id]=<EMPLOYEE_ID>" \
              -d "user[role_id]=<ROLE_ID>" \
              -d "user[team_id]=<TEAM_ID>" \
              -d "user[user_listing_id]=<USER_LISTING_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[city]=<CITY>" \
              -d "user[state]=<STATE>" \
              -d "user[country]=<TWO_LETTER_COUNTRY_CODE>" \
              -d "user[phone_number]=<PHONE NUMBER>" \
              -d "user[fax]=<FAX>" \
              -d "user[login_enabled]=true" \
              -d "user[subscribed_to_emails]=false" \
              -d "skip_confirmation_email=true" \
              -d "user[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
              https://<SUBDOMAIN>.assetsonar.com/members.api
            

Retrieve all Members

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

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

Each page has 25 Members. Specify PAGE_NUM to access subsequent Members. This parameter is optional.


Retrieve Roles

Retrieve all roles.

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

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


Retrieve Teams

Retrieve all teams.

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

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


Retrieve details of a Member

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

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

Update Members

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 the account owner.

  • For updating Admin User, pass role_id = 1
  • For updating Staff User, pass role_id = 2
  • For updating to a custom role, enter the role_id associated to the role (You can retrieve role_id via the API call for 'Retrieve Roles')

To pass custom fields, specify user[custom_attributes][custom field name] (see how to retrieve custom fields). e.g. if you have a custom field called “Manager Full Name”, then you would use “user[custom_attributes][Manager_Full_Name] = <value>

                  curl  -H "token:<COMPANY_TOKEN>" -X PUT \
                  -d "user[email]=<EMAIL_ADDRESS>" \
                  -d "user[employee_id]=<EMPLOYEE_ID>" \
                  -d "user[role_id]=<ROLE_ID>" \
                  -d "user[team_id]=<TEAM_ID>" \
                  -d "user[user_listing_id]=<USER_LISTING_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>" \
                  -d "skip_confirmation_email=false" \
                  https://<SUBDOMAIN>.assetsonar.com/members/<USER_ID>.api
                

Activate Member

Specify the <USER_ID> in the command below to activate a Member.

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

Deactivate Member

Specify the <USER_ID> to deactivate Member. If some Items are checked out to the Member, they shall be set to a Non-login state.

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

Filters

Members can be filtered by email address, employee identification number, or status. Specify any one of these as the filter_val to retrieve the concerned member.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/members.api?page=<PAGE_NUM | DEFAULT = 1> \
                  -d "filter=email" \
                  --data-urlencode "filter_val=<EMAIL>"
                
                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/members.api?page=<PAGE_NUM | DEFAULT = 1> \
                  -d "filter=employee_identification_number" \
                  --data-urlencode "filter_val=<EMPLOYEE_IDENTIFICATION_NUMBER>"
                
                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/members.api?page=<PAGE_NUM | DEFAULT = 1> \
                  -d "filter=status" \
                  -d "filter_val=active"
                

Status options for filter_val include:

                  active, inactive, login, non_login, all
                

Each page has 25 members. Specify PAGE_NUM to access members from a particular page.


Items Checked Out To

Specify the <USER_ID> in the command below to get Items checked out to user.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "item_type=<ASSET_TYPE>" \
                  https://<SUBDOMAIN>.assetsonar.com/members/<USER_ID>/checked_out_items.api?page=<PAGE_NUM | DEFAULT = 1>
                

Retrieve Check In/Out history

Specify the USER_ID and page# in the command below.

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

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


Retrieve Check In/Out Stock History

Specify the USER_ID and page# in the command below.

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

Specify PAGE_NUM to access history after the first 25, each page having up to 25 history entries.


Retrieve Reservation Requests

Specify the USER_ID and page# in the command below.

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

Specify PAGE_NUM to access history after the first 25, each page having up to 25 entries.


Retrieve Inventory Reservation History

Specify the USER_ID and page# in the command below.

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

Specify PAGE_NUM to access history after the first 25, each page having up to 25 history entries.


Reservation Requests


Create reservation request

Specify reservation_request[from], reservation_request[to] and reservation_request[note] in the command below.

                  curl  -H "token:<COMPANY_TOKEN>" -X POST \
                  -d "reservation_request[from]=mm/dd/yyyy" \
                  -d "reservation_request[to]=mm/dd/yyyy" \
                  -d "reservation_request[note]=<COMMENTS>" \
                  -d "user[id]=<USER_ID>"
                  https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/reservation_requests.api
                

Retrieve reservation requests of an Asset

Specify Asset# in the command below.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "status=<STATUS>" \
                  -d "user_id=<USER_ID>" \
                  https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/reservation_requests.api
                

Options for status include:

        
                  pending, fullfilled, approved, denied, requested, removed, all
                

Retrieve reservation requests starting today

To retrieve all the reservation requests for Assets, Inventory, Asset Stock and Carts that are starting today, run the following command.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/checkout_requests/filter.api? \
                  all=true&start_date=mm/dd/yyyy&page=<PAGE_NUM | DEFAULT = 1>
                

Each page has 25 reservation requests. Specify PAGE_NUM to access subsequent requests.


Update status of reservation request

Specify Asset# and <RESERVATION_ID> in the command below.

                  curl  -H "token:<COMPANY_TOKEN>" -X PUT \
                  -d "request_action=<ACTION>"
                  https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/reservation_requests \
                  /<RESERVATION_ID>/update_status.api
                
Valid values for ACTION are
deny
to deny a reservation request and
approve_request
to approve a reservation request.

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], location[status] and location[description] (optional).

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

Retrieve Locations

To retrieve all Locations, run the command below.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "status=<status>" \
                  -d "include_custom_fields=true" \
                  https://<SUBDOMAIN>.assetsonar.com/locations/get_line_item_locations.api?page=<PAGE_NUM | DEFAULT = 1>
                

Options for status include:

all, active, inactive

Location Details

Specify LOCATION# in the command below to retrieve details of a location. To include location's custom fields in the result pass include_custom_fields in optional parameter

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "include_custom_fields=true" \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<LOCATION#>.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>" \
                  -d "location[parent_id]=<PARENT_LOCATION#>" \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<LOCATION#>.api
                

Activate Location

Specify <LOCATION_ID> in the command below to activate the location. To activate all child locations along with the location, pass activate_all_children_locations=1.

                  curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<LOCATION#>/activate.api
                
                  curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                  -d "activate_all_children_locations=<0/1>" \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<LOCATION#>/activate.api
                

Deactivate Location

Specify <LOCATION_ID> in the command below to deactivate specified location and its child locations.

                  curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<LOCATION#>/deactivate.api
                

Retrieve Items quantity

Specify <LOCATION_ID> in the command below to retrieve Asset/Asset Stock/Inventory stock quantity.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/locations/<Location#>/quantities_by_asset_ids.api
                

Bundles


Retrieve Bundles

To retrieve all Bundles, run the following command.

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

Each page has 25 Bundles. Specify PAGE_NUM to access subsequent Bundles. This parameter is optional.


Retrieve Bundle details

Specify Bundle# in the command below to retrieve its details.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  https://<SUBDOMAIN>.assetsonar.com/bundles/<BUNDLE#>.api
                

Filters

Filter can be applied to retrieve specified Bundle(s). Specify the filter in the following command.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "filter=<filter_value>" \
                  -d "location=<LOCATION>" \
                  -d "page=<PAGE_NUM>" \
                  "https://<SUBDOMAIN>.assetsonar.com/bundles.api?"
                

Each page has 25 Bundles. Specify PAGE_NUM to access subsequent Bundles. This parameter is optional.
For filter options like available and retired, location is not required.

Options for filter_value include:

        
                  active, retired, location, available_during
                

For example, the command for retrieving Bundle(s) available in a specified duration is:

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "filter=available_during" \
                  -d "start_date=<MM/DD/YYYY HH:MM>" \
                  -d "end_date=<MM/DD/YYYY HH:MM>" \
                  -d "page=<PAGE_NUM>" \
                  "https://<SUBDOMAIN>.assetsonar.com/bundles.api?" 
                

Create a Bundle

bundle[name] and assets are mandatory fields.

In case of Asset Stock, asset_attributes[Asset#][quantity] is a mandatory field

In case of Inventory Asset, asset_attributes[Asset#][price] and asset_attributes[Asset#][quantity] are mandatory fields

You can also specify bundle[identification_number], bundle[description] and bundle[location_id]

The command to create a Bundle is as following:

                  curl  -H "token:<COMPANY_TOKEN>" -X POST \
                  -d "bundle[name]=<bundle_name>" \
                  -d "bundle[location_id]=<location_id>"
                  -d "bundle[identification_number]=<identification_number>" \
                  -d "bundle[description]=<Description>" \
                  -d "asset_ids=<Asset#><Asset#>" \
                  -d "asset_attributes[<Asset#>][quantity]=<quantity>" \
                  -d "asset_attributes[<Asset#>][price]=<price>" \
                  "https://<SUBDOMAIN>.assetsonar.com/bundles.api"
                

Quantity is only defined for Asset Stock and both Quantity and Price for Inventory stock

For Example. Lets say we have 2 Fixed Assets with Asset# 1 and 2,

2 Stock Assets with Asset# 3 and 4 both having quantity 2,

2 Inventory Assets with Asset# 5 and 6, both having quantity 2 and price 10 and 30 respectively

The command executed will be as following:

                  curl  -H "token:<COMPANY_TOKEN>" -X POST \
                  -d "bundle[name]=<bundle_name>" \
                  -d "bundle[location_id]=<location_id>"
                  -d "bundle[identification_number]=<identification_number>" \
                  -d "bundle[description]=<Description>" \
                  -d "asset_ids=1,2,3,4,5,6" \
                  -d "asset_attributes[3][quantity]=2" \
                  -d "asset_attributes[4][quantity]=2" \
                  -d "asset_attributes[5][quantity]=2" \
                  -d "asset_attributes[5][price]=10" \
                  -d "asset_attributes[6][quantity]=2" \
                  -d "asset_attributes[6][price]=30" \
                  "https://<SUBDOMAIN>.assetsonar.com/bundles.api?"
                

Groups


Create Group

Specify group[name] in the command below. It's a mandatory field. You can also pass group[description] and to pass depreciation rate for a specific method depreciation_rates[depreciation method name](optional) (see Retrieve depreciation methods). To pass asset depreciation mode for a specified depreciation method, type

                  curl  -H "token:<COMPANY_TOKEN>" -X POST \
                  -d "group[name]=<GROUP_NAME>" \
                  -d "group[description]=<DESCRIPTION>" \
                  -d "group[asset_depreciation_mode]=<ASSET_DEPRECIATION_MODE>" \
                  -d "depreciation_rates[depreciation method name]=<DEPRECIATION_RATE>" \
                  https://<SUBDOMAIN>.assetsonar.com/groups.api
                

Enter "group[asset_depreciation_mode]=Useful Life" if you want to calculate depreciation by the useful life method, and "group[asset_depreciation_mode]=Percentage" if you want to calculate depreciation by the percentage method.

Note: The depreciation mode will be set to Useful Life in Months by default.

Retrieve Groups

To retrieve all the Groups, run the command below.

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

Each page has 25 Groups. Specify PAGE_NUM to access subsequent Groups. This parameter is optional.


Subgroups


Create Subgroups

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>" \
                  -d "sub_group[parent_id]=<PARENT_SUBGROUP_ID>"\
                  https://<SUBDOMAIN>.assetsonar.com/groups/<GROUP_ID>/sub_groups.api
                

Retrieve Subgroups

To retrieve all Subgroups, run the following command. To retrieve Subgroups of a specific Group, pass the optional parameter group_id.

                  curl  -H "token:<COMPANY_TOKEN>" -X GET \
                  -d "group_id=<GROUP_ID>" \
                  https://<SUBDOMAIN>.assetsonar.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>.assetsonar.com/groups/<GROUP_ID>/sub_groups/<SUBGROUP_ID>.api
                

Vendors


Create Vendors

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>.assetsonar.com/vendors.api
                

Retrieve Vendors

Retrieve all the Vendors using the following command. To include item custom fields in the result, pass the optional parameter include_custom_fields.

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

Each page has details of 25 Vendors. Specify PAGE_NUM to access subsequent Vendors. This parameter is optional.

Retrieve Vendors

To retrieve a Vendor, run the following command.

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

Update Vendors

To update a Vendor, run the following command.

                    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>.assetsonar.com/vendors/<VENDOR_ID>.api
                  

Labels


Retrieve All Labels

Retrieve Template ID, Description and Type through this command. Specify label[type] to view a specific type of label e.g. item labels, bundle labels.

                    curl  -H "token:<COMPANY_TOKEN>" -X GET \
                    -d "template_type=<TEMPLATE_TYPE>" \
                    https://<SUBDOMAIN>.assetsonar.com/print_label_templates.api
                  

Retrieve Item Label PDF

Retrieve link for specified item labels. Specify label[template_id] to return a specific label, otherwise the default label will be returned. To retrieve a specific set of labels, list their Asset# separated by commas e.g. asset_seq=4,9,10.

                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                    -d "asset_seq=<ASSET#>" \
                    -d "template_id=<TEMPLATE_ID>" \
                    https://<SUBDOMAIN>.assetsonar.com/qrcodes.api
                  

Retrieve Member Label PDF

Retrieve link for specified member labels. Specify label[template_id] to return a specific label, otherwise the default label will be returned. To retrieve a specific set of labels, list their Member# separated by commas e.g. member_id=4,9,10.

                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                    -d "member_id=<MEMBER#>" \
                    -d "template_id=<TEMPLATE_ID>" \
                    https://<SUBDOMAIN>.assetsonar.com/qrcode/members.api
                  

Retrieve Location Label PDF

Retrieve link for specified location labels. Specify label[template_id] to return a specific label, otherwise the default label will be returned. To retrieve a specific set of labels, list their Location# separated by commas e.g. location_id=4,9,10.

                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                    -d "location_id=<LOCATION#>" \
                    -d "template_id=<TEMPLATE_ID>" \
                    https://<SUBDOMAIN>.assetsonar.com/qrcode/locations.api
                  

Retrieve Bundle Label PDF

Retrieve link for specified bundle labels. Specify label[template_id] to return a specific label, otherwise the default label will be returned. To retrieve a specific set of labels, list their Bundle# separated by commas e.g. bundle_id= 4,9,10.

                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                    -d "bundle_id=<BUNDLE#>" \
                    -d "template_id=<TEMPLATE_ID>" \
                    https://<SUBDOMAIN>.assetsonar.com/qrcode/bundles.api
                  

Retrieve public links for specified assets. Specify list of Asset# separated by commas e.g. asset_seq=4,9,10.

                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                      -d "asset_seq=<ASSET#>" \
                      -d "page=<PAGE_NUM | DEFAULT = 1>" \
                      https://<SUBDOMAIN>.assetsonar.com/assets/get_public_links.api
                    

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


Depreciation Methods


Retrieve Depreciation Methods

Retrieve all the depreciation methods.

                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                      https://<SUBDOMAIN>.assetsonar.com/depreciation_methods.api
                    

Custom Fields


Retrieve custom fields

To retrieve all custom fields, run the following command.

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

Custom fields history

To retrieve history of an Asset's custom field, run the following command.

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

Retrieve custom fields of software license

To retrieve the custom fields, run the following command.

                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                      http://<SUBDOMAIN>.assetsonar.com/software_licenses/custom_attributes.api
                    

User Listings


Retrieve User Listings

To retrieve all User Listings, run the following command.

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

Comments


Create Comments

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>.assetsonar.com/assets/<ASSET#>/comments.api
                    

Retrieve all comments

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

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

Each page has 25 comments. Specify PAGE_NUM to access subsequent comments. This parameter is optional. The response also has the total number of pages. To retrieve all the comments of a specific User, include created_by_id in optional parameters.


Retire Reasons


Retrieve all retire reasons

To retrieve all retire reasons, run the following command.

                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                      https://<SUBDOMAIN>.assetsonar.com/retire_reasons.api
                    

Domains


Create Domains

Specify domain[name], domain[registration_date], domain[expiry_date], domain[renewal_frequency], domain[registrar_id]. These are mandatory fields.

                      curl  -H "token:<COMPANY_TOKEN>" -X POST \
                      -d "domain[name]=<NAME>" \
                      -d "domain[web_hosting_provider_id]=<WEB_HOSTING_PROVIDER_ID>" \
                      -d "domain[url]=<URL>" \
                      -d "domain[registration_date]=<REGISTRATION_DATE>" \
                      -d "domain[expiry_date]=<EXPIRY DATE>" \
                      -d "domain[cost]=<DOMAIN COST>" \
                      -d "domain[renewal_cost]=<RENEWAL COST>" \
                      -d "domain[renewal_frequency]=<RENEWAL FREQUENCY>" \
                      -d "domain[registrar_id]=<REGISTRAR_ID>" \
                      -d "domain[ip_address]=<IP_ADDRESS>" \
                      -d "domain[custodian_id]=<CUSTODIAN_ID>" \
                      -d "domain[privacy_enabled]=<PRIVACY ENABLED>" \
                      -d "domain[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
                      https://<SUBDOMAIN>.assetsonar.com/domains.api
                    

Retrieve Domains

Retrieve all the Domains using the following command. To include item custom fields in the result, pass the optional parameter include_custom_fields.

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

Each page has details of 25 Domains. Specify PAGE_NUM to access subsequent Domains. This parameter is optional.

Retrieve Domain

To retrieve a Domain, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X GET \
                        -d "include_custom_fields=true" \
                        https://<SUBDOMAIN>.assetsonar.com/domains/<DOMAIN_ID>.api
                      

Update Domains

To update a Domain, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                        -d "domain[registration_date]=<REGISTRATION_DATE>" \
                        -d "domain[expiry_date]=<EXPIRY DATE>" \
                        -d "domain[renewal_cost]=<RENEWAL COST>" \
                        -d "domain[renewal_frequency]=<RENEWAL FREQUENCY>" \
                        -d "domain[custom_attributes][CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>" \
                        https://<SUBDOMAIN>.assetsonar.com/domains/<DOMAIN_ID>.api
                      

Purchase Order

Create Purchase Order

To create a purchase order, you can specify the vendor_id like in the below command.

                        curl  -H "token:<COMPANY_TOKEN>" -X POST \
                        -d "vendor_id=<VENDOR_ID>" \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders.api
                      

Add Items to Purchase Order

To add items in the purchase order, specify seqs parameter as comma separated values of assets numbers.And for quantity of item you can specify quantity details like in the below command.

                        curl  -H "token:<COMPANY_TOKEN>" -X POST \
                        -d "seqs=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
                        -d "item_quantity[Asset#][quantity]=<QUANTITY>" \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>/add_items.api
                      

Update Purchase Order

To update purchase order, specify parameters that you want to update.

                        curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                        -d "purchase_order[identification_number]=<IDENTIFICATION_NUMBER>" \
                        -d "purchase_order[vendor_id]=<VENDOR_ID>" \
                        -d "purchase_order[delivery_location_id]=<DELIVERY_LOCATION_ID>" \
                        -d "purchase_order[approver_id]=<APPROVER_ID>" \
                        -d "purchase_order[requested_by_id]=<REQUESTED_BY_ID>" \
                        -d "purchase_order[shipment_terms]=<SHIPMENT_TERMS>" \
                        -d "purchase_order[payment_terms]=<PAYMENT_TERMS>" \
                        -d "purchase_order[description]=<DESCRIPTION>" \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>.api
                      

Confirm Purchase Order

To confirm the purchase order, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>/mark_confirm.api
                      

Receive Purchase Order Items

For now you can receive the purchase order fully (with all items). You can specify the payment details like in the below command.

                        curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                        -F "payment_details[amount]=<AMOUNT>" \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>/receive_items.api
                      

Cancel/Void Purchase Order

To cancel/void the purchase order, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>/mark_void.api
                      

Delete Purchase Order

To delete a purchase order, first you need to make the purchase order void and then run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X DELETE \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>.api
                      

Retrieve Purchase Order Details

To retrieve purchase order details, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X GET \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>.api
                      

Retrieve All Purchase Orders

To retrieve all purchase orders, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X GET \
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders.api
                      

Add Items not in Product Catalog

To add items not in product catalog, run the following command.

                        curl  -H "token:<COMPANY_TOKEN>" -X POST \
                        -d "purchase_orders_asset[name]=<Name>" \
                        -d "purchase_orders_asset[description]=<Description>" \
                        -d "purchase_orders_asset[product_model_number]=<Product_Model_Number>" \
                        -d "purchase_orders_asset[identifier]=<Identification_No>" \
                        -d "purchase_orders_asset[purchase_order_line_item_type]=<Item_Type (Asset/ AssetStock/ Inventory)>" \
                        -d "purchase_orders_asset[group_id]=<Group_ID>" \
                        -d "purchase_orders_asset[quantity]=<Quantity>" \
                        -d "purchase_orders_asset[price]=<Price_Per_Unit>" \
                        -d "purchase_orders_asset[tax_free]=true" \
                        -d "cust_attr[CUSTOM_ATTRIBUTE_NAME]=<CUSTOM_ATTRIBUTE_VALUE>"
                        https://<SUBDOMAIN>.assetsonar.com/purchase_orders/<PO#>/purchase_orders_assets.api
                      

Services


Create Service Record

Specify service[end_date], service_end_time, service_type_name, service[description], inventory_ids, linked_inventory_items[Asset#][quantity] and linked_inventory_items[Asset#][location_id]. All these are mandatory fields.

                          curl  -H "token:<COMPANY_TOKEN>" -X POST \
                          -d "service[end_date]=<Expected_Completion_Date>" \
                          -d "service_end_time=<Expected_Completion_time>" \
                          -d "service_type_name=<Service_Type>" \
                          -d "service[description]=<Description>" \
                          -d "inventory_ids=<Inventory#>,<Inventory#>" \
                          -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                          -d "linked_inventory_items[Inventory#][location_id]=LOCATION#" \   
                          http://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/services.api?create_service_ticket_only=true
                        

Put Asset in Maintenance

Specify service[end_date], service_end_time, service_type_name, service[description], inventory_ids, linked_inventory_items[Asset#][quantity] and linked_inventory_items[Asset#][location_id]. These are mandatory fields.

                            curl  -H "token:<COMPANY_TOKEN>" -X POST \
                            -d "service[end_date]=<Expected_Completion_Date>" \
                            -d "service_end_time=<Expected_Completion_time>" \
                            -d "service_type_name=<Service_Type>" \
                            -d "service[description]=<Description>" \
                            -d "inventory_ids=<Inventory#>,<Inventory#>" \
                            -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                            -d "linked_inventory_items[Inventory#][location_id]=LOCATION#" \   
                            http://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/services.api
                          

Schedule Service

Specify service[start_date], service[end_date], service[description], service_start_time, service_end_time, service_type_name. These are mandatory fields. To put item into maintenance and make it unavailable at the starting date, pass the optional parameter service[make_item_unavailable].

                              curl  -H "token:<COMPANY_TOKEN>" -X POST \
                              -d "service[make_item_unavailable]=true"
                              -d "service[end_date]=<Expected_Completion_Date>" \
                              -d "service_end_time=<Expected_Completion_time>" \
                              -d "service[start_date]=<Expected_start_Date>" \
                              -d "service_start_time=<Expected_start_time>" \
                              -d "service_type_name=<Service_Type>" \
                              -d "service[description]=<Description>" \  
                              http://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/services.api?service_type=scheduled_service
                            

Update Service

Specify service[end_date], service_end_time, inventory_ids, linked_inventory_items[Asset#][quantity] and linked_inventory_items[Asset#][location_id].

                              curl  -H "token:<COMPANY_TOKEN>" -X PUT \
                              -d "service[end_date]=<Expected_Completion_Date>" \
                              -d "service_end_time=<Expected_Completion_time>" \
                              -d "inventory_ids=<Inventory#>,<Inventory#>" \
                              -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                              -d "linked_inventory_items[Inventory#][location_id]=LOCATION#" \   
                              http://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/services/<SERVICE#>.api
                            

Complete Service

Specify service[cost], service[end_date], service_end_time, inventory_ids, linked_inventory_items[Asset#][quantity] and linked_inventory_items[Asset#][location_id].

                              curl  -H "token:<COMPANY_TOKEN>" -X PUT \
                              -d "service[cost]=<Cost>"
                              -d "service[end_date]=<Expected_Completion_Date>" \
                              -d "service_end_time=<Expected_Completion_time>" \
                              -d "inventory_ids=<Inventory#>,<Inventory#>" \
                              -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                              -d "linked_inventory_items[Inventory#][location_id]=LOCATION#" \   
                              http://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/services/<SERVICE#>.api?finish_service=true
                            

Retrive Details of Assets in Service

Retrieve all the Assets in service using the following command.

                              curl  -H "token:<COMPANY_TOKEN>" -X GET \
                              "https://<SUBDOMAIN>.assetsonar.com/assets/filter.api?for_service=true&status=assets_being_serviced&page=<PAGE_NUM | DEFAULT = 1>" 
                            

Each page has details of 25 Assets. Specify PAGE_NUM to access subsequent Assets. This parameter is optional.

Retrive Details of Assets in Service by Type

Retrieve all the Assets in service using the following command.Specify service_type, its mandatory.

                              curl  -H "token:<COMPANY_TOKEN>" -X GET \
                              -d "service_type=<Service_type_name>" \
                              "https://<SUBDOMAIN>.assetsonar.com/assets/filter.api?for_service=true&status=assets_being_serviced&page=<PAGE_NUM | DEFAULT = 1>" 
                            

Each page has details of 25 Assets. Specify PAGE_NUM to access subsequent Assets. This parameter is optional.

Retrive Details of Assets in Service by State

Retrieve all the Assets in service using the following command. Specify service_state, its mandatory.

                                curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                -d "service_state=<Service_state>" \
                                "https://<SUBDOMAIN>.assetsonar.com/assets/filter.api?for_service=true&status=assets_being_serviced&page=<PAGE_NUM | DEFAULT = 1>" 
                              

Each page has details of 25 Assets. Specify PAGE_NUM to access subsequent Assets. This parameter is optional.


Software Licenses


Create Software License

Specify software_license[name], software_license[software_name] (see how to retrieve softwares) software_license[total_seats], software_license[software_license_detail_attributes][payment_frequency], software_license[software_license_detail_attributes][start_date] are mandatory fields.

If you set software_license[software_license_detail_attributes][recur_indefinitely] to zero then software_license[software_license_detail_attributes][end_date] is mandatory field.

You can also specify software_license[identifier], software_license[location_id] (see how to retrieve locations), software_license[vendor_id] (see how to retrieve Vendors)

To Specify software_license[software_license_detail_attributes][software_category_id] (see how to retrieve all software categories)

To Specific software_license[software_versions], index will be 0,1,2,3...

software_license[software_license_detail_attributes][payment_frequency] can be day, week, month, quarterly, year or not_applicable. To pass custom fields, specify cust_attr[custom field name] (see how to retrieve custom fields).

                                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                    -d "software_license[name]=<Software_License_Name>" \
                                    -d "software_license[identifier]=<License_Identification_Number>" \
                                    -d "software_license[price]=<Total_Cost_Per_Payment>" \
                                    -d "software_license[description]=<Software_License_Description>" \
                                    -d "software_license[location_id]=<Location_ID>" \
                                    -d "software_license[vendor_id]=<Vendor_ID>" \
                                    -d "software_license[software_license_detail_attributes][payment_frequency]=<Payment_Frequency>" \
                                    -d "software_license[software_license_detail_attributes][software_category_id]=<Software_Category_ID>" \
                                    -d "software_license[software_name]=<Software_Name>" \
                                    -d "software_license[software_license_detail_attributes][license_key]=<License_Key>" \
                                    -d "software_license[software_license_detail_attributes][start_date]=<Start_Date>" \
                                    -d "software_license[software_license_detail_attributes][end_date]=<End_Date>" \
                                    -d "software_license[software_license_detail_attributes][recur_indefinitely]=<Recur_Indefinitely>" \
                                    -d "software_license[software_versions][index][version_condition]=<Version_Condition>" \
                                    -d "software_license[software_versions][index][software_version]=<Software_Version>" \
                                    -d "software_license[entitlements_criteria]=<Entitlements_Criteria>" \
                                    -d "software_license[total_seats]=<Total Seats>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses.api
                                  

Update Software License

Specify software_license_# in the command below. software_license[name] is mandatory field. To pass custom fields, specify cust_attr[custom field name] (see how to retrieve custom fields).

To Specific software_license[software_versions], index will be 0,1,2,3...

To Specify software_license[vendor_id] (see how to retrieve Vendors)

software_license[software_license_detail_attributes][payment_frequency] can be day, week, month, quarterly, year or not_applicable.

                                    curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                    -d "software_license[name]=<Software_License_Name>" \
                                    -d "software_license[description]=<Software_License_Description>" \
                                    -d "software_license[identifier]=<Software_License_Identifier>" \
                                    -d "software_license[price]=<Price>" \
                                    -d "software_license[vendor_id]=<Vendor_ID>" \
                                    -d "software_license[software_license_detail_attributes][start_date]=<Start_Date>" \
                                    -d "software_license[software_license_detail_attributes][end_date]=<End_Date>" \
                                    -d "software_license[software_license_detail_attributes][recur_indefinitely]=<Recur_Indefinitely>" \
                                    -d "software_license[software_license_detail_attributes][license_key]=<License_Key>" \
                                    -d "software_license[software_license_detail_attributes][payment_frequency]=<Payment_Frequency>" \
                                    -d "software_license[software_versions][index][version_condition]=<Version_Condition>" \
                                    -d "software_license[software_versions][index][software_version]=<Software_Version>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>.api
                                  

Reconcile Software License

Specify Software_Licence_# in the command below to reconcile the software license.

                                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/reconcile.api
                                  

Search Software License

Specify the name of the Softwar license in the 'software_license_search' parameter. To include software license custom fields in the result, pass the optional parameter include_custom_fields. Results are paginated.

                                    curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                    -d "include_custom_fields=true" \
                                    "https://<SUBDOMAIN>.assetsonar.com/software_licenses/filter.api? \
                                    status=<FILTER_OPTION>&software_license_search=<SOFTWARE_LICENSE_NAME> \
                                    &page=<PAGE_NUM | DEFAULT = 1>
                                  

Each page has 25 Software licenses. Specify PAGE_NUM to access subsequent Software licenses. This parameter is optional.

Options for status include:

                                    all overused underused expiring_in payment_due_in expired terminated active update_time entitlements_criteria approver_id software_name software_publisher software_type
                                  

Filter Software License

Filters can be applied to retrieve Filter Software License. Specify the filter_param_val and status in the following command. To include software license custom fields in the result, pass the optional parameter include_custom_fields.

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

Each page has 25 Software licenses. Specify PAGE_NUM to access subsequent Software licenses. This parameter is optional.

Options for status include:

                                    all overused underused expiring_in payment_due_in expired terminated active update_time entitlements_criteria approver_id software_name software_publisher software_type
                                  

Activate Software License

Specify software_license_# in the command below. software_license[software_license_detail][start_date] is mandatory field.

If you set software_license[software_license_detail][recur_indefinitely] to zero then software_license[software_license_detail][end_date] is mandatory field.

                                    curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                    -d "software_license[software_license_detail][start_date]=<Start_Date>" \
                                    -d "software_license[software_license_detail][end_date]=<End_Date>" \
                                    -d "software_license[software_license_detail][recur_indefinitely]=<Recur_Indefinitely>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/activate.api
                                  

Terminate Software License

Specify software_license_# in the command below.

                                    curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                    -d "software_license[software_license_details][terminate_reason]=<Terminate_Reason>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/terminate.api
                                  

Retrieve All Software Licenses

To retrieve all software licenses, run the following command. To include software license custom fields in the result, pass the optional parameter include_custom_fields.

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

Each page has 25 software licenses. Specify PAGE_NUM to access subsequent software licenses. This parameter is optional.


Software License Detail

Specify software_license_# in the command below to retrieve detail of software license. To include software license custom fields in the result, pass the optional parameter include_custom_fields.

                                    curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                    -d "include_custom_fields=true" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<Software_License_#>.api
                                  

Add Seats To Software License

Specify software_license_# in the command below. The quantity, price_per_seat and user_id (see how to retrieve Members) are mandatory fields. For vendor_id (see how to retrieve Vendors)

                                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                    -d "quantity=<Quantity>" \
                                    -d "price_per_seat=<Price>" \
                                    -d "vendor_id=<Vendor_ID>" \
                                    -d "user_id=<USER_ID>" \
                                    -d "comments=<Comments>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/add_seats.api
                                  

Remove Seats From Software License

Specify software_license_# in the command below. The quantity, price_per_seat are mandatory fields.

                                    curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                    -d "quantity=<Quantity>" \
                                    -d "price_per_seat=<Price>" \
                                    -d "comments=<Comments>" \
                                    https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/remove_seats.api
                                  

Update Existing Entitlements To Software License

Specify software_license_# in the command below. For user based software license, specify users parameter as comma separated values of user id's (see how to retrieve Members)) and for machine based or user machine based software license, specify machines parameter as comma separated values of asset id's (see how to retrieve assets)). This is a mandatory field.

                                      curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                      -d "users=<USER1_ID>,<USER2_ID>,<USER3_ID>..." \
                                      -d "machines=<ASSET1_ID>,<ASSET2_ID>,<ASSET3_ID>..." \
                                      https://<SUBDOMAIN>.assetsonar.com/software_licenses/<SOFTWARE_LICENSE_#>/add_remove_user_machine_entitlements.api
                                    

Retrieve Custom Fields

To retrieve the custom fields, run the following command.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      http://<SUBDOMAIN>.assetsonar.com/software_licenses/custom_attributes.api
                                    

Software Categories


Retrieve All Software Categories

To retrieve all software categories, run the following command.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/software_categories.api
                                    

Softwares


Create Software

Specify name of Software. This field is mandatory. You can also specify publisher, version, url, and description for the software.

                                      curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                      -d "name=<SOFTWARE_NAME>" \
                                      -d "publisher=<Publisher>" \
                                      -d "version=<Version>" \
                                      -d "software[url]=<Url>" \
                                      -d "software[description]=<Description>" \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares.api?type=<SOFTWARE_TYPE>.api
                                    

Update Software

Specify the fields which are needed to be updated. Available options are name, publisher, version, software[url], and software[description].

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      -d "name=<SOFTWARE_NAME>" \
                                      -d "publisher=<Publisher>" \
                                      -d "version=<Version>" \
                                      -d "software[url]=<Url>" \
                                      -d "software[description]=<Description>" \ 
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE#>.api
                                    

Filter Software

Softwares can be filtered by publisher, or status. Specify any one of these as the filter_val to retrieve the concerned software.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      -d "filter=publisher" \
                                      -d "filter_val=<Publisher>" \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares.api?type=<SOFTWARE_TYPE>&page=<PAGE_NUM | DEFAULT = 1>
                                    
                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      -d "filter=status" \
                                      -d "filter_val=<Status>" \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares.api?type=<SOFTWARE_TYPE>&page=<PAGE_NUM | DEFAULT = 1>
                                    

Status options for filter_val include:

ignored, blacklisted, licensed, not_licensed

Each page has 25 Softwares. Specify PAGE_NUM to access subsequent Softwares.


Search Software

Specify the name or publisher of software in search parameter to bring up all the matching records.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      -d "search=<SOFTWARE_NAME>|Publisher" \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares.api?type=<SOFTWARE_TYPE>&page=<PAGE_NUM | DEFAULT = 1>
                                    

Each page has 25 Softwares. Specify PAGE_NUM to access subsequent Softwares.


Retrieve All Softwares

To retrieve all softwares of type SOFTWARE_TYPE, run the following commmand:

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares.api?type=<SOFTWARE_TYPE>&page=<PAGE_NUM | DEFAULT = 1>
                                    

Each page has 25 Softwares. Specify PAGE_NUM to access subsequent Softwares.

Pass include_versions=true to incorporate version information in the API response. Similarly, for Installed Software, set include_installation_count=true to include the installation count, and for Cloud Software, set include_user_count=true to include the user count in the API response.


Retrieve Software Detail

To retrive software details of type SOFTWARE_TYPE, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE_ID>.api?type=<SOFTWARE_TYPE>
                                    

Blacklist Software

To blacklist a software, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE_ID>/blacklist.api
                                    

Undo Blacklist Software

To undo blacklist a software, run the follwing command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE_ID>/undo_blacklist.api
                                    

Ignore Software

To ignore a software, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE_ID>/ignore.api
                                    

Undo Ignore Software

To undo ignore a software, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      https://<SUBDOMAIN>.assetsonar.com/softwares/<SOFTWARE_ID>/undo_ignore.api
                                    

Work Order


Create Work Order

Specify task[title], task[task_type] and due_date, these are mandatory fields. Optional fields are task[task_type_id], task[priority] (e.g. high, medium, low), task[description], task[assigned_to_id], task[reviewer_id], task[cost], task[mark_items_unavailable], expected_start_date, expected_start_time, start_time, inventory_ids, linked_inventory_items[Inventory#][quantity], checklist_ids, associated_checklists[Checklist#][asset_seq_nums], associated_assets, custom_field_names and task[custom_attributes][Custom_Field_Name]. List Inventory#, Checklist#, Asset#, Checklist_Asset# and Custom_Field_Name separated by commas e.g. associated_assets=4,9,10.

If value of task[mark_items_unavailable] is not explicitly provided, this will be set to 'true' by default.

                                      curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                      -d "task[title]=<Summary>" \
                                      -d "task[description]=<Description>" \
                                      -d "task[task_type]=<Type>" \
                                      -d "task[task_type_id]=<TaskType#>" \
                                      -d "task[priority]=<Priority>" \
                                      -d "task[assigned_to_id]=<Assigned To>" \
                                      -d "task[reviewer_id]=<Reviewer>" \
                                      -d "task[mark_items_unavailable]=true" \
                                      -d "expected_start_date=<Expected_Start_Date>" \
                                      -d "expected_start_time=<Expected_Start_Time>" \
                                      -d "due_date=<Expected_Completion_Date>" \
                                      -d "start_time=<Expected_Completion_time>" \
                                      -d "base_cost=<Base Cost>" \
                                      -d "inventory_ids=<Inventory#>,<Inventory#>" \
                                      -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                                      -d "checklist_ids=<Checklist#>,<Checklist#>" \
                                      -d "associated_checklists[Checklist#][asset_seq_nums]=<Checklist_Asset#>,<Checklist_Asset#>" \
                                      -d "associated_assets=<Asset#>,<Asset#>" \
                                      -d "custom_field_names=<Custom_Field_Name>,<Custom_Field_Name>" \
                                      -d "task[custom_attributes][Custom_Field_Name]=<Custom Field Value>" \
                                      https://<SUBDOMAIN>.assetsonar.com/tasks.api
                                    

Retrieve Work Order Types

To retrieve Work Order Types, run the following command.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/task_types.api;
                                    

Get Assets in Work Orders by Type

Specify Work_Order_Type to get assets of work orders of type.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/tasks.api?task_type=<Work_Order_Type>&page=<PAGE_NUM | DEFAULT = 1>
                                    

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

Retrieve Details of Specific Work Order

To retrieve a specific work order, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/tasks/<Work_Order#>.api
                                    

Start Work Order

To start work order, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      https://<SUBDOMAIN>.assetsonar.com/tasks/<Work_Order#>/mark_in_progress.api?
                                    

End Work Order

To end work order, run the following command:

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \  
                                      https://<SUBDOMAIN>.assetsonar.com/tasks/<Work_Order#>/mark_complete.api?
                                    

Add Work Log to Work Order

Specify task_work_log[time_spent] and task_work_log[user_id], these are mandatory fields. Optional fields are task_work_log[resource_id], task_work_log[resource_type], task_work_log[description], started_on_date, started_on_time, ended_on_date and ended_on_time.

Specify task_work_log[resource_id] and task_work_log[resource_type] to add worklog against a specific component. Not passing both of these means worklog will be added to the Miscellaneous item. Task_work_log[resource_id] should contain the identifier of the specific component e.g. Asset#, Location#, and Task_work_log[resource_type] should contain a string containing the type of component worklog is being added against. Please note that for Maintenance type Work Orders, a work log can be added against only Assets and Assets included in the Cart, not on the Cart itself. Sample values for the components are below:


Type of component to add work log against Value for task_work_log[resource_id] Value for task_work_log[resource_type]
Asset Asset# Asset
Group Group# Group
Location Location# Location
Member Member# Member
Asset Stock Asset Stock# Asset Stock
Vendor Vendor# Vendor
Inventory Inventory# Inventory
Cart Cart# Cart

                                      curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                      -d "task_work_log[time_spent]=<Time_Spent>" \
                                      -d "task_work_log[description]=<Description>" \
                                      -d "task_work_log[user_id]=<Assigned_To#>" \
                                      -d "task_work_log[resource_id]=<Allocated_to_Resource#>" \
                                      -d "task_work_log[resource_type]=<Type_of_Resource#>" \
                                      -d "started_on_date=<Worked_From_Date>" \
                                      -d "started_on_time=<Worked_From_Time>" \
                                      -d "ended_on_date=<Worked_To_Date>" \   
                                      -d "ended_on_time=<Worked_To_Time>" \   
                                      https://<SUBDOMAIN>.assetsonar.com/tasks/<WORK_ORDER#>/task_work_logs.api
                                    

Add Linked Inventory to Work Order

Specify inventory_id and linked_inventory_items[Inventory#][quantity], these are mandatory fields. Optional fields are linked_inventory_items[Inventory#][location_id], linked_inventory_items[Inventory#][resource_id] and linked_inventory_items[Inventory#][resource_type].

To link inventory to a specific work order component e.g. Asset, Cart, Group, etc, specify linked_inventory_items[Inventory#][resource_id] and linked_inventory_items[Inventory#][resource_type]. linked_inventory_items[Inventory#][resource_id] should contain the identifier of the specific component and linked_inventory_items[Inventory#][resource_type] should contain a string having the component type. Please note that for Maintenance type Work Orders, an inventory can be linked against only Assets and Assets included in the Cart, not on the Cart itself. Sample is as follows:


Type of component to link inventory for Value for linked_inventory_items[Inventory#][resource_id] Value for linked_inventory_items[Inventory#][resource_type]
Asset Asset# Asset
Group Group# Group
Location Location# Location
Member Member# Member
Asset Stock Asset Stock# Asset Stock
Vendor Vendor# Vendor
Inventory Inventory# Inventory
Cart Cart# Cart

                                      curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                      -d "inventory_id=<Inventory#> \
                                      -d "linked_inventory_items[Inventory#][quantity]=Quantity" \
                                      -d "linked_inventory_items[Inventory#][location_id]=LOCATION#" \
                                      -d "linked_inventory_items[Inventory#][resource_id]=RESOURCE#" \   
                                      -d "linked_inventory_items[Inventory#][resource_type]=TYPE_OF_RESOURCE#" \   
                                      https://<SUBDOMAIN>.assetsonar.com/tasks/<WORK_ORDER#>/link_inventory.api
                                    

Retrieve Checklists

To retrieve all checklists run the following command.

                                      curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                      https://<SUBDOMAIN>.assetsonar.com/checklists/page=<PAGE_NUM | DEFAULT = 1>
                                    

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

Get Filtered Work Order

To retrieve Work Orders specify filter value i-e. complete, in_progess, review_pending or open./p>

                                        curl  -H "token:<COMPANY_TOKEN>" -X GET \
                                        https://<SUBDOMAIN>.assetsonar.com/tasks.api?filter=<FILTER_VALUE>&page=<PAGE_NUM | DEFAULT = 1>
                                      

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

Custom Roles


Update Role Item Restrictions

To update groups, provide group ids separated by commas e.g. groups=001,002,003. To update locations, provide location numbers separated by commas e.g. loctions=001,002,003. Give 'no location' to add no location e.g loctions=001,002,no location.

If all current and future nested locations of the given locations are to be added, use custom_role[include_sub_locations]=true.

Visibility options include:

full, limited_to_groups, limited_to_locations, both

For example, to change the role's items restrictions to both groups and locations, run the following command.

                                          curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                          -d "custom_role[visibility]=both" \
                                          -d "groups=<GROUP_IDS>" \
                                          -d "locations=<LOCATION_IDS>" \
                                          https://<SUBDOMAIN>.assetsonar.com/custom_roles/<Custom_Role#>.api
                                        

Update Role Team Restrictions

To update teams, you can either give team ids or team #s. For teams ids, provide team ids separated by commas e.g. team_ids=4,9,10. For team #s, provide team #s separated by commas e.g. team_nums=1,5,7. Give 'no team' to add no team e.g team_ids=4,9,no team

Users visibility options include:

full, limited_to_teams

For example, to change the role's users restrictions to teams, run the following command.

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "custom_role[users_visibility]=limited_to_teams" \
                                            -d "team_ids=<TEAM_IDS>" \
                                            https://<SUBDOMAIN>.assetsonar.com/custom_roles/<Custom_Role#>.api
                                          

Update Role Details

To update role name & description, run the following command.

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "custom_role[name]=<Name>" \
                                            -d "custom_role[description]=<Description>" \
                                            https://<SUBDOMAIN>.assetsonar.com/custom_roles/<Custom_Role#>.api
                                          

Inventory Reservations


Create Inventory Reservations

Specify inventory_reservation[from], inventory_reservation[to], inventory_reservation[quantity], inventory_reservation[price], inventory_reservation[location_number], user[id] and inventory_reservation[note] in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                            -d "inventory_reservation[from]=mm/dd/yyyy" \
                                            -d "inventory_reservation[to]=mm/dd/yyyy" \
                                            -d "inventory_reservation[quantity]=<QUANTITY>" \
                                            -d "inventory_reservation[price]=<PRICE>" \
                                            -d "inventory_reservation[note]=<COMMENTS>" \
                                            -d "inventory_reservation[location_number]=<LOCATION#>" \
                                            -d "user[id]=<USER_ID>"
                                            https://<SUBDOMAIN>.assetsonar.com/inventory/<INVENTORY#>/inventory_reservations.api
                                          

Carts


Create Cart

Specify expected_checkout_date, expected_checkout_time, due_date, start_time, create_new_cart, asset_sequence_number in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                            -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 "user[id]=<USER_ID>" \
                                            -d "create_new_cart=<true>" \
                                            -d "seqs=<ASSET_SEQUENCE_NUMBER>" \
                                            https://<SUBDOMAIN>.assetsonar.com/assets/mass_add_to_basket.api
                                          

Add Items To Cart

Specify basket_sequence_number, asset_sequence_number in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                            -d "basket_seq_num=BASKET_SEQUENCE_NUMBER" \
                                            -d "seqs=ASSET_SEQUENCE_NUMBER" \
                                            -d "volatile_assets_values[ASSET_SEQUENCE_NUMBER][quantity]=Quantity" \
                                            -d "volatile_assets_values[ASSET_SEQUENCE_NUMBER][location_id]=LOCATION#" \
                                            -d "stock_assets_values[ASSET_SEQUENCE_NUMBER][quantity]=Quantity" \
                                            -d "stock_assets_values[ASSET_SEQUENCE_NUMBER][location_id]=LOCATION#" \
                                            https://<SUBDOMAIN>.assetsonar.com/assets/mass_add_to_basket.api
                                          

Update Items Of Cart

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "volatile_assets_values[BasetAsset#][quantity]=Quantity" \
                                            -d "volatile_assets_values[BasetAsset#][location_id]=LOCATION#" \
                                            -d "stock_assets_values[BasetAsset#][quantity]=Quantity" \
                                            -d "stock_assets_values[BasetAsset#][location_id]=LOCATION#" \
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ORDER#>/update_basket_assets_attributes.api
                                          

Remove Items from Drafted or Booked Cart

Sample Params to remove a Stock asset from a cart.

items[0][item_number] = 12
items[0][quantity] = 2
items[0][location_id] = 7

To completely remove Stock from the Cart, only send item_number param. To remove specific quantity, send quantity param in hash. If Stock is added from different locations in Cart then location_id param is mandatory.
To remove an Asset, just send the item_number param.
Please note that INDEX will be incremented for every next item.

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "items[<INDEX>][item_number]=<ASSET#>" \
      -d "items[<INDEX>][quantity]=<QUANTITY_TO_REMOVE>" \
      -d "items[<INDEX>][location_id]=<LOCATION#>" \
      -d "remove_complete_bundle=TRUE|FALSE" \
      https://<SUBDOMAIN>.assetsonar.com/baskets/<ORDER#>/remove_items.api

Update Cart

Specify identification_number, location_id and description in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "basket[identification_number]=IDENTIFICATION_NUMBER" \
                                            -d "basket[location_id]=LOCATION_ID" \
                                            -d "basket[description]=DESCRIPTION;" \
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ID>/update_cart_fields.api
                                          

Retrieve Cart Details

Specify basket_id in the command below.

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

Retrieve All Carts

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

Checkin Cart

Specify checkin_values, partial_return, select_all_checkboxes, baset_sequence_num, from_checkout, billing_duration, actual_checkin_on, actual_checkin_on_time, hidden_payable_amount_text in the command below. To update a custom field, pass cust_attr[custom field name], for example "cust_attr[Item weight]=50". (see Retrieve custom fields).

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "checkin_values[comments]=COMMENTS" \
                                            -d "checkin_values[save_comments_in_transactions]=1" \
                                            -d "checkin_values[selected_assets[id]]=<ASSET_IDS>" \
                                            -d "checkin_values[location_id]=<LOCATION_ID>" \
                                            -d "checkin_values[c_attr_vals][id]=<Custom Attribute Value>" \
                                            -d "partial_return=<1>" \
                                            -d "select_all_checkboxes=<1>" \
                                            -d "baset_sequence_num=<BASKET_SEQUENCE_NUMBER#>" \
                                            -d "from_checkout=<BOOLEAN>" \
                                            -d "billing_duration=<BOOLEAN>" \
                                            -d "actual_checkin_on=<MM/DD/YYYY>" \
                                            -d "actual_checkin_on_time=<HH:MM>" \
                                            -d "hidden_payable_amount_text=<STRING>"
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ID#>/checkin_cart.api
                                          

Checkout Cart

Specify location_id, comments, save_comments_in_transactions, override_my_conflicting_reservations, till, till_time, checkout_forever_checkbox, user_id and inventory_values in the command below. To update a custom field, pass cust_attr[custom field name], for example "cust_attr[Item weight]=50". (see Retrieve custom fields).

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "checkout_values[location_id]=ID" \
                                            -d "checkout_values[comments]=COMMENTS" \
                                            -d "checkout_values[save_comments_in_transactions]=<ON>" \
                                            -d "checkout_values[override_my_conflicting_reservations]=<1>" \
                                            -d "checkout_values[c_attr_vals][id]=<Custom Attribute Value>" \
                                            -d "till=mm/dd/yyyy" \
                                            -d "till_time=hh:mm" \
                                            -d "checkout_forever_checkbox=1" \
                                            -d "user[id]=<USER_ID>"
                                            -d "inventory_values[id][quantity]=Quantity"
                                            -d "inventory_values[id][location_id]=LOCATION_ID"
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ID#>/checkout.api
                                          

Reserve Cart

It is mandatory to include the parameter 'From,To Date and Time' in your API list. Once both the parameters are listed, you have the option to leave 'From and To Time' field value empty.

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            -d "from=mm/dd/yyyy" \
                                            -d "from_time=hh:mm" \
                                            -d "to=mm/dd/yyyy" \
                                            -d "to_time=hh:mm" \
                                            -d "reservation_values[c_attr_vals][id]=<Custom Attribute Value>"
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ID#>/reservation.api
                                          

Cancel Cart Reservation

Specify cart ID in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
                                            https://<SUBDOMAIN>.assetsonar.com/baskets/<ID#>/cancel_reservation.api
                                          

Packages


Create Package

Specify package[name] and assets. These are mandatory fields.

package[description] is an optional field to give your package a description

curl  -H "token:<COMPANY_TOKEN>" -X POST \
      -d "package[name]=<name>"
      -d "package[description]=<description>" \
      -d "asset_ids=<Asset#> <Asset#>" \
      http://<SUBDOMAIN>.assetsonar.com/packages.api

Checkin Package

Specify Package ID in the command below.

actual_checkin_on, actual_checkin_on_time, checkin_values[location_id], checkin_values[comments] are optional fields.To update a custom field, pass checkin_values[c_attr_vals][custom field name], for example "checkin_values[c_attr_vals][Item weight]=50". (see Retrieve custom fields).

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "actual_checkin_on=mm/dd/yyyy"
      -d "actual_checkin_on_time=hh:mm" \
      -d "checkin_values[location_id]=<LOCATION_ID>" \
      -d "checkin_values[comments]=COMMENTS" \
      -d "checkin_values[c_attr_vals][<CUSTOM_ATTRIBUTE_NAME>]=<CUSTOM_ATTRIBUTE_VALUE>" \
      https://<SUBDOMAIN>.assetsonar.com/packages/<ID#>/checkin.api

Stock Asset Reservations


Create Stock Asset Reservations

Specify inventory_reservation[from], inventory_reservation[to], inventory_reservation[quantity], inventory_reservation[price], inventory_reservation[location_number], inventory_reservation[reserved_to_location_number], user[id] and inventory_reservation[note] in the command below.

                                            curl  -H "token:<COMPANY_TOKEN>" -X POST \
                                            -d "inventory_reservation[from]=mm/dd/yyyy" \
                                            -d "inventory_reservation[to]=mm/dd/yyyy" \
                                            -d "inventory_reservation[quantity]=<QUANTITY>" \
                                            -d "inventory_reservation[price]=<PRICE>" \
                                            -d "inventory_reservation[note]=<COMMENTS>" \
                                            -d "inventory_reservation[location_number]=<LOCATION#>" \
                                            -d "inventory_reservation[reserved_to_location_number]=<LOCATION#>" \
                                            -d "user[id]=<USER_ID>"
                                            https://<SUBDOMAIN>.assetsonar.com/stock_assets/<STOCKASSET#>/inventory_reservations.api
                                          

Personalized Demo For You

Please share your details below & let our Product Specialist get back to you