Referanse: Asset API
Referansen er generert fra API-ets egen OpenAPI-spesifikasjon ved bygging av denne siden; spesifikasjonen kan lastes ned nedenfor for bruk i egne verktøy (kodegeneratorer, Postman, Bruno og lignende). Alle endepunkter krever autentisering — se Autentisering. Basis-URL-er for test og produksjon står under API integrasjon.
Asset Listing Resource
/assets/v2/asset/{id}/listing
Creates a listing when the asset has none (201) and updates one when it does (200). Requires write:assets and publish:marketplace.
The asking price is indicative — prisantydning, not a committed sale price; the settled price is agreed as an offer in sirk-service-backend. An absent price means 'price on request', which is a valid listed state.
The listing location is the seller's chosen pickup or viewing site, separate from the asset's own location (which the public passport never discloses). Send its name and coordinates alongside the id — they are stored as a snapshot and never resolved against orgadmin. Without coordinates the listing is still valid but is absent from map- and bounds-filtered marketplace queries.
Three location cases, and the difference matters: omitting the block publishes the asset's own location; sending a block publishes exactly what it carries (the id is optional — a name and coordinates alone are a valid pickup site); and 'deleteFields': ['location'] publishes no pickup location at all, for an object whose delivery address is agreed in the offer instead. Sending 'location': null is NOT a clear — it parses the same as an omitted block and falls back to the asset's own location, so a client clearing the field must say so with deleteFields. Sending both the block and the clear is a 400. 'location' is the only clearable field.
Listing does NOT publish the Digital Product Passport and does not require publish:dpp: the two are separate publications under separate permissions.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— UpsertListingDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — ListingDto |
201 | – |
400 | – |
401 | – |
403 | – |
404 | – |
409 | – |
The reason is required and is what the event log records: WITHDRAWN writes a DELIST event, SOLD writes a SOLD event carrying the asking price and, when supplied, the settled price. There is no SOLD status — a sale is a moment, and in the good case it is an ownership transfer to another tenant, which delists automatically.
Idempotent: delisting something already unlisted succeeds and records nothing.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
reason * | query | DelistReason | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— DelistDto
Svar
| Status | Innhold |
|---|---|
204 | – |
400 | – |
401 | – |
403 | – |
/assets/v2/asset/{id}/listing/reservation
A reserved listing stays publicly visible, badged with its end date — a hold nobody can see is not a hold. The holding party is optional and may be a tenant or free text: a project reserving an object months ahead need not be an organization here.
Requires write:assets only. Placing a hold edits an offer this organization has already published; it is not a second act of publishing.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateReservationDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — ListingDto |
400 | – |
401 | – |
403 | – |
409 | – |
Returns the object to available without touching its price or location. An order-driven hold is released by the order that placed it, named through reservationRef; the owning organization may override with force=true, which the RELEASE event records. Idempotent when nothing is held.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
force | query | boolean | |
reservationRef | query | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
409 | – |
Asset Resource
/assets/v2/asset
The filters are optional and can be combined. Categories and locations are referenced by orgadmin category id (Long); pass repeated query params for multi-select (?categoryIds=42&categoryIds=87). Subtree expansion is the frontend's job — pass the full id list (see docs/V2_API_GUIDE.md §5). A list too long for a query string (~45 ids, since global class ids are ~17 characters) goes to POST /asset/search instead. With batchId, the listing (and its count) also includes members of the batch that the caller's organization deleted after they joined it, so a completed round keeps every point it had. A deleted member is listed with deleted: true and still answers 404 on GET /asset/{id}. CSV and PDF exports leave deleted members out. Assets can be exported as csv ('Accept' header 'application/octet-stream') or pdf ('Accept' header 'application/pdf'), where the pdf export will be QR codes for the assets' tags
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
batchId | query | integer (int64) | |
categoryIds | query | liste av integer (int64) | |
format | query | PdfFormat | |
locationCategoryIds | query | liste av integer (int64) | |
search | query | string | |
states | query | liste av AssetState | |
X-auth-owner | header | string | |
listingStatuses | query | liste av ListingStatus | |
pageOffset | query | integer (int32) | |
pageSize | query | integer (int32) |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av AssetBasicDtoapplication/pdf — StreamingOutputtext/csv — StreamingOutput |
401 | – |
403 | – |
Optional events are recorded against the new asset, in array order, in the same transaction as the create, under the same rules as POST /asset/{id}/events (max 10). The response echoes them as events, in order.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateAssetDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetDto |
400 | – |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— AssetMultiEditDto
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
ids * | query | liste av integer (int64) | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
/assets/v2/asset/claim/{tag}
CLAIMABLE when the tag is allocated to this organization and unclaimed; CLAIMED with its assetId when this organization claimed it; UNAVAILABLE for everything else. Every negative case answers identically on purpose — tag ids are enumerable, so distinguishing "does not exist" from "belongs to someone else" would map out which codes are live and who holds them.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
tag * | path | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — ClaimStatusDto |
401 | – |
403 | – |
Same body as POST /asset. Succeeds only when the tag is allocated to the current organization, unclaimed, and its run is not voided. With no events, the asset is created PROVISIONED and activates on first write exactly like any other, so claiming itself is not billable activity. Optional events are recorded against the new asset, in array order, in the same transaction, under the same rules as POST /asset/{id}/events (max 10); the response echoes them as events, in order. A claim carrying events ends COMMISSIONED with one ACTIVATE event and can no longer be unclaimed with DELETE /asset/claim/{tag}, which requires PROVISIONED.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
tag * | path | string | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateAssetDto
Svar
| Status | Innhold |
|---|---|
201 | – |
400 | – |
401 | – |
403 | – |
404 | – |
409 | – |
Allowed while the asset is still PROVISIONED, has no documents, and the claim is younger than the configured window. Soft-deletes the asset and returns the tag to its allocation. An ordinary DELETE /asset/{id} does not release the tag — the label is on an object by then.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
tag * | path | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
404 | – |
409 | – |
/assets/v2/asset/groups
Returns a flat list of { id, state, count } entries, where count is the number of items (the sum of quantity, so a lot of 50 counts 50), keyed by whichever of `id` and `state` `by` selects — the other is null. For `by=category` and `by=location`, `id` is the categoryId or locationCategoryId; for `by=state` the key is the AssetState name. Buckets with no matching assets are omitted, as is the unassigned (null) location bucket. `by=state` does keep its null bucket: every asset has exactly one state, so those buckets sum to the total number of matching items, and only do so with the stateless assets among them. Backend is hierarchy-blind — frontend rolls counts up against the taxonomy tree. For `by=category`, an asset tagged with N categories contributes its quantity to each of those N buckets, so the sum of counts may exceed the total matching item count. The pagination headers of GET /asset stay row counts (assets, not items). With batchId, the batch's members deleted by the caller's organization after joining it are counted, as in GET /asset.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
batchId | query | integer (int64) | |
by * | query | AssetGroupBy | |
categoryIds | query | liste av integer (int64) | |
locationCategoryIds | query | liste av integer (int64) | |
search | query | string | |
states | query | liste av AssetState | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av AssetGroupDto |
401 | – |
403 | – |
/assets/v2/asset/import
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
multipart/form-data— object
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
/assets/v2/asset/search
Identical in behaviour and response to GET /asset — including the X-page-total and X-entries-total headers — but the filter travels as JSON, so it is not limited by query-string length. Use it when the expanded id list is too large for a URL (see docs/V2_API_GUIDE.md §5); GET /asset remains the right call for ordinary filters. Subtree expansion is still the frontend's job: pass the full id list. With batchId, the batch's members deleted by the caller's organization after joining it are included, as in GET /asset (rows marked deleted: true).
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— AssetSearchRequestDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av AssetBasicDto |
400 | – |
401 | – |
403 | – |
/assets/v2/asset/stats
Counts are items (the sum of quantity), not asset rows. newAssetsPerMonth sums the current quantity of the assets activated in each month, so it is retroactive: changing a lot's quantity later moves the month it was activated in.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetStatisticsDto |
401 | – |
403 | – |
/assets/v2/asset/{id}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetDto |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— UpdateAssetDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetDto |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
/assets/v2/asset/{id}/consume
Decreases the lot {id} by quantity and records the link on both assets: a CONSUME event on the lot and an INCORPORATE event on the target (read them via GET /event). The lot and the target must both belong to the current organization (X-auth-owner), where write:assets is required; any other case gives 404. The target is not modified. When quantity equals the lot's quantity the lot is deleted as by DELETE /asset/{id} (open listing withdrawn, DELETE event with reason CONSUMED) and the response has remainingQuantity 0 and sourceDeleted true. 400 (error-message header): target is the lot, quantity below 1 or above the lot's, note over 500 characters. 409: the asset (quantity 1) is reserved, or the lot changed concurrently (retry).
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— ConsumeFromLotDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — ConsumeResultDto |
400 | – |
401 | – |
403 | – |
404 | – |
409 | – |
/assets/v2/asset/{id}/documents
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
Accept-Language | header | string | |
X-auth-owner | header | string |
Forespørselskropp *
multipart/form-data— object
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetDto |
401 | – |
403 | – |
/assets/v2/asset/{id}/documents/{documentId}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
documentId * | path | integer (int64) | |
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— UpdateDocumentDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — DocumentDto |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
documentId * | path | integer (int64) | |
id * | path | integer (int64) | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
204 | – |
401 | – |
403 | – |
/assets/v2/asset/{id}/documents/{documentId}/replace
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
documentId * | path | integer (int64) | |
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
multipart/form-data— object
Svar
| Status | Innhold |
|---|---|
200 | application/json — DocumentDto |
401 | – |
403 | – |
/assets/v2/asset/{id}/events
Adds a user-authored event (e.g. a completed service, control round or note) to the asset's activity log. Read it back via GET /event?type=ASSET&id={id}. The kind is one of AssetEventType; specifics belong in the free-text note. Optional documentIds must already be attached to this asset (POST /asset/{id}/documents). Optional occurredAt/performedBy/location describe when the thing actually happened, by whom and where -- distinct from the event's own timestamp, which is always the server clock at the moment it was recorded, never occurredAt. Optional co2eKg is kilograms of CO2 equivalent attributed to this event; must be zero or greater and finite. Optional co2eReference (max 200 characters) is an opaque caller reference identifying the calculation or record co2eKg came from, e.g. reinventar:order:123:line:2 -- never parsed, resolved or otherwise interpreted by this service. There is no separate report endpoint for the figure's supporting document: upload it via POST /asset/{id}/documents with documentType: DOCUMENT, then pass the returned document id in this event's documentIds. Optional checklist records a control point's checklist visit; requires manualType INSPECTION. Its template is validated (version 1, CHECK items only, unique keys, 1-100 items), every required template item must be answered, each item's documentIds must already be attached to this asset, and resolution is not supported here. answeredBy/answeredAt on each item are server-stamped (client values ignored); the event's result is derived as DEVIATION iff any item is DEVIATION -- a supplied result must agree. Stored verbatim as data.checklist. Requires write:assets; allowed cross-tenant wherever the asset is visible to the caller.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateAssetEventDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — EventDto |
400 | – |
401 | – |
403 | – |
Batch Resource
/assets/v2/batch
Returns a set of all batches
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
states | query | string | |
tag | query | string | |
types | query | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av BatchDto |
401 | – |
403 | – |
If 'numberOfNewAssets' is set, type is set to ASSET_CREATION and 'assetIds' is ignored
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateBatchDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — BatchDto |
400 | – |
401 | – |
403 | – |
/assets/v2/batch/tags
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
n | query | integer (int32) |
Svar
| Status | Innhold |
|---|---|
200 | text/csv — StreamingOutput |
401 | – |
403 | – |
/assets/v2/batch/{id}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — BatchDto |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— BatchMultiEditDto
Svar
| Status | Innhold |
|---|---|
204 | – |
400 | – |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— UpdateBatchDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — BatchDto |
401 | – |
403 | – |
Config Resource
/assets/v2/config/asset/states
/assets/v2/config/batch/states
/assets/v2/config/batch/types
/assets/v2/config/external
/assets/v2/config/pdf
/assets/v2/config/pdf/empty
/assets/v2/config/user/{id}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — UserPreferencesDto |
401 | – |
403 | – |
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | string |
Forespørselskropp *
application/json— UserPreferencesDto
Svar
| Status | Innhold |
|---|---|
201 | – |
400 | – |
401 | – |
403 | – |
/assets/v2/config/warranty/period
Deviation Resource
/assets/v2/deviation
The 'states' query param is a comma separated list of DeviationState (OPEN, CLOSED); 'batchGuid' filters on the originating batch (e.g. a control round); 'assetId' on the anchoring asset; 'checkKey' on the checklist check the deviation was raised from (keys are only unique within one asset's template, so combine it with 'assetId' for a per-check history).
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
assetId | query | integer (int64) | |
batchGuid | query | string | |
checkKey | query | string | |
states | query | string | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av DeviationDto |
401 | – |
403 | – |
A follow-up record for a fault found on an asset. Anchored on the asset ('assetId'); 'batchGuid' optionally references the batch (e.g. control round) it was found in. Creator and timestamp are server-derived. Optional documentIds must already be attached to the asset. Optional checkKey names the check this deviation was found from: it requires batchGuid, must match ^[a-z0-9][a-z0-9_-]{0,63}$, and must be a key of the template on the latest ASSET/MANUAL checklist visit on this asset in that batch, else 400. Fixed at creation; not settable on update. Audited via the event log (GET /event?type=DEVIATION&id={id}).
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— CreateDeviationDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — DeviationDto |
400 | – |
401 | – |
403 | – |
/assets/v2/deviation/{id}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — DeviationDto |
401 | – |
403 | – |
Enrichment of correctiveAction, dueDate and responsible. A CLOSED deviation is immutable and rejects updates with 400.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— UpdateDeviationDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — DeviationDto |
401 | – |
403 | – |
/assets/v2/deviation/{id}/close
Records the closing user id and timestamp as the auditable signature; the deviation is immutable afterwards. Closing an already CLOSED deviation is rejected with 400.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
X-auth-owner | header | string |
Forespørselskropp *
application/json— CloseDeviationDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — DeviationDto |
400 | – |
401 | – |
403 | – |
Event Resource
/assets/v2/event
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
action | query | EventAction | |
id | query | integer (int64) | |
pageOffset | query | integer (int32) | |
pageSize | query | integer (int32) | |
type | query | EventType | |
X-auth-owner | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av EventDto |
401 | – |
403 | – |
Marketplace Resource
/assets/v2/marketplace/listings
Anonymous and cross-tenant: no JWT, no X-auth-owner. Returns only listings a tenant explicitly published, excluding discarded and deleted assets and anything outside the queried channel.
Pagination follows the solutions marketplace rather than this backend's house style — pageNumber/pageSize (max 100), a flat array, and the match count in X-Total-Count — so the marketplace frontend consumes both the same way. Ordered by listedAt descending with an id tiebreak, so paging is stable.
categoryMatch=DESCENDANTS expands each global taxonomy id to its subtree server-side; an organization-specific id is always matched exactly, because it means nothing to another tenant. A bounding box needs all four coordinates, and a listing whose location carries none is absent from a bounded result. status defaults to AVAILABLE; an elapsed reservation reads as AVAILABLE whether or not the sweep has run. UNLISTED is not a queryable status.
The asking price is indicative and is per item; quantity is the number of items on offer, and a reservation or sale takes the whole lot. askingPriceMin and askingPriceMax filter on the price per item. A listing with no price is returned with a null amount ('price on request') and matches neither price bound.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
askingPriceMax | query | number | |
askingPriceMin | query | number | |
categoryIds | query | liste av integer (int64) | |
categoryMatch | query | CategoryMatch | |
channel | query | string | |
maxLatitude | query | number (double) | |
maxLongitude | query | number (double) | |
minLatitude | query | number (double) | |
minLongitude | query | number (double) | |
organizationIds | query | liste av string | |
pageNumber | query | integer (int32) | |
pageSize | query | integer (int32) | |
search | query | string | |
status | query | liste av string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av MarketplaceListingDto |
400 | – |
429 | – |
/assets/v2/marketplace/listings/{listingId}
Anonymous and cross-tenant like the list, and bounded by the same rule: only a listing a tenant published, on the queried channel, whose asset is neither discarded nor deleted.
A held object is served — its status reads RESERVED and carries the end date, never the party holding it — because the list's AVAILABLE default is a browsing convenience, not a rule about what may be read.
A listing that was withdrawn and one that never existed answer the same 404, so ids cannot be walked to discover what a tenant has not published.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
listingId * | path | integer (int64) | |
channel | query | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — MarketplaceListingDto |
400 | – |
404 | – |
429 | – |
Site Admin Asset Resource
/assets/v2/site/statistics
One entry per organization owning at least one asset, document or activation event. 'stored' is current inventory in items (the sum of quantity) regardless of range; 'handled.asset' counts activation events (one per lot) and has one zero-filled bucket per month in the range. Figures may be up to the cache TTL old — see the Cache-Control header.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
from | query | string | First month, YYYY-MM. Defaults to 12 months before the current one. |
to | query | string | Last month, YYYY-MM. Defaults to the current month. |
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av SiteStatisticsDto |
400 | – |
401 | – |
403 | – |
Site Admin Tag Resource
/assets/v2/site/tags/runs
Svar
| Status | Innhold |
|---|---|
200 | application/json — liste av TagPrintRunDto |
401 | – |
403 | – |
Creates `quantity` tags belonging to a new run, none attached to an asset and none allocated. Between 1 and 5000. Records one TAG/CREATE event for the run, not one per tag.
Forespørselskropp *
application/json— MintRunDto
Svar
| Status | Innhold |
|---|---|
201 | – |
400 | – |
401 | – |
403 | – |
/assets/v2/site/tags/runs/{id}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) | |
format | query | PdfFormat |
Svar
| Status | Innhold |
|---|---|
200 | application/pdf — StreamingOutputtext/csv — StreamingOutput |
401 | – |
403 | – |
404 | – |
/assets/v2/site/tags/runs/{id}/allocations
Give the range as fromTag+toTag or fromTag+count. Resolved run-relative in id order, never by id arithmetic. All-or-nothing on conflict; re-applying an identical allocation is a no-op, not an error. With `?dryRun=true` the range is resolved and validated exactly as a real allocation — same 400s, same 409s, same body — but nothing is written and no event is recorded, so an operator can check the resolved end code against the stack of labels in their hand before committing. The resolution is advisory: the commit re-validates, and an allocation landing in between still fails it with a 409. The flag takes `true` or `false` and nothing else — any other value is a 400, not a commit — and the answer echoes `dryRun` so a caller can tell the two apart.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) |
Forespørselskropp *
application/json— AllocateRangeDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — AllocationResultDto |
400 | – |
401 | – |
403 | – |
409 | – |
/assets/v2/site/tags/runs/{id}/allocations/release
The reversal for an allocation to the wrong organization. Same range forms as the allocation. Refused if any tag in the range has been claimed, or is allocated to a different organization than the one given. All-or-nothing.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) |
Forespørselskropp *
application/json— AllocateRangeDto
Svar
| Status | Innhold |
|---|---|
200 | application/json — AllocationResultDto |
400 | – |
401 | – |
403 | – |
409 | – |
/assets/v2/site/tags/runs/{id}/void
Unclaimed tags become unclaimable and unallocatable. Already-claimed tags are unaffected — they are on objects in use. Idempotent.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
id * | path | integer (int64) |
Svar
| Status | Innhold |
|---|---|
200 | application/json — TagPrintRunDto |
401 | – |
403 | – |
/assets/v2/site/tags/{tag}
Which run, which organization, whether claimed, whether voided — the answer to "this code doesn't work". Carries no asset content.
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
tag * | path | string |
Svar
| Status | Innhold |
|---|---|
401 | – |
403 | – |
404 | – |
Tag Resource
/assets/v2/tag/{tag}
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
tag * | path | string | |
externalSystem | query | string | |
Accept-Language | header | string |
Svar
| Status | Innhold |
|---|---|
200 | application/json — AssetDtotext/html |
Warranty Resource
/assets/v2/warranty
Parametre
| Navn | I | Type | Beskrivelse |
|---|---|---|---|
X-auth-owner | header | string |
Forespørselskropp *
application/json— GrantWarrantyDto
Svar
| Status | Innhold |
|---|---|
204 | – |
400 | – |
401 | – |
403 | – |
Skjemaer
AllocateRangeDto
Request to allocate a range of a run to one organization. Give either toTag or count, not both.
| Felt | Type | Beskrivelse |
|---|---|---|
count | integer (int32) | How many tags to take, starting at fromTag. |
fromTag * | string | First code of the range, as typed or scanned. |
organizationId * | string | Slug of the receiving organization. Shape is checked here; existence is not, because organizations live in sirk-orgadmin-backend and this service holds no registry of them. A mistyped-but-well-formed slug is reversed with POST /site/tags/runs/{id}/allocations/release. |
toTag | string | Last code of the range, inclusive. |
AllocationDto
One shipment: a slice of a run allocated to one organization.
| Felt | Type | Beskrivelse |
|---|---|---|
allocatedAt | LocalDateTime | |
count | integer (int64) | |
fromTag | string | |
organizationId | string | |
toTag | string |
AllocationResultDto
What an allocation resolved to. The resolved end code lets an operator check the result against the physical stack, which matters most for the count form where it is not known up front.
| Felt | Type | Beskrivelse |
|---|---|---|
alreadyAllocated | boolean | True when this allocation was already in place and nothing changed. Operators re-scan; that is not an error. |
count | integer (int64) | |
dryRun | boolean | True when this was a `?dryRun=true` preview and nothing was written. A client asking for a preview must check it: an unrecognised query parameter is ignored rather than rejected, so against a backend that has not shipped the flag a 200 is indistinguishable from a preview while having shipped the range for real. False on every committing path. |
fromTag | string | |
organizationId | string | |
skipped | liste av string | Codes inside the range that exist but are not part of it — they belong to another run, or to no run at all — and were skipped. Ids are near-contiguous, not contiguous. |
toTag | string |
AskingPriceDto
| Felt | Type | Beskrivelse |
|---|---|---|
amount | number | |
currency | string | |
onRequest | boolean |
AssetBasicDto
| Felt | Type | Beskrivelse |
|---|---|---|
askingPrice | AskingPriceDto | |
categoryIds | liste av integer (int64) | |
deleted | boolean | |
holder | OwnerDto | |
holderSince | LocalDateTime | |
id | integer (int64) | |
listingStatus | ListingStatus | Én av: AVAILABLE, RESERVED, UNLISTED |
locationCategoryId | integer (int64) | |
name | string | |
quantity | integer (int32) | |
state | AssetState | Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED |
tag | string | |
thumbnails | liste av DocumentDto | |
warrantyExpiration | LocalDateTime |
AssetDto
| Felt | Type | Beskrivelse |
|---|---|---|
batches | liste av BatchDto | |
categoryIds | liste av integer (int64) | |
description | string | |
documents | liste av DocumentDto | |
events | liste av EventDto | |
externalIds | liste av ExternalIdDto | |
holder | OwnerDto | |
holderSince | LocalDateTime | |
id | integer (int64) | |
listing | ListingDto | |
locationCategoryId | integer (int64) | |
name * | string | |
organization | OwnerDto | |
owner | OwnerDto | |
properties | map av string | |
publicDpp | boolean | |
quantity | integer (int32) | |
state | AssetState | Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED |
tag | string | |
thumbnails | liste av DocumentDto | |
warranty | WarrantyDto |
AssetEventResult
Én av: OK, DEVIATION
AssetEventType
Én av: INSPECTION, MAINTENANCE, REPAIR, INCIDENT, NOTE, MOVEMENT, SERVICE, PRODUCTION
AssetGroupBy
Én av: CATEGORY, LOCATION, STATE
AssetGroupDto
| Felt | Type | Beskrivelse |
|---|---|---|
count | integer (int64) | |
id | integer (int64) | |
state | string |
AssetMultiEditDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetIds * | liste av integer (int64) | |
categoryIds | liste av integer (int64) | |
deleteFields | liste av string | |
deleteFieldsSupported | boolean | |
locationCategoryId | integer (int64) | |
notMixingSetAndClear | boolean | |
publicDpp | boolean | |
recipientOrgId | string | |
state | AssetState | Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED |
stateNotProvisioned | boolean | |
transfer | boolean | |
transferExclusive | boolean |
AssetSearchRequestDto
| Felt | Type | Beskrivelse |
|---|---|---|
batchId | integer (int64) | |
categoryIds | liste av integer (int64) | |
listingStatuses | liste av ListingStatus | |
locationCategoryIds | liste av integer (int64) | |
pageOffset | integer (int32) | |
pageSize | integer (int32) | |
search | string | |
states | liste av AssetState |
AssetState
Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED
AssetStatisticsDto
| Felt | Type | Beskrivelse |
|---|---|---|
activeAssetCount | integer (int64) | |
eventCount | integer (int64) | |
eventsPerMonth * | map av integer (int64) | |
newAssetsPerMonth * | map av integer (int64) | |
organizationId * | string | |
organizationName | string |
BatchDto
| Felt | Type | Beskrivelse |
|---|---|---|
categoryIds | liste av integer (int64) | |
count | integer (int64) | |
description | string | |
guid | string | |
id | integer (int64) | |
name | string | |
owner | OwnerDto | |
properties | map av string | |
state | BatchState | Én av: PLANNED, IN_PROGRESS, COMPLETED, CANCELLED |
tag | string | |
timestamp | LocalDateTime | |
type | BatchType | Én av: ASSET_CREATION, REGISTRATION, TRANSPORT, SERVICE, COUNT, CONTROL_ROUND, OTHER |
BatchMultiEditDto
| Felt | Type | Beskrivelse |
|---|---|---|
categoryIds | liste av integer (int64) | |
deleteFields | liste av string | |
deleteFieldsSupported | boolean | |
locationCategoryId | integer (int64) | |
notMixingSetAndClear | boolean | |
state | AssetState | Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED |
stateNotProvisioned | boolean | |
valid | boolean |
BatchState
Én av: PLANNED, IN_PROGRESS, COMPLETED, CANCELLED
BatchType
Én av: ASSET_CREATION, REGISTRATION, TRANSPORT, SERVICE, COUNT, CONTROL_ROUND, OTHER
CategoryMatch
Én av: EXACT, DESCENDANTS
ChecklistItemResultDto
| Felt | Type | Beskrivelse |
|---|---|---|
answeredAt | Instant | |
answeredBy | string | |
documentIds | liste av integer (int64) | |
key | string | |
note | string | |
resolution | ChecklistResolutionDto | |
result | ChecklistOutcome | Én av: OK, DEVIATION, NOT_APPLICABLE |
ChecklistOutcome
Én av: OK, DEVIATION, NOT_APPLICABLE
ChecklistResolutionDto
object
ChecklistResponseType
Én av: CHECK
ChecklistResultDto
| Felt | Type | Beskrivelse |
|---|---|---|
items | liste av ChecklistItemResultDto | |
template | ChecklistTemplateDto | |
version * | integer (int32) |
ChecklistTemplateDto
| Felt | Type | Beskrivelse |
|---|---|---|
items | liste av ChecklistTemplateItemDto | |
version * | integer (int32) |
ChecklistTemplateItemDto
| Felt | Type | Beskrivelse |
|---|---|---|
guidance | string | |
key | string | |
required | boolean | |
responseType * | ChecklistResponseType | Én av: CHECK |
text | string |
ClaimStatus
What the current organization may do with a printed code.
Én av: CLAIMABLE, CLAIMED, UNAVAILABLE
ClaimStatusDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId | integer (int64) | |
status | ClaimStatus | What the current organization may do with a printed code. Én av: CLAIMABLE, CLAIMED, UNAVAILABLE |
tag | string |
CloseDeviationDto
| Felt | Type | Beskrivelse |
|---|---|---|
note | string |
ConsecutiveAssetsDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId * | integer (int64) | |
count | integer (int32) |
ConsumeFromLotDto
| Felt | Type | Beskrivelse |
|---|---|---|
note | string | |
quantity * | integer (int32) | |
targetAssetId * | integer (int64) |
ConsumeResultDto
| Felt | Type | Beskrivelse |
|---|---|---|
remainingQuantity | integer (int32) | |
sourceAssetId | integer (int64) | |
sourceDeleted | boolean | |
targetAssetId | integer (int64) |
CreateAssetDto
| Felt | Type | Beskrivelse |
|---|---|---|
batches | liste av integer (int64) | |
categoryIds | liste av integer (int64) | |
description | string | |
events | liste av CreateAssetEventDto | |
externalIds | liste av ExternalIdDto | |
locationCategoryId | integer (int64) | |
name | string | |
properties | map av string | |
publicDpp | boolean | |
quantity | integer (int32) |
CreateAssetEventDto
| Felt | Type | Beskrivelse |
|---|---|---|
batchGuid | string | |
checklist | ChecklistResultDto | |
co2eKg | number (double) | |
co2eReference | string | |
documentIds | liste av integer (int64) | |
location | string | |
manualType * | AssetEventType | Én av: INSPECTION, MAINTENANCE, REPAIR, INCIDENT, NOTE, MOVEMENT, SERVICE, PRODUCTION |
note | string | |
occurredAt | LocalDateTime | |
performedBy | string | |
result | AssetEventResult | Én av: OK, DEVIATION |
CreateBatchDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetIds | liste av integer (int64) | |
categoryIds | liste av integer (int64) | |
consecutiveAssetIds | ConsecutiveAssetsDto | |
description | string | |
guid | string | |
initialCount | integer (int64) | |
locationCategoryId | integer (int64) | |
name | string | |
numberOfNewAssets | integer (int32) | |
properties | map av string | |
state | BatchState | Én av: PLANNED, IN_PROGRESS, COMPLETED, CANCELLED |
type | BatchType | Én av: ASSET_CREATION, REGISTRATION, TRANSPORT, SERVICE, COUNT, CONTROL_ROUND, OTHER |
CreateDeviationDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId * | integer (int64) | |
batchGuid | string | |
checkKey | string | |
description * | string | |
documentIds | liste av integer (int64) |
CreateReservationDto
| Felt | Type | Beskrivelse |
|---|---|---|
forLabel | string | |
forOrganizationId | string | |
from * | LocalDateTime | |
reservationRef | string | |
until * | LocalDateTime |
DelistDto
| Felt | Type | Beskrivelse |
|---|---|---|
settledPrice | AskingPriceDto |
DelistReason
Én av: WITHDRAWN, SOLD
DeviationDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId | integer (int64) | |
assetName | string | |
batchGuid | string | |
batchName | string | |
checkKey | string | |
closeNote | string | |
closedAt | LocalDateTime | |
closedBy | string | |
correctiveAction | string | |
createdAt | LocalDateTime | |
createdBy | string | |
description | string | |
documentIds | liste av integer (int64) | |
dueDate | LocalDate | |
id | integer (int64) | |
responsible | string | |
state | DeviationState | Én av: OPEN, CLOSED |
DeviationState
Én av: OPEN, CLOSED
DocumentDto
| Felt | Type | Beskrivelse |
|---|---|---|
documentType | DocumentType | Én av: IMAGE, DOCUMENT, LINK, OTHER |
id | integer (int64) | |
isPublic | boolean | |
url | string |
DocumentType
Én av: IMAGE, DOCUMENT, LINK, OTHER
EventAction
Én av: CREATE, ACTIVATE, UPDATE, APPROVE, START, COMPLETE, WARRANTY, SERVICE, DELETE, REQUEST, TRANSFER, MANUAL, ALLOCATE, UNALLOCATE, CLAIM, UNCLAIM, VOID, LIST, DELIST, RESERVE, RELEASE, SOLD, CONSUME, INCORPORATE
EventDto
| Felt | Type | Beskrivelse |
|---|---|---|
action | EventAction | Én av: CREATE, ACTIVATE, UPDATE, APPROVE, START, COMPLETE, WARRANTY, SERVICE, DELETE, REQUEST, TRANSFER, MANUAL, ALLOCATE, UNALLOCATE, CLAIM, UNCLAIM, VOID, LIST, DELIST, RESERVE, RELEASE, SOLD, CONSUME, INCORPORATE |
id | integer (int64) | |
properties | map av string | |
timestamp | LocalDateTime | |
type | EventType | Én av: ASSET, BATCH, ORDER, LOCATION, USER, DEVIATION, TAG |
user | string |
EventType
Én av: ASSET, BATCH, ORDER, LOCATION, USER, DEVIATION, TAG
ExternalIdDto
| Felt | Type | Beskrivelse |
|---|---|---|
id * | string | |
systemName * | string | |
urlStringFormat | string |
GeoJsonPoint
| Felt | Type | Beskrivelse |
|---|---|---|
coordinates | liste av number (double) | |
type | string |
GrantWarrantyDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId | integer (int64) | |
batchId | integer (int64) | |
duration * | WarrantyPeriod | Én av: ONE_YEAR, TWO_YEARS, THREE_YEARS, FOUR_YEARS, FIVE_YEARS, TEN_YEARS |
granted | LocalDateTime |
Instant
string (date-time)
Language
Én av: ENGLISH, NORWEGIAN
ListingDto
| Felt | Type | Beskrivelse |
|---|---|---|
askingPrice | AskingPriceDto | |
channels | liste av string | |
id | integer (int64) | |
listedAt | LocalDateTime | |
location | ListingLocationDto | |
reservation | ReservationDto | |
status | ListingStatus | Én av: AVAILABLE, RESERVED, UNLISTED |
updatedAt | LocalDateTime |
ListingLocationDto
| Felt | Type | Beskrivelse |
|---|---|---|
categoryId | integer (int64) | |
latitude | number (double) | |
longitude | number (double) | |
name | string |
ListingStatus
Én av: AVAILABLE, RESERVED, UNLISTED
LocalDate
string (date)
LocalDateTime
string (date-time)
MarketplaceListingDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetId | integer (int64) | |
categoryIds | liste av integer (int64) | |
description | string | |
images | liste av string | |
listedAt | LocalDateTime | |
listingId | integer (int64) | |
location | MarketplaceLocationDto | |
name | string | |
organizationId | string | |
organizationName | string | |
passportUrl | string | |
price | AskingPriceDto | |
properties | map av string | |
quantity | integer (int32) | |
reservedUntil | LocalDateTime | |
status | ListingStatus | Én av: AVAILABLE, RESERVED, UNLISTED |
tag | string | |
thumbnails | liste av string |
MarketplaceLocationDto
| Felt | Type | Beskrivelse |
|---|---|---|
categoryId | integer (int64) | |
name | string | |
point | GeoJsonPoint |
MintRunDto
Request to mint a new print run.
| Felt | Type | Beskrivelse |
|---|---|---|
name | string | Operator-facing name for the run, e.g. "Autumn 2026 stock". |
notes | string | |
quantity | integer (int32) | How many tags to mint. Between 1 and 5000 inclusive. |
MonthRange
Inclusive YYYY-MM month window
OwnerDto
| Felt | Type | Beskrivelse |
|---|---|---|
id | string | |
name | string |
PdfFormat
Én av: A4_3X8_66MM, A4_3X8_70MM, A4_2X5_80MM, STRIP_1X1_40MM, A4_5X8_30MM, A4_5X8_30MM_CLEAN
ReservationDto
| Felt | Type | Beskrivelse |
|---|---|---|
forLabel | string | |
forOrganizationId | string | |
from | LocalDateTime | |
reservationRef | string | |
source | ReservationSource | Én av: MANUAL, ORDER |
until | LocalDateTime |
ReservationSource
Én av: MANUAL, ORDER
SiteStatisticsDto
Usage statistics for one organization
| Felt | Type | Beskrivelse |
|---|---|---|
handled | map av map av integer (int64) | Objects handled per calendar month (UTC), by object type |
organizationId | string | Organization slug |
stored | map av integer (int64) | Current inventory counts by object type |
StreamingOutput
object
TagLookupDto
Where a single code lives. Support-facing; carries no asset content.
| Felt | Type | Beskrivelse |
|---|---|---|
allocatedAt | LocalDateTime | |
allocatedOrg | string | |
belongsToPrintRun | boolean | False for a tag created by asset or batch creation. |
claimed | boolean | |
claimedAt | LocalDateTime | |
printRunId | integer (int64) | |
printRunName | string | |
runVoided | boolean | |
tag | string |
TagPrintRunDto
A print run with its current counts.
| Felt | Type | Beskrivelse |
|---|---|---|
allocated | integer (int64) | Tags shipped to an organization. Includes the claimed ones. |
allocations | liste av AllocationDto | |
claimed | integer (int64) | |
createdAt | LocalDateTime | |
createdBy | string | |
firstTag | string | First code of the run in printed order; null for an empty run. |
id | integer (int64) | |
lastTag | string | |
name | string | |
notes | string | |
quantity | integer (int32) | |
total | integer (int64) | Tag rows actually in the run. Equals quantity unless a mint was interrupted. |
unallocated | integer (int64) | Tags not yet shipped to any organization. |
voided | boolean | |
voidedAt | LocalDateTime |
UpdateAssetDto
| Felt | Type | Beskrivelse |
|---|---|---|
addBatches | liste av integer (int64) | |
batches | liste av integer (int64) | |
batchesUnambiguous | boolean | |
categoryIds | liste av integer (int64) | |
deleteFields | liste av string | |
description | string | |
documentIds | liste av integer (int64) | |
events | liste av CreateAssetEventDto | |
externalIds | liste av ExternalIdDto | |
holderLabel | string | |
holderOrg | string | |
holderSince | LocalDateTime | |
locationCategoryId | integer (int64) | |
name | string | |
ownerLabel | string | |
ownerOrg | string | |
properties | map av string | |
publicDpp | boolean | |
quantity | integer (int32) | |
quantityReason | string | |
state | AssetState | Én av: PROVISIONED, COMMISSIONED, STORED, SERVICE, TRANSPORT, DISCARDED |
stateNotProvisioned | boolean |
UpdateBatchDto
| Felt | Type | Beskrivelse |
|---|---|---|
assetIds | liste av integer (int64) | |
categoryIds | liste av integer (int64) | |
count | integer (int64) | |
deleteFields | liste av string | |
description | string | |
guid | string | |
locationCategoryId | integer (int64) | |
name | string | |
state | BatchState | Én av: PLANNED, IN_PROGRESS, COMPLETED, CANCELLED |
type | BatchType | Én av: ASSET_CREATION, REGISTRATION, TRANSPORT, SERVICE, COUNT, CONTROL_ROUND, OTHER |
UpdateDeviationDto
| Felt | Type | Beskrivelse |
|---|---|---|
correctiveAction | string | |
dueDate | LocalDate | |
responsible | string |
UpdateDocumentDto
| Felt | Type | Beskrivelse |
|---|---|---|
isPublic * | boolean |
UpsertListingDto
| Felt | Type | Beskrivelse |
|---|---|---|
askingPrice | AskingPriceDto | |
channels | liste av string | |
deleteFields | liste av string | |
deleteFieldsSupported | boolean | |
location | ListingLocationDto | |
notMixingSetAndClear | boolean |
UserPreferencesDto
| Felt | Type | Beskrivelse |
|---|---|---|
language | Language | Én av: ENGLISH, NORWEGIAN |
WarrantyDto
| Felt | Type | Beskrivelse |
|---|---|---|
expiration | LocalDateTime | |
granted | LocalDateTime | |
grantedByOrganization | string | |
grantedByUserId | string | |
id | integer (int64) |
WarrantyPeriod
Én av: ONE_YEAR, TWO_YEARS, THREE_YEARS, FOUR_YEARS, FIVE_YEARS, TEN_YEARS
YearMonth
| Felt | Type | Beskrivelse |
|---|---|---|
leapYear | boolean | |
month | integer (int32) | |
monthValue | integer (int32) | |
prolepticMonth | integer (int64) | |
year | integer (int32) |