Assets
API endpoints for assets
List assets
GET /api/v1/assets
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | query | string | No | Organization scope id. Omit for token default; pass an empty value for personal scope where supported. |
scoutId | query | string | No | — |
projectId | query | string | No | — |
spaceId | query | string | No | — |
labelId | query | string | No | — |
include | query | string | No | Comma-separated relation names to hydrate, or all. |
limit | query | integer | No | Maximum number of items to return. |
offset | query | integer | No | Number of items to skip. |
search | query | string | No | Case-insensitive search across scalar fields. |
filter | query | string | No | Server-side exact filters as comma-separated field=value pairs. |
sort | query | string | No | Comma-separated sort fields. Prefix with - or suffix :desc for descending order. |
cursor | query | string | No | Cursor returned by a previous cursor-mode list response. |
pageMode | query | string (offset, cursor) | No | Set 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Convex document id |
include | query | string | No | Comma-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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Convex 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Convex 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
assetId | path | string | Yes | — |
limit | query | integer | No | Maximum number of items to return. |
offset | query | integer | No | Number of items to skip. |
search | query | string | No | Case-insensitive search across scalar fields. |
filter | query | string | No | Server-side exact filters as comma-separated field=value pairs. |
sort | query | string | No | Comma-separated sort fields. Prefix with - or suffix :desc for descending order. |
cursor | query | string | No | Cursor returned by a previous cursor-mode list response. |
pageMode | query | string (offset, cursor) | No | Set 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
assetId | path | string | Yes | — |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
assetId | path | string | Yes | — |
noteId | path | string | Yes | — |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
assetId | path | string | Yes | — |
noteId | path | string | Yes | — |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
assetId | path | string | Yes | — |
noteId | path | string | Yes | — |
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 }
All rights reserved.