Open App

Assets

API endpoints for assets

List assets

GET /api/v1/assets

Parameters

NameInTypeRequiredDescription
organizationIdquerystringNoOrganization scope id. Omit for token default; pass an empty value for personal scope where supported.
scoutIdquerystringNo
projectIdquerystringNo
spaceIdquerystringNo
labelIdquerystringNo
includequerystringNoComma-separated relation names to hydrate, or all.
limitqueryintegerNoMaximum number of items to return.
offsetqueryintegerNoNumber of items to skip.
searchquerystringNoCase-insensitive search across scalar fields.
filterquerystringNoServer-side exact filters as comma-separated field=value pairs.
sortquerystringNoComma-separated sort fields. Prefix with - or suffix :desc for descending order.
cursorquerystringNoCursor returned by a previous cursor-mode list response.
pageModequerystring (offset, cursor)NoSet to cursor to return {items,nextCursor,hasMore} inside the response data.

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/assets?organizationId=<organizationId>&scoutId=<scoutId>&projectId=<projectId>&spaceId=<spaceId>&labelId=<labelId>&include=<include>&limit=<limit>&offset=<offset>&search=<search>&filter=<filter>&sort=<sort>&cursor=<cursor>&pageMode=<pageMode>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "scoutId": "string",
      "categoryId": "string",
      "cost": 0
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: Asset[] }


Create asset

POST /api/v1/assets

Example request

curl -X POST \
"https://api.getpilfer.com/api/v1/assets" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","organizationId":"string","scoutId":"string","categoryId":"string","heroImage":"string","condition":0,"satisfaction":0,"usage":0,"friction":0,"lifetimeValue":0,"acquisitionDate":0,"cost":0}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "name": "string",
    "scoutId": "string",
    "categoryId": "string",
    "cost": 0
  }
}

Other statuses: 400, 401, 403.

Response body type

{ data: Asset }


Get asset

GET /api/v1/assets/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id
includequerystringNoComma-separated relation names to hydrate, or all.

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/assets/<id>?include=<include>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "scoutId": "string",
    "categoryId": "string",
    "cost": 0
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Asset }


Update asset

PATCH /api/v1/assets/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X PATCH \
"https://api.getpilfer.com/api/v1/assets/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","scoutId":"string","categoryId":"string","heroImage":"string","condition":0,"satisfaction":0,"usage":0,"friction":0,"lifetimeValue":0,"acquisitionDate":0,"cost":0}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "scoutId": "string",
    "categoryId": "string",
    "cost": 0
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: Asset }


Delete asset

DELETE /api/v1/assets/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X DELETE \
"https://api.getpilfer.com/api/v1/assets/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {}
}

Other statuses: 401, 403, 404.

Response body type

{ data: DeleteResult }


List maintenance notes for an asset

GET /api/v1/assets/{assetId}/maintenance-notes

Parameters

NameInTypeRequiredDescription
assetIdpathstringYes
limitqueryintegerNoMaximum number of items to return.
offsetqueryintegerNoNumber of items to skip.
searchquerystringNoCase-insensitive search across scalar fields.
filterquerystringNoServer-side exact filters as comma-separated field=value pairs.
sortquerystringNoComma-separated sort fields. Prefix with - or suffix :desc for descending order.
cursorquerystringNoCursor returned by a previous cursor-mode list response.
pageModequerystring (offset, cursor)NoSet to cursor to return {items,nextCursor,hasMore} inside the response data.

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/assets/<assetId>/maintenance-notes?limit=<limit>&offset=<offset>&search=<search>&filter=<filter>&sort=<sort>&cursor=<cursor>&pageMode=<pageMode>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "assetId": "string",
      "title": "string",
      "date": 0,
      "status": "open"
    }
  ]
}

Other statuses: 401, 403, 404.

Response body type

{ data: MaintenanceNote[] }


Create maintenance note on an asset

POST /api/v1/assets/{assetId}/maintenance-notes

Parameters

NameInTypeRequiredDescription
assetIdpathstringYes

Example request

curl -X POST \
"https://api.getpilfer.com/api/v1/assets/<assetId>/maintenance-notes" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"title":"string","date":0,"status":"open"}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "assetId": "string",
    "title": "string",
    "date": 0,
    "status": "open"
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: MaintenanceNote }


Get maintenance note

GET /api/v1/assets/{assetId}/maintenance-notes/{noteId}

Parameters

NameInTypeRequiredDescription
assetIdpathstringYes
noteIdpathstringYes

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/assets/<assetId>/maintenance-notes/<noteId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "assetId": "string",
    "title": "string",
    "date": 0,
    "status": "open"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: MaintenanceNote }


Update maintenance note

PATCH /api/v1/assets/{assetId}/maintenance-notes/{noteId}

Parameters

NameInTypeRequiredDescription
assetIdpathstringYes
noteIdpathstringYes

Example request

curl -X PATCH \
"https://api.getpilfer.com/api/v1/assets/<assetId>/maintenance-notes/<noteId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"title":"string","date":0,"status":"open"}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "assetId": "string",
    "title": "string",
    "date": 0,
    "status": "open"
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: MaintenanceNote }


Delete maintenance note

DELETE /api/v1/assets/{assetId}/maintenance-notes/{noteId}

Parameters

NameInTypeRequiredDescription
assetIdpathstringYes
noteIdpathstringYes

Example request

curl -X DELETE \
"https://api.getpilfer.com/api/v1/assets/<assetId>/maintenance-notes/<noteId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {}
}

Other statuses: 401, 403, 404.

Response body type

{ data: DeleteResult }