Exporting Material Transactions

Material transactions in Tidsbanken represent items or materials that have been picked or used in connection with work. Material usage can be registered directly in Tidsbanken, or alternatively in an external system.

If material usage is registered in an external system, the transactions must be transferred to Tidsbanken before they can be approved and exported. This is done using the following endpoint:

POST https://api.tidsbanken.net/prosjekt/Transaksjon/Batch

See the API documentation for details on the request format and validation rules:
https://developer.tidsbanken.net/api-details#api=api-prosjekt&operation=posttransaksjonbatch

Before material transactions can be exported to an ERP or financial system, they must be approved in Tidsbanken.

Unlike time entries, material transactions do not require a separate “prepare for export” step. Once a transaction is approved, it is immediately eligible for export.

Overall Process

  1. Material usage is registered either directly in Tidsbanken or in an external system.
    If registered externally, material transactions are transferred to Tidsbanken using the batch transaction endpoint.

  2. A manager reviews and approves the material transactions in Tidsbanken.

  3. Approved and unexported material transactions are retrieved through the API.

  4. After successful import into the receiving system, the same transactions are marked as exported in Tidsbanken.

This process ensures that each material transaction is exported exactly once and prevents duplicate exports.

Usage Pattern

Step 1: Approve material transactions

All material transactions must be approved before they can be exported. Approval is part of the daily workflow in Tidsbanken and ensures that all exported data is valid and verified.

There is no separate preparation step for material transactions—approval alone is sufficient.

Step 2: Retrieve material transactions ready for export

To retrieve material transactions that are ready for export, the following endpoint must be called first:

GET https://api.tidsbanken.net/prosjekt/TransaksjonsEksport

This endpoint returns material transactions that:

  • are approved, and

  • have not yet been exported.

The integration should retrieve the transactions, store the returned IDs, and import the data into the receiving system.

Step 3: Mark material transactions as exported

After the receiving system has successfully processed the material transactions, the exported transaction IDs must be sent back to Tidsbanken to mark them as exported:

POST https://api.tidsbanken.net/prosjekt/Transaksjonseksport/Eksportert

Example payload:

{   "ids": [1, 2, 3, 15, 22, 25] }

Only the IDs of successfully exported transactions need to be included.

Marking transactions as exported ensures that they will not be included in subsequent export runs.