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:

  • Attachments:

    • For outgoing invoices/credit notes created in PowerOffice: Contain the relevant files attached to an invoice/credit note that is created and sent from PowerOffice. Will correspond with the files that can be found in the SalesOrderAttachments endpoints

    • For all other voucher types received in PowerOffice via the journal entry worfklow: Attachments refer to the voucher pages (stored as jpeg's)

    • For imported vouchers (via file import or posted via the api with Voucher Posting): Attachments 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

  • OriginalDocument:

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

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

    • For all other voucher types received in PowerOffice via the journal entry worfklow: No original document content

    • 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: The original document is the pdf from the integration

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 in our integration have a worklfow 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 prerequesites:

  • 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 precicely, if integration A add a pdf using the PUT endpoint, integration B cannot use the PUT.

  • Provided a vocher was imported and integration A did the first PUT, the integratation 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 successfull, and if so the GET /VoucherDocumentation endpoint will provide the "hasPdf" field set true

Prerequisites:

  • Access to the voucher documentation endpoint

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

Dictionary/Terminology:

  • N/A