CONNECT APP
Build with Fortnox
Business Management
- OAuth
MCP
Give your agent Fortnox tools
Every Fortnox action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Fortnox account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "fortnox",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Article:
const result = await mcp.callTool({
name: "fortnox-create-article",
arguments: {
description: "Description",
ean: "EAN",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "fortnox",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Article:
result = await session.call_tool("fortnox-create-article", {
"description": "Description",
"ean": "EAN",
})API PROXY
Call the Fortnox API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Fortnox API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.fortnox.se/3/customers",
})
// Any allowed Fortnox endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.fortnox.se/3/customers
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZm9ydG5veC5zZS8zL2N1c3RvbWVycw?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Fortnox actions from your backend
Connect a user's Fortnox account once, then run Create Article on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "fortnox-create-article",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
fortnox: { authProvisionId: "apn_xxxxxxx" },
description: "Description",
ean: "EAN",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="fortnox-create-article",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"fortnox": {"authProvisionId": "apn_xxxxxxx"},
"description": "Description",
"ean": "EAN",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "fortnox-create-article",
"configured_props": {
"fortnox": { "authProvisionId": "apn_xxxxxxx" },
"description": "Description",
"ean": "EAN"
}
}'TOOLS
Fortnox actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Article
actionCreates a new article in the Fortnox API. See the documentation.Writev0.0.2 -
Create Customer
actionCreates a new customer in the Fortnox API. See the documentation.Writev0.0.2 -
Create Invoice
actionCreates a new invoice in the Fortnox API. See the documentation.Writev0.0.2 -
Create Invoice Payment
actionCreates a new invoice payment in the Fortnox API. See the documentation.Writev0.0.2 -
Get Supplier Invoice
actionRetrieve a supplier invoice. See the documentationRead-onlyv0.0.1 -
List Accounts
actionList all accounts in Fortnox. See the documentationRead-onlyv0.0.1 -
List Article Number Options
actionRetrieves available options for the Article Number field.Read-onlyv0.0.1 -
List Articles
actionList all articles in Fortnox. See the documentationRead-onlyv0.0.1 -
List Customer Number Options
actionRetrieves available options for the Customer Number field.Read-onlyv0.0.1 -
List Customers
actionList all customers in Fortnox. See the documentationRead-onlyv0.0.1 -
List Financial Years
actionRetrieve a list of financial years. See the documentationRead-onlyv0.0.1 -
List Invoice Number Options
actionRetrieves available options for the Invoice Number field.Read-onlyv0.0.1 -
List Invoices
actionRetrieve a list of invoices in Fortnox. See the documentationRead-onlyv0.0.1 -
List Supplier Invoice Number Options
actionRetrieves available options for the Supplier Invoice Number field.Read-onlyv0.0.1 -
List Supplier Invoices
actionList all invoices for a supplier. See the documentationRead-onlyv0.0.1 -
List Supplier Number Options
actionRetrieves available options for the Supplier Number field.Read-onlyv0.0.1 -
List Suppliers
actionList all suppliers in Fortnox. See the documentationRead-onlyv0.0.1 -
List Voucher Number Options
actionRetrieves available options for the Voucher Number field.Read-onlyv0.0.1 -
Send Invoice
actionSends an invoice in the Fortnox API. See the documentation.Writev0.0.2 -
Update Article
actionUpdates an existing article in the Fortnox API. See the documentation.Writev0.0.2 -
Update Customer
actionUpdates an existing customer in the Fortnox API. See the documentation.Writev0.0.2
EVENTS
Fortnox triggers
Event sources your backend can deploy for users and receive through a webhook.
No Fortnox triggers are available yet.
- App slug
- fortnox
- Authentication
- OAuth
- Categories
- Business Management
- Actions
- 21
- Triggers
- 0
- API proxy
- Available
OAuth scopes
These are the scopes Pipedream's managed Fortnox OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.
- article
- invoice
- customer
- order
- payment
- profile
- supplierinvoice
- bookkeeping
- supplier