Assets
Create Asset Serial Number Sequence
Creating serial number sequences for assets requires two parameters; prefix
, and sequence
, a combination of which must be unique. By default the resource
is set to asset
.
A sequence cannot be updated, however different serial number sequences for the same resource
can share either the prefix or the sequence. For example, "PX-AST" prefix can have "ABCD" and "DEF" sequences. Likewise, "PX-ASSETT" can also have the "DEF" sequence. Likewise same serial number sequences can exist for different resources, however, a sequence created for a resource cannot be used for a different resource.
Creating a sequence with an existing prefix
and sequence
for the same resource
will return the existing sequence with the message "Existing sequence returned".
Create & Update Asset
Create Asset
The only properties you need to create an asset is the item_id
, location_id
, and layout_id
, which identify the item being converted to the asset and the location and layout where it will be placed. However, we recommend adding some more properties to the asset.
| sequence_id string
This field is required if the asset serial number is to be assigned from an predefined sequence. Either ther serial_number
or sequence_id
should be passed |
| currency string
The currency in which the value is defined, for example 'USD' |
| barcode string
The barcode of the asset |
| category string
Category of the asset, for example, Electronics |
| sub_category string
The subcategory within the asset's category, for example, Smart Phone |
| warranty_expires_at Date
The date at which the warranty expires |
| is_warranty_valid string
A flag indicating whether the warranty is valid or not |
| maintenance_schedule string
How often must the maintenance be performed on the asset. Can be daily
, weekly
, monthly
, quarterly
, or yearly
|
| options object
Options for asset, currently supports is_prefix
flag, which determines whether the provided serial number is used as is, or if it is treated as a prefix for serial numbers. If set to true
, sequence_id
must not be null. Defaults to false
|
| next_maintenance_at Date
Next scheduled maintenance of the asset |
| disposal_date string
When was the asset disposed off |
| disposal_reason_code string
Reason code for asset disposal |
| disposal_comment string
Additional comments for disposal |
| purchased_at string
The date at which the asset was purchased |
| initial_value string
The initial value of the asset before any appreciation or depreciation is applied |
| maintenance_status string
The current maintenance status of the asset. Can be good
, upcoming
, required
, ongoing
|
| manifest_id string
The subcategory within the asset's category, for example, Smart Phone |
| linked_documents string
Any documents (like warranty_card
, user_manual
, invoice
, transfer_order
, POD
, asset_request
, other
) associated to the asset |
To create an asset with a user defined serial number, pass the serial_number
in the request body. However, if the serial number already exists in the database, the API will throw an error.
To use a predefined sequence for generating the asset serial number, pass the sequence_id
instead
As sequences are finite length they may get exhausted. For example, if the user defines the sequence as 1
for a prefix PX-AST
, the user will be able to create 9 assets before the sequence is exhausted. Likewise, if the user defines a sequence as 01
, and another one as 10
, the user will be able to create 10 assets for the first serial number before collisions start to occur.
Update Asset
Most of the asset properties can be updated, including
Likewise, linked documents can be added or removed as follows
The objects containing id
in add
will be updated and the ones without the id
will be created. The document ids pased in remove
will be deleted. Overall, an update request may look as follows
Bulk Serialize Asset Items
Assets can be bulk created and serialized against items that are marked as assets. For instance, if you have 10 asset items at a location A
on a layout B
, and you want to generate serial numbers for two of them and move them to layout C
, the request will look like this
sequence_id
is required for bulk serialization. If the source and destination layouts are same, destination layout can be omitted from the body.
If the assets are being procured from external sources, and any existing item quantities are not to be turned into assets, source layout ID can be omitted. In this case, the user must pass an options object containing check_inventory
set to false. Destination layout, however, is required in this case.