Asset movements

Manage the movement of assets using the API. Retrieve a list of all asset movements, view a specific movement, and update an movement.

Learn more about assets in the OnLocation Help Center.

List asset movements

Returns a list of asset movements.

Request
query Parameters
q
string <string>

Filter by any asset movement value.

Example: q=asset_id:1,assigned_staff_id:2,assigned_type:staff
limit
integer <int32>

Limits the amount of records to return (maxiumum 5000).

Example: limit=10
Responses
200

List of asset movements

400

Invalid Input

403

Access denied to this resource

404

Resource not found

get/assetmovement
Request samples
curl -i -X GET \
  'https://api.whosonlocation.com/v1/assetmovement?q=string&limit=0'
Response samples
[
  • {
    }
]

Get asset movement by ID

Returns a single asset movement.

Request
path Parameters
id
required
integer <int32>

ID of the asset movement to return

Responses
200

Asset movement data

403

Access denied to this resource

404

Asset movement not found

get/assetmovement/{id}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/assetmovement/:id
Response samples
{
  • "asset_id": 1,
  • "assigned_type": "staff",
  • "assigned_staff_id": 1,
  • "assigned_spm_id": 1,
  • "assigned_visitor_id": 1,
  • "signed_out": "2023-04-18 13:15:00",
  • "signed_in": "2023-04-18 13:15:00",
  • "dueback": "2023-05-01 13:15:07",
  • "notes": "Notes about the asset movement",
  • "issued_out": "10008",
  • "issued_in": "20008"
}

Update an asset movement

Updates the details of an asset movement.

Request
path Parameters
id
required
integer <int32>

ID of the asset movement to update

Request Body schema: application/json

Information used to update the asset movement record

assigned_type
string <string>

Type of the entity to whom the asset is being assigned

Enum: "staff" "spm" "visitor"
assigned_staff_id
integer <int32>

ID of the staff to whom the asset is being assigned, should only be set if assigned_type is 'staff'

assigned_spm_id
integer <int32>

ID of the contractor member to whom the asset is being assigned, should only be set if assigned_type is 'spm'

assigned_visitor_id
integer <int32>

ID of the visitor to whom the asset is being assigned, should only be set if assigned_type is 'visitor'

dueback
string <date-time>

Dueback date for the asset

Responses
200

Updated resource

400

Invalid Input

403

Access denied to this resource

404

Resource not found

500

Internal server error

put/assetmovement/{id}
Request samples
application/json
{
  • "assigned_type": "staff",
  • "assigned_staff_id": 1,
  • "assigned_spm_id": 1,
  • "assigned_visitor_id": 1,
  • "dueback": "2023-05-01 13:10:00"
}
Response samples
{
  • "asset_id": 1,
  • "assigned_type": "staff",
  • "assigned_staff_id": 1,
  • "assigned_spm_id": 1,
  • "assigned_visitor_id": 1,
  • "signed_out": "2023-04-18 13:15:00",
  • "signed_in": "2023-04-18 13:15:00",
  • "dueback": "2023-05-01 13:15:07",
  • "notes": "Notes about the asset movement",
  • "issued_out": "10008",
  • "issued_in": "20008"
}