Voucher Documentation

Workflows > Endpoints > Voucher Workflows > Voucher Documentation

Purpose: Retrieve the voucher documentation files,?or?upload?pdf?to?previous?imported?voucher.

Retrieving voucher documentation:

This workflow is typically used in cases where relevant voucher documentation need to be retrieved from PowerOffice, either for reporting purposes or to be stored and documented externally. Note that the documentation in question, specifically concern the vouchers, not the general document and documentation feature in Go.

The main endpoint for retrieving the documentation, return a compressed zip file that include the file(s) as they are stored in the PowerOffice backend. The integrated application need to handle the process of extracting the content in the zip file, and handle the subsequent use of the files (depending on the use case).

Endpoint

Description of the core workflow:

  1. Check the available documentation types for a given voucher number*

  2. Retrieve the desired documentation type for the voucher

  3. Store and/or further handle the returned zip file and it's content

*The files are stored in different ways depending on how they originated in PowerOffice. A general explanation of which file types that can be expected in which case:

  • Images:

    • Present for all voucher types received in PowerOffice via the journal entry worfklow: The images refer to the voucher pages (stored as jpeg's), and have a sort order at the end of the filename. For supplier invoices, image [0] will generally be the main page of the invoice. If a voucher has images, these should be considered the primary documentation regardless of wheter a pdf is present or not.

    • For imported vouchers (via file import or posted via the api with Voucher Posting), or for outgoing invoices created in PowerOffice: Images have no content

  • EHF:

    • For outgoing invoices/credit notes created in PowerOffice and sent as EHF: Contain the outgoing EHF xml file

    • For incoming invoices/credit notes received as EHF in PowerOffice via the journal entry worfklow: Contain the EHF xml file.

    • For all other cases: EHF have no content

  • Pdf:

    • For outgoing invoices/credit notes created in PowerOffice: Contain the the main sales document pdf, and any sales order attachments that can be merged with the main pdf document.

    • For all other voucher types received in PowerOffice via the journal entry worfklow: A user in Go may have uploaded a pdf as secondary documentation for a voucher, in which case a pdf is present. However, if a voucher have images, these should be considered the primary documentation.

    • For imported vouchers (via file import or posted via the api with Voucher Posting), where a pdf is added to PowerOffice by an integration using POST /VoucherDocumentation: A pdf is present and images/ehf is not present. The pdf is the main documentation of the voucher.

Upload pdf to previously imported voucher


Relevant workflow to supplement PowerOffice with voucher documentation in pdf format, for vouchers that are previously imported to PowerOffice. Imported vouchers do not initially have any documentation. A voucher is considered imported if:

  • The voucher was posted manually by a user using a file import

  • API v1 import service or voucher services was used

  • API v2 import or voucher posting endpoints was used

A common use case is to upload a pdf if our integration have a workflow involving either voucher posting endpoints and/or import. If available, the clients will commonly prefer to get the pdf document available in PowerOffice.

A secondary use case is to solve for the problem of uploading pdf documentation to supplement a workflow your integration are not involved in. For example, the client may have a process and routine of manual file imports, but would like the documentation added to PowerOffice. A third party may offer to integrate with the source system so solve for this, using the PUT voucher documentation endpoint.

The PUT endpoint only support pdf files, and come with a set of prerequisites:

  • The voucher in question must have been imported (by the definition of an import)

  • The first integration adding a pdf will "take ownership" of the documentation. More precisely, if integration A add a pdf using the PUT endpoint, integration B cannot use the PUT.

  • Provided a voucher was imported and integration A did the first PUT, the integration A can use PUT again for the same voucher, replacing the previously added pdf

Description of the core workflow:

  1. PUT a pdf file for an imported voucher

  2. The response will tell if upload was successful, and if so the GET /VoucherDocumentation endpoint will provide the "hasPdf" field set true

Prerequisites:

  • Read access to the voucher documentation privelige in order to retrieve documents

  • Full access to the voucher documentation privelige in order to add pdf to imported vouchers

  • The PUT endpoint can only be used for imported vouchers, and only if a pdf haven't already been uploaded by a different integration. The integration first uploading a pdf will take "ownership" of the documentation.

  • The client need an active subscription of one of the accounting modules in Go

Dictionary/Terminology:

  • Imported voucher: In this context, an imported voucher is a state set in PowerOffice, for specific routes of origin for the voucher. If a voucher is created from a file import, api import or directly posted via the api using the voucher posting endpoints, the voucher is considered imported. By default, imported vouchers have no documentation, only the transactions. This is where the PUT endpoint may be used to supplement PowerOffice with a relevant pdf document and connect it to the voucher.