Visena Documentation
Partner API

Resource

Activity

Tasks and appointments on a project — the records behind origo's «Aktiviteter» screen. Full CRUD; the delete closes the activity by default and can be asked to remove it permanently.

An activity is one unit of work on a project: a name and a free-text description, a responsible person, a status, a due date, hour estimates, and the type, priority, severity and resolution classifications the project's template offers. Every activity belongs to exactly one project — projectId is required both when you create one and when you replace one. Note what the shape does not carry: there is no start or end time, and no field for time actually spent. estimate and etc (estimate to complete) are forward-looking hour figures and dueDate is a plain local date, so an activity is the task or appointment record itself rather than a time entry.

Status is not writable through any endpoint on this page: a new activity starts at its project's default status, and neither the replace body nor the merge patch can move it.

The endpoint reference below is kept in English in both language trees. It mirrors the API contract verbatim and there is no generator to rebuild it from, so a translated copy would drift from the API the first time an endpoint changes.

Endpoints

Eight endpoints, in the order they are documented below.

Every endpoint on this page can additionally answer the shared errors — 401, 403, 404 (unknown instance) and 500. They are documented once, under Errors and troubleshooting.

Create an activity

POST /{instanceName}/api/v1/{locale}/activity

Creates an activity on a project and returns the full entity. The activity starts at its project's default status — status is not writable here. 201 with a Location header.

Request body

application/jsonActivityCreateDto

Responses

Status Description
201 Activity created.
ActivityResponseDto · application/json
400 Request body failed validation (name or projectId missing).
422 A referenced entity (project, phase, responsible person) does not exist, or a classification ref is not available on the project's template.

Example

curl
curl -X POST "https://api.visena.example/acme/api/v1/en/activity" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Kickoff meeting",
    "projectId": "pJ7wN2",
    "dueDate": "2026-09-15"
  }'

Get an activity

GET /{instanceName}/api/v1/{locale}/activity/{activityId}

Returns the full entity. 404 if unknown; 400 if the id cannot be unmasked.

Parameters

Parameter In Type Description
activityId required path string Masked activity id.

Responses

Status Description
200 The activity.
ActivityResponseDto · application/json
400 The id is not a valid id.
404 No activity with that id.

Example

curl
curl "https://api.visena.example/acme/api/v1/en/activity/aT4cV9" \
  -H "Authorization: Bearer $TOKEN"

List activities

GET /{instanceName}/api/v1/{locale}/activity

Offset-paginated list with a real total. Filter by project, company, responsible person, status, open/closed, free-text query and a due-date upper bound; sort by created, modified, name or dueDate.

Parameters

Parameter In Type Description
offset query integer
default 0
Zero-based item offset.
limit query integer Maximum items to return per page.
projectId query string Masked project id.
companyId query string Masked company id.
responsibleId query string Masked id of the responsible person.
statusId query string Masked status id.
isActive query boolean Filter on active state.
query query string Free-text filter; the endpoint description lists the fields it matches.
dueBefore query string (date) Due-date upper bound (ISO-8601 date).
sort query string Sort key; the endpoint description lists the allowed values.

Responses

Status Description
200 A page of activities.
ActivityOffsetListResponse · application/json
400 limit out of range, unknown sort, or an id that is not a valid id.

Example

curl
curl "https://api.visena.example/acme/api/v1/en/activity?projectId=pJ7wN2&offset=0&limit=20" \
  -H "Authorization: Bearer $TOKEN"

List activities by cursor

GET /{instanceName}/api/v1/{locale}/activity/cursor

Keyset-paginated list over the activity id. No total is returned. Pass the opaque cursor from a previous page to continue; the same filters as the offset list apply.

Parameters

Parameter In Type Description
cursor query string Opaque page cursor from the previous response's links.next; omit for the first page.
limit query integer Maximum items to return per page.
projectId query string Masked project id.
companyId query string Masked company id.
responsibleId query string Masked id of the responsible person.
statusId query string Masked status id.
isActive query boolean Filter on active state.
query query string Free-text filter; the endpoint description lists the fields it matches.
dueBefore query string (date) Due-date upper bound (ISO-8601 date).

Responses

Status Description
200 A page of activities.
ActivityCursorListResponse · application/json
400 Invalid or expired cursor, limit out of range, or an id that is not a valid id.

Example

curl
curl "https://api.visena.example/acme/api/v1/en/activity/cursor?limit=100" \
  -H "Authorization: Bearer $TOKEN"

Before you build a synchronisation on the cursor or the timeline read mode, read their sync semantics: which of the two yields one consistent extract that has to be walked in a single pass, which one you resume from, why delivery is at-least-once so you de-duplicate by id, and what neither of them reports about rows that disappear. The site sets all of that out once, for every resource, under Lists, paging and sync.

List activities by change time

GET /{instanceName}/api/v1/{locale}/activity/timeline

Keyset-paginated change feed ordered by last modification (falling back to creation), from an optional since lower bound. No total is returned.

Parameters

Parameter In Type Description
since query string (date-time) Inclusive lower bound — an RFC 3339 timestamp.
cursor query string Opaque page cursor from the previous response's links.next; omit for the first page.
limit query integer Maximum items to return per page.
projectId query string Masked project id.
companyId query string Masked company id.
responsibleId query string Masked id of the responsible person.
statusId query string Masked status id.
isActive query boolean Filter on active state.
query query string Free-text filter; the endpoint description lists the fields it matches.
dueBefore query string (date) Due-date upper bound (ISO-8601 date).

Responses

Status Description
200 A page of activities.
ActivityCursorListResponse · application/json
400 Invalid or expired cursor, malformed since, limit out of range, or an id that is not a valid id.

Example

curl
curl "https://api.visena.example/acme/api/v1/en/activity/timeline?since=2026-08-20T02:00:00Z" \
  -H "Authorization: Bearer $TOKEN"

Replace an activity

PUT /{instanceName}/api/v1/{locale}/activity/{activityId}

Full replace: an omitted optional field is cleared, except typeId, priorityId, severityId, resolutionId and the two boolean flags — those are non-nullable on the entity, so omitting one keeps its current value. status is not writable — use the status transition endpoint.

Parameters

Parameter In Type Description
activityId required path string Masked activity id.

Request body

application/jsonActivityUpdateDto

Responses

Status Description
200 The updated activity.
ActivityResponseDto · application/json
400 Request body failed validation.
404 No activity with that id.
422 A referenced entity does not exist, or a classification ref is not available on the project's template.

Example

curl
curl -X PUT "https://api.visena.example/acme/api/v1/en/activity/aT4cV9" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Kickoff meeting",
    "projectId": "pJ7wN2",
    "dueDate": "2026-09-22"
  }'

Partially update an activity

PATCH /{instanceName}/api/v1/{locale}/activity/{activityId}

RFC 7396 JSON Merge Patch (application/merge-patch+json). Omit a key to leave it unchanged, send null to clear it. An empty body {} is a no-op. status is not patchable — use the status transition endpoint.

Parameters

Parameter In Type Description
activityId required path string Masked activity id.

Request body

application/merge-patch+jsonobject

Responses

Status Description
200 The updated activity.
ActivityResponseDto · application/json
400 A field value could not be parsed, or a non-nullable field was cleared.
404 No activity with that id.
415 Content-Type is not application/merge-patch+json.
422 A referenced entity does not exist, or a classification ref is not available on the project's template.

Example

curl
curl -X PATCH "https://api.visena.example/acme/api/v1/en/activity/aT4cV9" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "dueDate": "2026-09-22",
    "responsiblePersonId": "xK9mQ2"
  }'

Close or delete an activity

DELETE /{instanceName}/api/v1/{locale}/activity/{activityId}

mode=close (default) closes the activity through Visena's quick-close, which is reversible. mode=delete removes it permanently. Any other mode is a 400.

Parameters

Parameter In Type Description
activityId required path string Masked activity id.
mode query string
default close
Delete mode; the endpoint description explains the options and the default.

Responses

Status Description
204 Activity closed or deleted.
400 Unknown mode, or the id is not a valid id.
404 No activity with that id.

Example

curl
curl -X DELETE "https://api.visena.example/acme/api/v1/en/activity/aT4cV9?mode=close" \
  -H "Authorization: Bearer $TOKEN"

Object shapes

The request and response bodies used above, in the order they are first referenced.

ActivityCreateDto

Field Type Description
name required string Activity name.
projectId required string (masked id)
description string Free-text description.
projectPhaseId string (masked id)
responsiblePersonId string (masked id)
typeId string (masked id)
priorityId string (masked id)
severityId string (masked id)
resolutionId string (masked id)
dueDate string (date) Due date (ISO-8601 local date).
estimate object Estimated hours.
etc object Estimate to complete, in hours.
sortIndex object Manual ordering index within the project.
externalReference string Caller-owned external reference.
includeInAssignmentAgreement object Include this activity in the assignment agreement.
productTxRequiredWhenDone object Require a product transaction before the activity can be closed.

ActivityResponseDto

Field Type Description
id string (masked id)
name string Activity name.
description string Free-text description.
project ActivityRefDto
projectPhase ActivityRefDto
responsible ActivityRefDto
status ActivityRefDto
type ActivityRefDto
priority ActivityRefDto
severity ActivityRefDto
resolution ActivityRefDto
dueDate string (date) Due date.
estimate object Estimated hours.
etc object Estimate to complete, in hours.
sortIndex object Manual ordering index within the project.
externalReference string Caller-owned external reference.
includeInAssignmentAgreement boolean Included in the assignment agreement.
productTxRequiredWhenDone boolean A product transaction is required before the activity can be closed.
created read-only string (date-time) Creation timestamp (UTC).
createdBy ActivityRefDto
modified read-only string (date-time) Last modification timestamp (UTC).
modifiedBy ActivityRefDto
actedBy string (masked id)

ActivityRefDto

Priority.

Field Type Description
id string (masked id)
name string Display name of the referenced entity.

ActivityOffsetListResponse

Field Type Description
totalItems integer Total number of activities matching the filters.
totalPages integer Total number of pages at the current page size.
page integer Zero-based index of the current page.
size object Page size actually applied.
items array of ActivityListItemDto The activities on this page.
links ActivityListLinks

ActivityListItemDto

The activities on this page, always in ascending order.

Field Type Description
id string (masked id)
name string Activity name.
description string Free-text description.
project ActivityRefDto
company CompanyRefDto
responsible string (masked id)
status ActivityRefDto
priority ActivityRefDto
dueDate string (date) Due date.
estimate object Estimated hours.
etc object Estimate to complete, in hours.
sortIndex object Manual ordering index within the project.
created string (date-time) Creation timestamp (UTC).
modified string (date-time) Last modification timestamp (UTC).

CompanyRefDto

The company the owning project belongs to, if any.

Field Type Description
id string (masked id)
name string Company display name.
organizationalNumbers array of OrgNumberDto Active organizational (registration) numbers; at most one per company.

OrgNumberDto

Active organizational (registration) numbers; at most one per company.

Field Type Description
orgNumber string The organizational (registration) number.
country CountryRefDto

CountryRefDto

Country this organizational number is registered in.

Field Type Description
id string (masked id)
name string Country display name.
code string ISO 3166-1 alpha-2 country code, e.g. "NO".

Navigation links for this page.

Field Type Description
self string URL of the current page.
first string URL of the first page (offset endpoint).
prev string URL of the previous page, if any.
next string URL of the next page, if any.
last string URL of the last page (offset endpoint).

ActivityCursorListResponse

Field Type Description
items array of ActivityListItemDto The activities on this page, always in ascending order.
nextCursor string Opaque cursor for the next page, if more rows follow.
prevCursor string Opaque cursor for the previous page, if any.
links ActivityListLinks

ActivityUpdateDto

Field Type Description
name required string Activity name.
projectId required string (masked id)
description string Free-text description. Omit to clear.
projectPhaseId string (masked id)
responsiblePersonId string (masked id)
typeId string (masked id)
priorityId string (masked id)
severityId string (masked id)
resolutionId string (masked id)
dueDate string (date) Due date (ISO-8601 local date). Omit to clear.
estimate object Estimated hours. Omit to clear.
etc object Estimate to complete, in hours. Omit to clear.
sortIndex object Manual ordering index. Omit to clear.
externalReference string Caller-owned external reference. Omit to clear.
includeInAssignmentAgreement object Include this activity in the assignment agreement. Omit to keep the current value.
productTxRequiredWhenDone object Require a product transaction before close. Omit to keep the current value.