Assets
To create or manage serial number sequences for assets, see Sequences.
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 integer
Time in epoch seconds at which the warranty expires |
| is_warranty_valid boolean
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 integer
Time in epoch seconds for the next scheduled maintenance of the asset |
| disposed_at integer
Time in epoch seconds when the asset was disposed |
| disposal_reason_code string
Reason code for asset disposal |
| disposal_comment string
Additional comments for disposal |
| purchased_at integer
Time in epoch seconds at which the asset was purchased |
| initial_value number
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
An optional manifest ID to associate with the asset |
| manufacturer_number string
The manufacturer's part or model number |
| contact_id string
The ID of a contact to assign to the asset (alias for assignee) |
| vendor string
The vendor or supplier of the asset |
| origin_country string
The country of origin of the asset |
| images object
An object with add and/or remove arrays of image URL strings for managing asset images |
| linked_documents object
An object with add and/or remove arrays for managing associated documents (types: warranty_card, user_manual, invoice, transfer_order, POD, asset_request, other) |
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
Note:
updated_atandupdated_byare system-managed fields and cannot be set directly.
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.