Authorizing and connecting to Poweroffice Demo-Api V1

Getting started in api export and import.

  • I want to test my api solution for Poweroffice in demo environment.

  • I am somehow good with computers, but a greenhorn in this forum :smiley:

  • Problem is, that i cant seem to understand the authorization process.

  • Attached is example of authentication from the api documentation.

  • I have tried all kinds of steps in http modules.

  • Link to documentation : PowerOffice Go API Reference Documentation

Screenshots

What poweroffice api says as example :

POST https://api.poweroffice.net/OAuth/Token HTTP/1.1
Authorization: Basic MTk3MEY2QUQtRTM1RS00RUJGLTlEQTctNTEwOTYyQ0U3RTQ2OjE4MTM1NDRCLUNGMDgtNDlFNy1BOTYwLTBENDM0NEFCRTJDMQ==
Content-Type: application/x-www-form-urlencoded; charset=utf-8

*The demo environment has different adresses, but i have tried with them, not this one. I replaced the start of the adress.

* https://api-demo.poweroffice.net/oauth/token
* https://api-demo.poweroffice.net/


grant_type=client_credentials
  • What i want to import in first test.
[
    {
        "value": "{\n  \"Description\": \"Faktura 100497\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"48129.00\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100497\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          \"AccountNumber\": \"0\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-48129.00\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n},{\n  \"Description\": \"Faktura 100497\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"21093.75\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100497\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"1\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          \"AccountNumber\": \"3000\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-21093.75\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n},{\n  \"Description\": \"Faktura 100497\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"27035.25\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100497\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"1\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100497,\n          \"AccountNumber\": \"3001\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-27035.25\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n},{\n  \"Description\": \"Faktura 100498\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"396.00\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100498\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          \"AccountNumber\": \"0\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-396.00\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n},{\n  \"Description\": \"Faktura 100498\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"0.25\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100498\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          \"AccountNumber\": \"0\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-0.25\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n},{\n  \"Description\": \"Faktura 100498\",\n  \"Date\": \"20240410\",\n  \"Type\": 1,\n  \"ImportLines\": [\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          //\"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"396.25\",\n          \"CustomerCode\": \"10429\",\n          \"CurrencyCode\": \"NOK\",\n          \"InvoiceNo\": \"100498\",\n          \"Reference\": \"\",\n          \"PurchaseOrderNo\": \"0\", \n          \"DepartmentCode\":\"1\",\n      },\n      {\n          \"DocumentDate\": \"20240410\",\n          \"DocumentNumber\":100498,\n          \"AccountNumber\": \"3001\",\n          \"Description\": \"Varer ihht. utsendt faktura\",\n          \"Amount\": \"-396.25\",\n          \"Quantity\": \"1.0\",\n          \"CurrencyCode\": \"NOK\",\n          \"ProductCode\": \"\"\n      }\n  ],\n  \"SalesOrders\": []\n}"
    }
]```

Hi Mathias,

Regarding your first issue with authorization, you have already completed that when you created the connection “My Power Office connection.” When it comes to Make, it streamlines the process when it comes to connection to the APi.

Here is a link to the Make Help page regarding connections for additional information: Connecting an application (make.com)

Now regarding your second issue on what you want to import from the image, you will have to map the correct value into the correct fields, but from the JSON you have posted, there are certain values that are missing, such as “file size,” which is most likely going to be a required file for the module to work.

I would suggest that you have another module before the import file module as the starting point, such as Dropbox, so that you are able to get the necessary values to map onto the import module, or you can use a Google Drive module that gets the specific file you want, and as you can see from the first option under the “File” header, change that to Google Drive.

Hi. When sending to demo api in poweroffice the poweroffice module don`t do the trick, as it goes straight to production environment, and i want to test my integration in demo environment to be sure not to mix things up in my real life if the import is bad.

Looking at the URL help (Enter a path relative to https://api.poweroffice.net.), it seems the module is set up to connect with the Production environment (you cannot add “demo” here)
I would suggest to use HTTP module to test with the demo client.