{"openapi":"3.0.3","info":{"title":"Finago Office Public API","version":"0.56.1"},"servers":[{"url":"https://rest.api.24sevenoffice.com/v1"}],"paths":{"/accountbalances":{"get":{"summary":"Read account balances","description":"Read a list of account balances with monthly changes for a defined period.","tags":["accountbalances"],"security":[{"tfso":["api.accounting.transaction.accountbalance:read","api.accounting.account:read"]}],"parameters":[{"name":"dateFrom","in":"query","required":true,"description":"The starting date from which balances will be retrieved.","schema":{"$ref":"#/components/schemas/DateFrom"}},{"name":"dateTo","in":"query","required":true,"description":"The ending date until which balances will be retrieved.","schema":{"$ref":"#/components/schemas/DateTo"}},{"name":"periods","in":"query","description":"Specifies the periods for which the balances will be retrieved.","schema":{"$ref":"#/components/schemas/Periods"}},{"name":"type","in":"query","description":"Specifies the type of data to be retrieved.","schema":{"$ref":"#/components/schemas/Type"}},{"name":"keepIncoming","in":"query","description":"Indicates whether to include incoming amounts in the response. Default is false.","schema":{"$ref":"#/components/schemas/KeepIncoming"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AggregationElement"}},"examples":{"AccountBalancesReadAllResponseExample":{"$ref":"#/components/examples/AccountBalancesReadAllResponseExample"}}},"application/hal":{"schema":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/AggregationElement"}}}},"beginningAt":{"type":"string","format":"date"},"endingAt":{"type":"string","format":"date"},"fiscals":{"type":"array","items":{"$ref":"#/components/schemas/Fiscal"}}}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/accountbalances/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"get":{"summary":"Read an account balance by ID","description":"Read a list of account balances with monthly changes for a defined period for a specific account identified by its unique ID.","tags":["accountbalances"],"security":[{"tfso":["api.accounting.transaction.accountbalance:read","api.accounting.account:read"]}],"parameters":[{"name":"dateFrom","in":"query","required":true,"description":"The starting date from which balances will be retrieved.","schema":{"$ref":"#/components/schemas/DateFrom"}},{"name":"dateTo","in":"query","required":true,"description":"The ending date until which balances will be retrieved.","schema":{"$ref":"#/components/schemas/DateTo"}},{"name":"periods","in":"query","description":"Specifies the periods for which the balances will be retrieved.","schema":{"$ref":"#/components/schemas/Periods"}},{"name":"type","in":"query","description":"Specifies the type of data to be retrieved.","schema":{"$ref":"#/components/schemas/Type"}},{"name":"keepIncoming","in":"query","description":"Indicates whether to include incoming amounts in the response. Default is false.","schema":{"$ref":"#/components/schemas/KeepIncoming"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AggregationElement"}}},"application/hal":{"schema":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/AggregationElement"}}}},"beginningAt":{"type":"string","format":"date"},"endingAt":{"type":"string","format":"date"},"fiscals":{"type":"array","items":{"$ref":"#/components/schemas/Fiscal"}}}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/accounts":{"get":{"tags":["accounts"],"security":[{"tfso":["api.accounting.account:read"]}],"summary":"Read accounts","description":"Read a list of accounts, including their details.","parameters":[{"name":"query","in":"query","description":"Filters accounts containing the specified keyword(-s) within their name or number properties. For example, a GET request `/accounts/?query=salary` would return accounts with \"salary\" in their name or number.","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account1"}},"examples":{"AccountReadAllResponseExample":{"$ref":"#/components/examples/AccountReadAllResponseExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/accounts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"A unique identifier for the account within Finago Office accounting module.","schema":{"type":"integer"}}],"get":{"summary":"Read an account by ID","description":"Read details of a specific account identified by its unique ID.","tags":["accounts"],"security":[{"tfso":["api.accounting.account:read"]}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account1"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/currencies":{"get":{"summary":"Read currencies","description":"Read a list of available currencies within Finago Office accounting module.","tags":["currencies"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Currencies"},"examples":{"CurrenciesReadAllResponseExample":{"$ref":"#/components/examples/CurrenciesReadAllResponseExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":[]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/documents/{documentId}":{"get":{"summary":"Get a document by its DocumentID","tags":["Documents"],"security":[{"tfso":["api.accounting.transaction:read"]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"The ID of the document to retrieve.","schema":{"type":"integer"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Document retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInfo"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/fiscalperiods":{"get":{"summary":"Read fiscal periods","description":"Read a list of fiscal periods.","tags":["fiscalPeriods"],"security":[{"tfso":["api.accounting.fiscalperiod:read"]}],"parameters":[{"name":"type","in":"query","description":"Filter the results by type of accounting period. Use \"Period\" to retrieve only sub-periods within financial years, \"Year\" to retrieve only full financial years, or \"All\" to retrieve both financial years and their associated periods.","schema":{"type":"string","enum":["Year","Period","All"],"default":"Year"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of fiscal periods.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountingPeriod"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/taxes":{"get":{"summary":"Read tax codes","description":"Read a list of tax codes available in the accounting system.","tags":["Taxes"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaxResponse"}},"examples":{"TaxReadAllResponseExample":{"$ref":"#/components/examples/TaxReadAllResponseExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.accounting.tax:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/taxes/{id}":{"parameters":[{"name":"id","in":"path","description":"A unique identifier for the tax code within Finago Office ERP modules.","required":true,"schema":{"type":"integer","format":"int32","minimum":0},"example":1}],"get":{"summary":"Read a tax code by ID","description":"Read details of a specific tax code identified by its unique ID.","tags":["Taxes"],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.accounting.tax:read"]}]}},"/transactionlines":{"get":{"summary":"Read transaction lines","description":"Read a list of transaction lines for a defined period, based on various filtering criteria.","tags":["transactionLines"],"security":[{"tfso":["api.accounting.transaction:read"]}],"parameters":[{"name":"dateFrom","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"The starting date (inclusive) from which transactions will be retrieved."},{"name":"dateTo","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"The ending date (exclusive) until which transactions will be retrieved. If set to 2024-01-01, the latest result will be retrieved before 23:59 on 2023-12-31."},{"name":"createdFrom","in":"query","schema":{"type":"string","format":"date-time"},"description":"Retrieve transactions created after the specified timestamp (ISO 8601 format).","example":{}},{"name":"createdAfter","deprecated":true,"in":"query","schema":{"type":"string","format":"date-time"},"description":"Deprecated - use `createdFrom` instead.","example":{}},{"name":"modifiedFrom","in":"query","schema":{"type":"string","format":"date-time"},"description":"Retrieve transactions modified after the specified timestamp (ISO 8601 format).","example":{}},{"name":"modifiedAfter","deprecated":true,"in":"query","schema":{"type":"string","format":"date-time"},"description":"Deprecated - use `modifiedFrom` instead.","example":{}},{"name":"transactionNumber","in":"query","schema":{"type":"number"},"description":"The unique number representing the transaction."},{"name":"transactionTypeId","in":"query","schema":{"type":"integer"},"description":"ID representing the type of transaction."},{"name":"customerId","in":"query","schema":{"type":"integer"},"description":"ID of the customer involved in the transaction."},{"name":"accountId","in":"query","schema":{"type":"integer"},"description":"ID of the account involved in the transaction."},{"name":"accountNumber","in":"query","schema":{"type":"integer"},"description":"The number of the account involved in the transaction."},{"name":"invoiceNumber","in":"query","schema":{"type":"string"},"description":"The invoice number associated with the transaction."},{"name":"currencyCode","in":"query","schema":{"type":"string"},"description":"The currency code used in the transaction.\n"},{"name":"limit","in":"query","schema":{"type":"integer","default":50},"description":"The maximum number of transactions to retrieve."},{"name":"includeDimensions","in":"query","schema":{"type":"boolean","default":false},"description":"Whether to include dimension information in the response."},{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"The page number of the results to retrieve."},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"link":{"description":"The \"link\" header includes information on where to find `first`, `previous` and `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transactions"},"examples":{"TransactionLinesReadAllResponseExample":{"$ref":"#/components/examples/TransactionLinesReadAllResponseExample"}}}}}}}},"/transactionlines/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"guid"},"description":"The unique identifier for the transaction line."}],"get":{"summary":"Read a transaction line by ID","description":"Read a single transaction line identified by its unique ID.","tags":["transactionLines"],"security":[{"tfso":["api.accounting.transaction:read"]}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/transactions":{"post":{"summary":"Post a transaction to the general ledger","tags":["Transactions"],"security":[{"tfso":["api.accounting.transaction:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionInput"}}}},"responses":{"201":{"description":"The transaction has been posted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCreatedResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"The input provided was invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized - Bearer token missing or invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden - User does not have access to post transactions","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/fileUpload":{"post":{"summary":"Initiate a file upload process","tags":["Transactions"],"security":[{"tfso":["api.accounting.transaction:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadRequest"}}}},"responses":{"200":{"description":"Attachment upload initiated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"The input provided was invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized - Bearer token missing or invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden - User does not have access to post transactions","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/fileUpload/{fileId}":{"get":{"summary":"Get the status of a file upload","description":"Get the status of a file upload. Use this to get the documentId once the upload is completed.","operationId":"getFileUploadStatus","tags":["Documents"],"security":[{"tfso":["api.accounting.transaction:write"]}],"parameters":[{"name":"fileId","in":"path","required":true,"description":"The ID of the file upload to check.","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File upload status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadStatusResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"The input provided was invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized - Bearer token missing or invalid","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden - User does not have access to post transactions","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/transactiontypes":{"get":{"summary":"Read transaction types","description":"Read a list of available transaction types within Finago Office accounting module.","tags":["transactionTypes"],"security":[{"tfso":["api.accounting.transactiontype:read","api.accounting.transaction:read"]}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionTypes"},"examples":{"TransactionTypesReadAllResponseExample":{"$ref":"#/components/examples/TransactionTypesReadAllResponseExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/bankaccounts":{"get":{"tags":["bankAccounts"],"summary":"Read bank accounts","description":"Read a list of bank accounts with details. Each bank account includes information such as account number, BIC, type, name, owner details, creation timestamp, modification timestamp, and the latest balance information, should there be one available.","security":[{"tfso":["api.bank.account:read"]}],"parameters":[{"name":"before","in":"query","required":false,"description":"The date to get the balance from. The balance returned will be the last balance before this date. If omitted, the current date is used. The date format here is YYYY-MM-DD.","schema":{"type":"string","format":"date","example":"2024-06-01"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"description":"List of bank accounts","type":"array","items":{"$ref":"#/components/schemas/BankAccountResponse"}},"examples":{"BankAccountsReadAllResponseExample":{"$ref":"#/components/examples/BankAccountsReadAllResponseExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}},"post":{"tags":["bankAccounts"],"summary":"Create a bank account","description":"Create a new bank account record with specified details including account number, BIC, type, name, owner details, and optional initial balance information.","security":[{"tfso":["api.bank.account:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountRequestPost"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountResponse"},"examples":{"BankAccountExample":{"$ref":"#/components/examples/BankAccountExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/bankaccounts/{id}":{"get":{"tags":["bankAccounts"],"summary":"Read a bank account by ID","description":"Read details for a specific bank account identified by its unique identifier. The response includes information such as account number, BIC, type, name, owner details, creation timestamp, modification timestamp, and the latest balance information, should there be one available.","security":[{"tfso":["api.bank.account:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","required":false,"description":"The date to get the balance from. The balance returned will be the last balance before this date. If omitted, the current date is used. The date format here is YYYY-MM-DD.","schema":{"type":"string","format":"date","example":"2024-06-02"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountResponse"},"examples":{"BankAccountWithBalanceExample":{"$ref":"#/components/examples/BankAccountWithBalanceExample"},"BankAccountExample":{"$ref":"#/components/examples/BankAccountExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/bankaccounts/{id}/balances":{"post":{"tags":["bankAccounts"],"summary":"Create a new bank account balance","description":"Add a new balance entry for a specific bank account identified by its unique identifier. The balance entry includes the amount, timestamp, and currency code. The endpoint facilitates accurate tracking of the bank account's financial status over time.","security":[{"tfso":["api.bank.account:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountBalanceRequestPost"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountBalanceResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/banktransactions":{"get":{"tags":["bankTransactions"],"summary":"Read bank transactions","description":"Read a list of bank transactions based on specified filters. Each transaction includes details such as transaction reference, type, bank account details, payment reference, amount, date, and status.\n","security":[{"tfso":["api.bank.transaction:read"]}],"parameters":[{"name":"dateFrom","in":"query","required":true,"description":"Filter bank transactions by start date (inclusive). Date format should be YYYY-MM-DD. Compares dates by greater or equal. Accepts dates in ISO 8601 format.","example":{},"schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","required":true,"description":"Filter bank transactions by end date (inclusive). Date format should be YYYY-MM-DD. Compares dates by less or equal. Accepts dates in ISO 8601 format. The date range cannot span more than two years.","example":{},"schema":{"type":"string","format":"date"}},{"name":"bankAccountId","in":"query","description":"Filter bank transactions by bank account ID.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Specify the number of items to fetch per page, defaults to 25.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"page","in":"query","description":"Specify the page number to fetch, defaults to 1.","schema":{"type":"integer","format":"int","minimum":1,"maximum":1000,"default":1}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","headers":{"link":{"description":"The \"link\" header includes information on where to find `first`, `self`, `previous` and `next` page. The last page does not include `next` link. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankTransactionResponse"}},"examples":{"BankTransactionsExample":{"$ref":"#/components/examples/BankTransactionsExample"}}}}}}},"post":{"tags":["bankTransactions"],"summary":"Create a new bank transaction","description":"The `bankAccount.id` is a required property. Before creating bank transaction, a bank account must exists. See `POST /bankaccounts`\n\nWhen creating a bank transaction, the backend system loads the existing bank account record using `bankAccount.id`. Information from the bank account is then appended to the bank transaction based on the transaction's direction type (inbound or outbound).\n\n* For outbound transactions, the `fromBankAccount` field is automatically populated from the specified bank account.\n* For inbound transactions, the `toBankAccount` field is automatically populated from the specified bank account.\n\nNote: When these fields are automatically set, any input provided in these properties will be ignored.\n","security":[{"tfso":["api.bank.transaction:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionRequestPost"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/banktransactions/{bankTransactionReference}":{"get":{"tags":["bankTransactions"],"summary":"Read a bank transaction by bank transaction reference","description":"Read details of a specific bank transaction identified by its unique bank transaction reference supplied by the bank.","security":[{"tfso":["api.bank.transaction:read"]}],"parameters":[{"name":"bankTransactionReference","in":"path","required":true,"description":"Unique identifier for the bank transaction supplied by the bank that manages the bank account.","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionResponse"},"examples":{"BankTransactionExampleMinimal":{"$ref":"#/components/examples/BankTransactionExampleMinimal"},"BankTransactionExampleFull":{"$ref":"#/components/examples/BankTransactionExampleFull"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}}}},"/customers":{"get":{"summary":"Read customers","description":"Read a list of all customers, including their details, with pagination, or a subset of customers based on query parameters. Whether a customer is a company or a private person is controlled by \"isCompany\" flag property. The schemas are also slightly different for a company (no \"person\" property) or a person (no \"organizationNumber\").","tags":["Customers"],"operationId":"GetCustomers","parameters":[{"name":"limit","in":"query","schema":{"default":25,"maxLength":100,"type":"number","format":"int32"}},{"name":"organizationNumber","in":"query","description":"Filter customers by organization number.","schema":{"type":"string"}},{"name":"isCompany","in":"query","description":"A flag variable to filter customers by company or person.","schema":{"type":"boolean"}},{"name":"isSupplier","in":"query","description":"A flag variable to filter customers by being a supplier or not.","schema":{"type":"boolean"}},{"name":"modifiedFrom","in":"query","description":"Filter customers by date of last modification. Compares dates by greater or equal and accepts dates in ISO8601 format","example":{},"schema":{"type":"string"}},{"name":"createdFrom","in":"query","description":"Filter customers by date created. Compares dates by greater or equal and accepts dates in ISO8601 format","example":{},"schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"description":"Sort customers by field and direction. Takes in a pair of field and direction separated by a colon symbol ':'","schema":{"$ref":"#/components/schemas/SortInput"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"link":{"description":"The \"link\" header includes information on where to find `first`, `previous` and `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"description":"Ok","content":{"application/json":{"schema":{"type":"array","description":"List of customers","items":{"$ref":"#/components/schemas/CustomerProperties"}},"examples":{"CustomerReadAllResponseExample":{"$ref":"#/components/examples/CustomerReadAllResponseExample"}}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.customer:read"]}]},"post":{"summary":"Create a customer","description":"Create a new customer record for a company or a person, and get the newly created customer in return.\n\nFor a new company customer, define \"name\" property and set \"isCompany\" flag to true in the request body. For a new private person customer, define \"firstName\" and \"lastName\" under the \"person\" property, and set \"isCompany\" flag to false in the request body. These are the minimum required properties that should be defined in the request body for creating a new customer.\n\nAll other properties for a customer (see response attributes for each property description) can also be defined in the request body, except for \"person\" when a new customer is a company, and \"organizationNumber\" and \"name\" (this one is generated from \"firstName\" and \"lastName\" under the \"person\" property) when a new customer is a person.\n","tags":["Customers"],"operationId":"CreateCustomer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPostRequest"},"examples":{"CustomerCreateRequestExample":{"$ref":"#/components/examples/CustomerCreateRequestExample"}}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.customer:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/customers/{customerId}":{"get":{"summary":"Read a customer by ID","description":"Read details of a specific customer identified by its unique ID.","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/customerId"},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.customer:read"]}]},"patch":{"summary":"Update a customer","description":"Update details of a specific customer identified by its uinque customer ID, and receive the updated details in return.\n","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/customerId"},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"operationId":"UpdateCustomer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPatchRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.customer:write"]}]},"delete":{"summary":"Delete a customer","description":"Delete a specific customer identified by its unique ID.","tags":["Customers"],"parameters":[{"$ref":"#/components/parameters/customerId"},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success. No content","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.customer:write"]}]}},"/customers/{customerId}/bankaccounts":{"get":{"summary":"Read customer bank accounts","description":"Retrieve a list of bank accounts associated with a specific customer.","tags":["Customers"],"operationId":"GetCustomerBankAccounts","parameters":[{"name":"customerId","in":"path","required":true,"description":"The unique identifier of the customer","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerBankAccount"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.bankdetails:read"]}]},"post":{"summary":"Create customer bank account","description":"Create a new bank account for a specific customer.","tags":["Customers"],"operationId":"CreateCustomerBankAccount","parameters":[{"name":"customerId","in":"path","required":true,"description":"The unique identifier of the customer","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBankAccount"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBankAccount"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request. Invalid input data.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.bankdetails:write"]}]}},"/customers/{customerId}/bankaccounts/{accountNumber}":{"get":{"summary":"Read specific customer bank account","description":"Retrieve a specific bank account by account number for a customer.","tags":["Customers"],"operationId":"GetCustomerBankAccount","parameters":[{"name":"customerId","in":"path","required":true,"description":"The unique identifier of the customer","schema":{"type":"string"}},{"name":"accountNumber","in":"path","required":true,"description":"The account number of the bank account","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBankAccount"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Bank account not found.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.bankdetails:read"]}]},"patch":{"summary":"Update customer bank account","description":"Update a specific bank account by account number for a customer.","tags":["Customers"],"operationId":"UpdateCustomerBankAccount","parameters":[{"name":"customerId","in":"path","required":true,"description":"The unique identifier of the customer","schema":{"type":"string"}},{"name":"accountNumber","in":"path","required":true,"description":"The account number of the bank account","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBankAccount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBankAccount"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request. Invalid input data.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Bank account not found.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.crm.bankdetails:write"]}]}},"/dimensions":{"get":{"description":"List all dimension-types. Get a list of all dimension-types in the system. Elements with id below 100 are system dimension-types and will be the same across all clients. Elements with id above 100 are custom dimension-types specific to the client.","tags":["Dimensions"],"responses":{"200":{"description":"A list of dimension-types.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.accounting.dimension:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/dimensions/{dimensionType}":{"parameters":[{"name":"dimensionType","in":"path","required":true,"schema":{"type":"integer"}}],"get":{"description":"List single dimension-type. Get description of a single dimension-type by id.","tags":["Dimensions"],"responses":{"200":{"description":"The dimension-type with the specified id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dimension"},"example":[{"id":1,"name":"Project"},{"id":2,"name":"Department"},{"id":3,"name":"Employee"},{"id":4,"name":"Product"},{"id":5,"name":"Customer"},{"id":101,"name":"Custom Dimension 1"}]}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.accounting.dimension:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/dimensions/{dimensionType}/elements":{"parameters":[{"name":"dimensionType","in":"path","required":true,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"The maximum number of elements to retrieve.","schema":{"type":"integer"}},{"name":"continuationToken","in":"query","description":"A token for continuing the retrieval of sales orders. This is used for pagination and is prepopulated from the Link-header with rel=next from a previous request.","schema":{"type":"string"}}],"get":{"description":"List dimension elements.\nGet a list of active dimension elements for a specific dimension type.\nIf there are many elements, the results will be paginated, and a Link-header with rel=next will provide the path to the next page.\n","tags":["Dimensions"],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of dimension elements for the specified dimension type.","headers":{"Link":{"description":"The Link header includes information on where to find `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link'","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DimensionElement"}}}}}},"security":[{"tfso":["api.accounting.dimension:read"]}]}},"/dimensions/{dimensionType}/elements/{value}":{"parameters":[{"name":"dimensionType","in":"path","required":true,"schema":{"type":"integer"}},{"name":"value","in":"path","required":true,"schema":{"type":"string"}}],"get":{"description":"List single dimension element. Get a single dimension element by dimension type (id) and value (id).","tags":["Dimensions"],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Single dimension element for the specified dimension type and value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionElement"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.accounting.dimension:read"]}]}},"/salesorders":{"post":{"summary":"Create a sales order","description":"Create a new sales order with customer details and order information.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRequestPost"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderExtended"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequestError"},{"$ref":"#/components/schemas/ValidationError"}]}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"get":{"summary":"Read sales orders","description":"Read existing sales orders with optional filters.","parameters":[{"name":"limit","in":"query","description":"The maximum number of sales orders to retrieve.","schema":{"type":"number","format":"int32"}},{"name":"continuationToken","in":"query","description":"A token for continuing the retrieval of sales orders.","schema":{"type":"string"}},{"name":"date","in":"query","description":"A specific date to filter sales orders.","schema":{"type":"string","format":"date"}},{"name":"dateFrom","in":"query","description":"A start date to filter sales orders.","schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","description":"An end date to filter sales orders.","schema":{"type":"string","format":"date"}},{"name":"status","in":"query","description":"Filter sales orders by their status.","schema":{"type":"string","enum":["Draft","Web","Proposal","Confirmed","Invoice","AdvanceInvoice"]}},{"name":"customerId","description":"Filter sales orders by customer ID.","in":"query","schema":{"type":"string"}},{"name":"invoiceNumber","in":"query","description":"Filter sales orders by invoice number.","schema":{"type":"string"}},{"name":"createdFrom","in":"query","description":"A start date-time to filter sales orders by creation time.","schema":{"type":"string","format":"date-time"}},{"name":"createdTo","in":"query","description":"An end date-time to filter sales orders by creation time.","schema":{"type":"string","format":"date-time"}},{"name":"modifiedFrom","in":"query","description":"A start date-time to filter sales orders by modification time.","schema":{"type":"string","format":"date-time"}},{"name":"modifiedTo","in":"query","description":"An end date-time to filter sales orders by modification time.","schema":{"type":"string","format":"date-time"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"The Link header includes information on where to find `first`, `previous` and `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link'","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrder"}},"examples":{"SalesOrdersReadAllResponseExample":{"$ref":"#/components/examples/SalesOrdersReadAllResponseExample"}}}}}},"security":[{"tfso":["api.invoicing.salesorder:read"]}]}},"/salesorders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"A unique identifier for the sales order within Finago Office ERP.","schema":{"type":"integer","format":"int32"}}],"get":{"summary":"Read a sales order by ID","description":"Read details of a specific sales order identified by its unique ID.","parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderExtended"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder:read"]}]},"patch":{"summary":"Update a sales order","description":"Update details of a specific sales order identified by its unique sales order ID, and receive the updated details in return. An existing sales order can be invoiced by updating its `status` to \"Invoice\". Before a sales order can be invoiced, it needs to include at least one sales order line.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderRequestPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderExtended"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequestError"},{"$ref":"#/components/schemas/ValidationError"}]}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete a sales order","description":"Delete a specific sales order identified by its unique sales order ID.","responses":{"204":{"description":"OK","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Sales order not found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"409":{"description":"Conflict - The sales order cannot be deleted, likely because it has already been invoiced or is in a status that does not allow deletion.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder:delete"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/salesorders/{id}/attachments":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"get":{"summary":"Read sales order attachments","description":"Read all attachments associated with a specific sales order.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderAttachment"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.attachment:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"post":{"parameters":[{"name":"Content-Disposition","in":"header","schema":{"type":"string","example":"filename=\"attachment.pdf\""}},{"name":"Content-Type","in":"header","required":true,"description":"The Content-Type for the attachment","schema":{"type":"string","example":"application/pdf"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"summary":"Add an attachment to a sales order","description":"Add a new attachment to a specific sales order. The filename should be specified in the `Content-Disposition` header, and the `Content-Type` header must reflect the MIME type of the attachment being uploaded. The file itself should be included in the request body, and should be less than 4 MB in size.","requestBody":{"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"multipart/form-data":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Newly created attachment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderAttachment"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"403":{"description":"Order is already invoiced, cannot add attachments","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.attachment:write"]}]}},"/salesorders/{id}/lines":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"},"description":"The unique identifier for the sales order, to which the sales order lines pertain."}],"get":{"summary":"Read sales order lines","description":"Read all lines associated with a specific sales order.","parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Line"}},"examples":{"SalesOrderLinesReadAllExample":{"$ref":"#/components/examples/SalesOrderLinesReadAllExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.line:read"]}]},"post":{"summary":"Create a sales order line","description":"Add a new line to a specific sales order.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineWithoutId"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Line"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequestError"},{"$ref":"#/components/schemas/ValidationError"}]}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.line:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/salesorders/{id}/lines/{lineId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"},"description":"The unique identifier for the sales order, to which all the sales order lines pertain."},{"name":"lineId","in":"path","required":true,"schema":{"type":"integer","format":"int32"},"description":"The unique identifier of the sales order line."}],"get":{"summary":"Read a sales order line by ID","description":"Read a specific line from a sales order by the line's ID.","parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Line"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.line:read"]}]},"patch":{"summary":"Update a sales order line","description":"Update the details of a specific line in a sales order.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Line"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Line"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequestError"},{"$ref":"#/components/schemas/ValidationError"}]}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.line:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete a sales order line","description":"Delete a specific line from a sales order identified by its unique sales order ID and line ID.","responses":{"204":{"description":"OK","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Sales order or sales order line not found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"409":{"description":"Conflict - The sales order line cannot be deleted, likely because it has already been invoiced or is in a status that does not allow deletion.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.invoicing.salesorder.line:delete"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/paymentmethods":{"get":{"security":[{"tfso":["api.invoicing.paymentmethod:read"]}],"summary":"List Payment Methods","description":"Retrieve a list of all payment methods that can be used when creating or updating a sales order in the Finago Office ERP system. This endpoint allows clients to access the available payment methods.","tags":["Paymentmethods"],"operationId":"getPaymentMethods","responses":{"200":{"description":"List of payment methods retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/me":{"get":{"summary":"Read profile","description":"Read information about the current profile. This endpoint is only available for access tokens that have the identityId claim.\n\nFinago Office is a multi-tenant application, where a personal login gives access to more than one organization and its people.\n\nHence, there exist \"identity\", \"organization\" and the organization’s \"people\".\n\n==Identity== → *Organization → *Person\n\n\u003e info\n\u003e Identity\n\u003e An `identity` is a personal user who logs into Finago Office. An `identity` will have one or more unique identifiers for the personal user, such as an email or a phone number\n\u003e An `identity` may or may not have access to one or more organizations through a person.\n\nFinago Office has a global identity pool where an identity may have access to all organizations available in Finago Office.\n","tags":["Profile"],"parameters":[{"name":"thumb","in":"query","description":"A flag variable to include a thumbnail image in the response.","schema":{"type":"boolean","default":false}},{"name":"bigthumb","in":"query","description":"A flag variable to include a larger thumbnail image in the response.","schema":{"type":"boolean","default":false}},{"name":"maxAge","in":"query","description":"Maximum age of the cached profile data in seconds.","schema":{"type":"integer","format":"int32"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileModel"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.me.profile:read"]}]}},"/me/identifiers":{"get":{"summary":"Read identifiers","description":"Read identifiers for a profile, where identifiers, such as an email and a phone, may or may not be verified.","tags":["Profile"],"parameters":[{"name":"type","in":"query","description":"The type of identifiers to retrieve.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Status of the identifier as per communication status type.","schema":{"$ref":"#/components/schemas/CommunicationStatusType"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IdentifierModel"}},"example":[{"id":"123e4567-e89b-12d3-a456-426614174002","type":"Email","value":"john.doe@example.com","status":"Confirmed"},{"id":"123e4567-e89b-12d3-a456-426614174003","type":"Phone","value":"+47-87654321","status":"Unconfirmed"}]}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.me.identifiers:read"]}]}},"/me/identifiers/{id}":{"get":{"summary":"Read an identifier by ID","description":"Read details of a specific identifier identified by its unique ID.","tags":["Profile"],"parameters":[{"name":"id","in":"path","required":true,"description":"A unique identifier for the identifier within Finago Office.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifierModel"},"example":{"id":"123e4567-e89b-12d3-a456-426614174002","type":"Email","value":"john.doe@example.com","status":"Confirmed"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.me.identifiers:read"]}]}},"/me/licenses":{"get":{"summary":"Read licenses","description":"Read all licenses for a profile. Receive in return the identifiers for an organization and the connected person within that company. This information can be used as a login hint to get an access token for operational work on behalf of the connected person.","tags":["Profile"],"operationId":"GetLicenses","parameters":[{"name":"organizationId","in":"query","description":"Identifier for the organization.","schema":{"type":"integer","format":"int64"}},{"name":"personId","in":"query","description":"Identifier for the connected person.","schema":{"type":"integer","format":"int32"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseModel"}},"example":[{"id":"123e4567-e89b-12d3-a456-426614174003","name":"ABC Corporation","organizationId":12345,"identityId":"123e4567-e89b-12d3-a456-426614174001","personId":67890},{"id":"123e4567-e89b-12d3-a456-426614174004","name":"XYZ Inc.","organizationId":78901,"identityId":"123e4567-e89b-12d3-a456-426614174002","personId":54321}]}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.me.license:read"]}]}},"/me/licenses/{id}/organization":{"get":{"summary":"Read an organization by license ID","description":"Read a summary of the organization connected to a license identified by its unique license ID. This summary provides more information than just the organization name, and is useful for looking up details about all connected licenses without authorization from other organizations with login hints.","tags":["Profile"],"parameters":[{"name":"id","in":"path","required":true,"description":"The unique identifier for the license.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationModel"},"example":{"id":"123e4567-e89b-12d3-a456-426614174004","name":"ABC Corporation","email":"contact@example.com"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.organization.information:read"]}]}},"/organization/information":{"get":{"summary":"Read organization","description":"Read information about the organization that the current profile is logged into. \n\nFinago Office is a multi-tenant application, where a personal login gives access to more than one organization and its people.\n\nHence, there exist \"identity\", \"organization\" and the organization’s \"people\".\n\nIdentity → ==*Organization== → *Person\n\n\u003e info\n\u003e Organization\n\u003e An `organization` is usually a legal entity based in a certain country. An organization will own all of its data such as customers, invoices, transactions, etc.\n\u003e An `organization` will have many people that may be employees, connections, etc.\n","tags":["Organization"],"operationId":"GetClient","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationModel1"},"example":{"id":12345,"name":"ABC Corporation","email":"contact@example.com","invoiceEmail":"invoices@example.com","address":{"street":"Hovedgata 1","city":"Baerum","postalArea":"Fornebu","postalCode":"0123","countrySubdivision":"Viken","countryCode":"NO"},"status":"Active","settings":{"currencyCode":"NOK"},"contact":{"name":"John Doe","phone":"+47-87654321","email":"john.doe@example.com","language":"en"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.organization.information:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/organization/people":{"get":{"summary":"Read people","description":"Read a list of all people under the organization.\n\nFinago Office is a multi-tenant application, where a personal login gives access to more than one organization and its people.\n\nHence, there exist \"identity\", \"organization\" and the organization’s \"people\".\n\nIdentity → *Organization → ==*Person==\n\n\u003e info\n\u003e People\n\u003e A `person` is owned by an `organization`, and will usually be an employee or an owner of the `organization`. \n\u003e A `person` may be connected to an `identity`. \n\u003e An `identity` connected to a `person` may have a certain role in an `organization`, that will result in a set of permissions called `scopes`.\n","tags":["Organization"],"parameters":[{"name":"personType","in":"query","description":"Type of person to filter by.","schema":{"$ref":"#/components/schemas/TfsoApiOrganizationModelsUserType"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"}},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadAllExample"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"}},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadAllExample"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"}},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadAllExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.organization.person:read"]}]}},"/organization/people/{id}":{"get":{"summary":"Read a person","description":"Read information about a single person identified by its unique ID.","tags":["Organization"],"parameters":[{"name":"id","in":"path","description":"A unique identifier for the person within Finago Office.","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"personType","in":"query","description":"Type of person to filter by.","schema":{"$ref":"#/components/schemas/TfsoApiOrganizationModelsUserType"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadOneExample"}}},"application/json":{"schema":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadOneExample"}}},"text/json":{"schema":{"$ref":"#/components/schemas/TfsoApiOrganizationUnitOfWorkModelsPersonModel"},"examples":{"PeoplerReadAllExample":{"$ref":"#/components/examples/PeopleReadOneExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.organization.person:read"]}]}},"/pricelists":{"get":{"summary":"Read pricelists","description":"Retrieve a list of all pricelists.","tags":["Pricelists"],"operationId":"GetPricelists","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Pricelist"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.pricelist:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/pricelists/{listId}":{"get":{"summary":"Read specific pricelist","description":"Retrieve a specific pricelist by ID.","tags":["Pricelists"],"operationId":"GetPricelist","parameters":[{"name":"listId","in":"path","required":true,"description":"The unique identifier of the pricelist","schema":{"type":"integer"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pricelist"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Pricelist not found.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.pricelist:read"]}]}},"/pricelists/{listId}/prices":{"get":{"summary":"Read pricelist prices","description":"Retrieve prices for products in a specific pricelist. Optionally filter by product IDs.","tags":["Pricelists"],"operationId":"GetPricelistPrices","parameters":[{"name":"listId","in":"path","required":true,"description":"The unique identifier of the pricelist","schema":{"type":"integer"}},{"name":"productIds","in":"query","required":false,"description":"Comma-separated list of product IDs and/or ranges of product IDs (using .. as separator) to filter prices","schema":{"type":"string"},"example":"1..10,20,42,123..137"},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PricelistPrice"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized. Missing or invalid bearer token.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"404":{"description":"Pricelist not found.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.pricelist:read"]}]}},"/productcategories":{"get":{"summary":"Read product categories","description":"Read a list of product categories.","tags":["ProductCategory"],"operationId":"GetCategories","responses":{"200":{"headers":{"link":{"description":"The \"link\" header includes information on where to find `first`, `previous` and `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Categories"},"examples":{"ProductCategoryReadAllResponseExample":{"$ref":"#/components/examples/ProductCategoryReadAllResponseExample"}}}}}},"security":[{"tfso":["api.product.category:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"post":{"summary":"Create a product category","description":"Create a new product category with specified attributes and receive the details of the newly created category in the response.","tags":["ProductCategory"],"operationId":"CreateCategory","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryPostRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.category:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/productcategories/{id}":{"parameters":[{"name":"id","in":"path","description":"A unique identifier for the product category within Finago Office ERP modules.","required":true,"schema":{"type":"integer","format":"int32","minimum":1},"example":12}],"get":{"summary":"Read a product category by ID","description":"Read details of a specific product category identified by its unique ID.","tags":["ProductCategory"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.category:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"patch":{"summary":"Update a product category","description":"Update details of a specific product category identified by its unique ID, and receive the updated details in return.","tags":["ProductCategory"],"operationId":"UpdateCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryPatchRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.category:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete a product category","description":"Delete a specific product category identified by its unique ID.","tags":["ProductCategory"],"operationId":"DeleteCategory","responses":{"204":{"description":"Success. No content","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.category:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/productunits":{"get":{"summary":"Read product units","description":"Read a list of available units of measurement for products.","tags":["ProductUnits"],"operationId":"GetUnits","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Units"},"examples":{"Units":{"$ref":"#/components/examples/Units"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.unit:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/products":{"get":{"summary":"Read products","description":"Read a list of products, including their details, with pagination, or a subset of products based on query parameters. Products may have different attributes such as name, description, price, and stock information. The endpoint supports various search criteria for filtering products based on specific attributes.","tags":["Products"],"operationId":"GetProducts","parameters":[{"in":"query","name":"page","description":"Specify the page number to fetch, defaults to 1.","schema":{"type":"integer","format":"int"},"example":1},{"in":"query","name":"limit","description":"Specify the number of items to fetch per page, defaults to 25.","schema":{"type":"integer","format":"int"},"example":25},{"in":"query","name":"productSearch","examples":{"name exact":{"value":"White shoe laces"},"name contains":{"value":"%shoe%"},"name startsWith":{"value":"White shoe%"},"name endsWith":{"value":"%laces"}},"description":"Perform a search in productNumber, name, and supplier's productNumber and name. Wildcards are allowed using '%'. '%' at the end returns 'starts with'. '%' at the beginning returns 'ends with'. '%' at both ends returns 'contains'.","schema":{"type":"string"}},{"name":"categoryIds","in":"query","description":"Searches for products belonging to specific categories. Multiple category IDs can be provided, separated by commas.","example":121518,"schema":{"type":"string"}},{"name":"supplierIds","in":"query","description":"Searches for products belonging to specific suppliers. Multiple supplier IDs can be provided, separated by commas.","example":135,"schema":{"type":"string"}},{"in":"query","name":"productNumber","description":"Searches for product number.","example":"1234","schema":{"type":"string"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"link":{"description":"The \"link\" header includes information on where to find `first`, `previous` and `next` page. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link","schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}},"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Products"},"examples":{"ProductReadAllResponseExample":{"$ref":"#/components/examples/ProductReadAllResponseExample"}}}}}},"security":[{"tfso":["api.product.product:read"]}]},"post":{"summary":"Create a product","description":"Create a new product record with specified attributes and receive the details of the newly created product in the response.\n","tags":["Products"],"operationId":"CreateProduct","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequestPost"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.product:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32","minimum":1},"example":123,"description":"A unique identifier for the product within Finago Office ERP-modules."}],"get":{"summary":"Read a product by ID","description":"Read details of a specific product identified by its unique ID.","tags":["Products"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.product:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"patch":{"summary":"Update a product","description":"Update details of a specific product identified by its unique product ID, and receive the updated details in return.\n","tags":["Products"],"operationId":"UpdateProduct","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequestPatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.product:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete a product","description":"Delete a specific product identified by its unique ID.","tags":["Products"],"operationId":"DeleteProduct","responses":{"204":{"description":"Success. No content","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.product:write"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/products/{id}/dimensions":{"get":{"summary":"Read product dimensions","description":"Read the dimensions of a product as set in the system.","operationId":"getProductDimensions","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":12,"description":"A unique identifier for the product within Finago Office ERP-modules."},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDimensionsResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.dimension:read"]}]}},"/products/{id}/dimensions/{dimensionId}":{"put":{"summary":"Update a product dimension","description":"Update a specific dimension-association of a product in the system.","operationId":"updateProductDimension","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":12,"description":"A unique identifier for the product within Finago Office ERP-modules."},{"name":"dimensionId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":1,"description":"A unique identifier for the dimension within Finago Office ERP modules."},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDimensionWrite"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDimensionsResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.dimension:write"]}]},"delete":{"summary":"Remove a product dimension","description":"Delete a specific dimension-association from a product in the system.","operationId":"deleteProductDimension","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":12,"description":"A unique identifier for the product within Finago Office ERP-modules."},{"name":"dimensionId","in":"path","required":true,"schema":{"type":"integer","minimum":1},"example":1,"description":"A unique identifier for the dimension within Finago Office ERP modules."},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content - the dimension was successfully deleted from the product.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.dimension:write"]}]}},"/products/{id}/salestypeOverrides":{"get":{"summary":"Get the sales type overrides for a product","operationId":"GetProductSalesTypeOverrides","tags":["Products"],"parameters":[{"name":"id","in":"path","description":"The ID of the product for which to retrieve sales type overrides","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sales type overrides retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSalesTypeOverridesResponse"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.salestype:read"]}]}},"/products/{id}/salestypeOverrides/{salesTypeId}":{"put":{"summary":"Create or update a sales type override for a product","operationId":"PutProductSalesTypeOverride","tags":["Products"],"parameters":[{"name":"id","in":"path","description":"The ID of the product for which to create or update a sales type override","required":true,"schema":{"type":"integer"}},{"name":"salesTypeId","in":"path","description":"The ID of the sales type for which to create or update a sales type override","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSalesTypeOverrideRequest"}}}},"responses":{"200":{"description":"Sales type override created or updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSalesTypeOverride"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}},"204":{"description":"Sales type override deleted successfully (or override did not exist)","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.salestype:write"]}]},"delete":{"summary":"Delete a sales type override for a product","operationId":"DeleteProductSalesTypeOverride","tags":["Products"],"parameters":[{"name":"id","in":"path","description":"The ID of the product for which to delete a sales type override","required":true,"schema":{"type":"integer"}},{"name":"salesTypeId","in":"path","description":"The ID of the sales type for which to delete a sales type override","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Sales type override deleted successfully (or override did not exist)","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.salestype:write"]}]}},"/salestypes":{"get":{"summary":"Read sales types","description":"Read a list of sales types available in the system.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesType"}},"examples":{"salesTypeListExample":{"$ref":"#/components/examples/SalesTypeListExample"}}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.salestype:read"]}],"parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}]}},"/salestypes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the sales type to retrieve.","schema":{"type":"integer","format":"int32"}}],"get":{"summary":"Read sales type by ID","description":"Read details of a specific sales type by its ID.","parameters":[{"in":"header","name":"Authorization","description":"Authorization header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesType"}}},"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"X-Trace-Id":{"schema":{"type":"string"}}}}},"security":[{"tfso":["api.product.salestype:read"]}]}}},"components":{"schemas":{"Account":{"type":"object","description":"Information about the account for which the balances belong to.","properties":{"id":{"type":"integer","description":"A unique identifier for the account within Finago Office accounting module.","example":1000001},"number":{"type":"integer","description":"The unique number that indicates which type of account it belongs to.","example":1900},"name":{"type":"string","description":"The human-readable name that describes the purpose or nature of the account.","example":"Cash, NOK"}}},"Type":{"type":"string","default":"Date","enum":["Date","Period"]},"KeepIncoming":{"type":"boolean","default":false},"DateFrom":{"type":"string","format":"date"},"DateTo":{"type":"string","format":"date"},"Periods":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}Z?(,\\d{4}-\\d{2}-\\d{2}Z?)*$"},"AggregationElement":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"balances":{"type":"array","description":"The monthly change in balance for an account during a specific period.","items":{"$ref":"#/components/schemas/AmountElement"}}}},"AmountElement":{"type":"object","properties":{"date":{"type":"string","description":"The date corresponding to the balance change.","format":"date","example":"2024-01-01"},"opening":{"type":"number","description":"The opening balance of the account for the specified period.","example":50000},"closing":{"type":"number","description":"The closing balance of the account for the specified period.","example":55000},"change":{"type":"number","description":"The change in balance for the account during the specified period.","example":5000}}},"Fiscal":{"type":"object","properties":{"startingDate":{"type":"string","format":"date"},"endingAt":{"type":"string","format":"date"}}},"Account1":{"type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the account within Finago Office accounting module.","example":1000001},"number":{"type":"integer","description":"The unique number that indicates which type of account it belongs to.","example":1900},"name":{"type":"string","description":"The human-readable name that describes the purpose or nature of the account.","example":"Cash, NOK"},"taxId":{"type":"integer","description":"The id of the tax code (see GET /taxes) associated with the account.","example":0}}},"Currencies":{"description":"List of currencies available within the Finago Office accounting module.","minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Currency"}},"Currency":{"type":"object","properties":{"code":{"type":"string","description":"The currency code used in transactions within the Finago Office.","example":"USD"},"rate":{"type":"number","description":"The exchange rate of the currency.","example":1.25}}},"DocumentInfo":{"type":"object","required":["documentId","contentType","downloadUrl"],"properties":{"documentId":{"type":"integer","description":"Identifier for the document","example":12345},"contentType":{"type":"string","description":"MIME type of the document. Currently only 'application/pdf' is returned.","example":"application/pdf"},"downloadUrl":{"type":"string","format":"uri","description":"URL to download the document, typically a presigned URL with limited validity","example":"https://attachment.api.24sevenoffice.com/download/abc123?signature=xyz"},"pages":{"type":"array","description":"List of pages in the document, if available. This may be used to display document content in client applications.","items":{"$ref":"#/components/schemas/DocumentPageInfo"}}}},"DocumentPageInfo":{"type":"object","required":["sequenceNumber","thumbnailUrl","previewUrl"],"properties":{"sequenceNumber":{"type":"integer","description":"Page number within the document","example":1},"thumbnailUrl":{"type":"string","format":"uri","description":"URL to a thumbnail image of the page suitable for quick display in lists or previews, typically a presigned URL with limited validity","example":"https://attachment.api.24sevenoffice.com/thumbnail/abc123?page=1\u0026signature=xyz"},"previewUrl":{"type":"string","format":"uri","description":"URL to a preview image of the page suitable for display in the main document viewer, typically a presigned URL with limited validity","example":"https://attachment.api.24sevenoffice.com/preview/abc123?page=1\u0026signature=xyz"}}},"AccountingPeriod":{"type":"object","description":"Details of a financial year/accounting period within the Finago Office accounting module.","properties":{"id":{"type":"string","description":"A unique identifier for the accounting period within Finago Office.","example":"3acda329-3074-4036-a1a2-499397dd6dc3"},"type":{"type":"string","enum":["Year","Period"],"description":"The type of accounting period, either \"Year\" for a full financial year or \"Period\" for a sub-period within a financial year.","example":"Year"},"startingDate":{"type":"string","description":"The first day of the financial year or accounting period.","example":"2023-01-01"},"endingDate":{"type":"string","description":"The last day of the financial year or accounting period.","example":"2023-12-31"}}},"TaxResponse":{"description":"A single tax code","type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the tax code within Finago Office ERP modules.","example":1},"number":{"type":"integer","description":"The tax code reference number visible for users.","example":1},"name":{"type":"string","description":"The name of the tax code.","example":"Standard VAT"},"rate":{"type":"number","description":"The tax rate percentage, expressed as a whole number. For example, a tax rate of 25% is represented as 25.","example":25}}},"Account2":{"type":"object","description":"Details of an account within the Finago Office accounting module to which the transaction line is posted.","properties":{"id":{"type":"integer","description":"A unique identifier for the account within Finago Office.","example":1000001},"number":{"type":"integer","description":"The unique number within the organization's chart of accounts that indicates which type of account the account belongs to.","example":1900},"name":{"type":"string","description":"The human-readable name that describes the purpose or nature of the account.","example":"Cash, NOK"}}},"Tax":{"type":"object","description":"Details of a tax used within Finago Office.","properties":{"id":{"type":"integer","description":"A unique identifier for the tax within Finago Office.","example":2001},"rate":{"type":"number","description":"The tax rate applied to the transaction line.","example":25}}},"Voucher":{"type":"object","description":"Details of the transaction within the Finago Office accounting module to which the transaction line pertains.\n\nNote: Many other Norway-based accounting systems refer to transactions as \"vouchers\".\n","properties":{"id":{"type":"string","description":"A unique identifier for the transaction within Finago Office accounting module.","example":"123e4567-e89b-12d3-a456-426614174002"},"number":{"type":"integer","description":"The unique number representing the transaction.","example":1010}}},"TransactionType":{"type":"object","description":"Details of a transaction type used within the Finago Office accounting module.","properties":{"id":{"type":"integer","description":"A unique identifier for the transaction type within Finago Office accounting module.","example":5001}}},"Customer":{"type":"object","description":"Details of a customer used within Finago Office CRM.","properties":{"id":{"type":"integer","description":"A unique identifier for the customer within Finago Office CRM.","example":6001}}},"Invoice":{"type":"object","description":"Details of an invoice used within Finago Office.","properties":{"number":{"type":"string","description":"The unique number representing the invoice.","example":"INV-2024-001"},"dueDate":{"type":"string","description":"The due date for the invoice.","format":"date","example":"2024-08-01"},"remittanceReference":{"type":"string","description":"The remittance reference for the invoice.","example":"OCR-123456789"}}},"Currency1":{"required":["rate"],"type":"object","description":"Details of the currency used within Finago Office.","properties":{"code":{"pattern":"^([A-Z]{3}|LOCAL)$","type":"string","format":"regex","description":"The currency code used in the transaction line.","example":"USD"},"rate":{"minimum":0,"exclusiveMinimum":true,"type":"number","description":"The exchange rate for the currency.","example":10}}},"Transactions":{"minItems":1,"type":"array","description":"A list of transaction lines.","items":{"$ref":"#/components/schemas/Transaction"}},"Transaction":{"required":["account","amount","date"],"type":"object","description":"Information about a single transaction line.","properties":{"id":{"type":"string","description":"A unique identifier for the transaction line within Finago Office accounting module.","example":"123e4567-e89b-12d3-a456-426614174001"},"transaction":{"$ref":"#/components/schemas/Voucher"},"account":{"$ref":"#/components/schemas/Account2"},"transactionType":{"$ref":"#/components/schemas/TransactionType"},"tax":{"$ref":"#/components/schemas/Tax"},"amount":{"type":"number","description":"The monetary amount for the transaction line.","example":1500},"currency":{"$ref":"#/components/schemas/Currency1"},"date":{"type":"string","description":"The date when the transaction line was posted.","format":"date","example":"2022-07-01"},"invoice":{"$ref":"#/components/schemas/Invoice"},"customer":{"$ref":"#/components/schemas/Customer"},"dimensions":{"type":"array","description":"A list of dimensions and dimension values associated with the transaction line, such as department or project. Included if `includeDimensions=true` is specified in the query parameters.","items":{"type":"object","required":["dimensionType","value","name"],"properties":{"dimensionType":{"type":"integer","description":"The type identifier for the dimension within Finago Office ERP modules.","example":1},"dimensionTypeName":{"type":"string","description":"The human-readable name for the dimension type.","example":"Project"},"value":{"type":"string","description":"The value (ie key) for the dimension.","example":"13"},"name":{"type":"string","description":"The display name associated with the value of the dimension.","example":"Project with ID 13"}},"additionalProperties":false}},"comment":{"type":"string","description":"A brief description of the transaction.","maxLength":75,"example":"Payment for services"},"periodDate":{"type":"string","description":"The accounting period date for the transaction line.","format":"date","example":"2022-07-31"},"documentId":{"type":"integer","description":"The ID of the Document attached to the transaction, if any.","example":41},"createdAt":{"type":"string","description":"A timestamp for when a record was created, in ISO 8601 format.","format":"date-time","example":"2022-01-01T18:00:00Z"},"modifiedAt":{"type":"string","description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.","format":"date-time","example":"2023-12-31T18:00:00Z"}}},"TransactionInput":{"type":"object","required":["transactionTypeNumber","date","lines"],"properties":{"transactionTypeNumber":{"type":"integer","description":"Type of transaction (as defined by the accounting system). Only types with number \u003e 0 are allowed (negative numbers are reserved for system transaction types). TransactionType controls which number-series is used for the transaction.","example":1,"minimum":1},"date":{"type":"string","format":"date","description":"Date of the transaction in ISO 8601 format - NB there must be a financial period open for this date. This may be overridden by individual transaction lines.\n","example":"2025-04-09"},"comment":{"type":"string","description":"General comment of the transaction. Will be applied to all lines unless overridden at line level.","maxLength":75,"example":"Invoice #12345"},"documentId":{"type":"integer","description":"Optional identifier (Document number) for a document/attachment associated with this transaction.","example":12345},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TransactionLine"},"description":"List of transaction lines. Each line must have an account number and an amount. All lines must balance to zero per date.","maxItems":1000}}},"TransactionLine":{"type":"object","required":["accountNumber","amount","tax"],"properties":{"accountNumber":{"type":"integer","example":1920,"description":"General ledger account number"},"amount":{"type":"number","example":1500,"description":"Total amount for this line (in stated currency, usually inclusive tax). Positive for debit, negative for credit. When tax-codes 81-89 are used, the amount is typically exclusive of tax (as the tax-amount is to be paid separately).\n"},"comment":{"type":"string","description":"Comment for this transaction line. If omitted, the comment from the parent transaction will be used.","maxLength":75,"example":"Payment for services rendered"},"date":{"type":"string","format":"date","description":"Date of the transaction line in ISO 8601 format if different from the parent transaction - NB there must be a financial period open for this date. If omitted, the date from the parent transaction will be used.\n","example":"2025-04-09"},"periodDate":{"type":"string","format":"date","description":"Tax-Period date for the transaction line in ISO 8601 format, if different from date (usually not)\n","example":"2025-04-01"},"currency":{"type":"object","description":"Optional currency information for the transaction line. If not set, the system default currency is used.","required":["code","rate"],"properties":{"code":{"type":"string","description":"ISO 4217 currency code (e.g. 'USD', 'EUR', 'SEK').","pattern":"^[A-Z]{3}$","example":"USD"},"rate":{"type":"number","description":"Exchange rate to the system base currency.  (Example: System Currency is NOK, line is in USD, rate is 10.50 means 1 USD = 10.50 NOK).","example":10.5,"exclusiveMinimum":0}}},"tax":{"$ref":"#/components/schemas/TransactionTax"},"dimensions":{"type":"array","description":"Optional dimensions for the entry. Each dimension must match a predefined key in the system.","items":{"type":"object","required":["dimensionType","value"],"properties":{"dimensionType":{"type":"integer","description":"The identifier for the dimension within 24SevenOffice ERP modules.","example":1},"value":{"type":"string","description":"Value of the dimension","example":"13"}}},"maxItems":10},"invoice":{"$ref":"#/components/schemas/TransactionLineInvoiceProps"}}},"TransactionTax":{"description":"Tax information for a transaction line. The tax code number must correspond to a valid tax code in the system (see `GET /taxes`). Use {\"code\":0} to indicate that no tax.","type":"object","required":["number"],"properties":{"number":{"type":"integer","description":"Tax code number as defined in the accounting system (see `GET /taxes`).","minimum":0,"example":1},"amount":{"type":"number","description":"Tax amount for this line. Positive for debit, negative for credit. If not set, the amount will be inferred based on the tax type.","example":300},"baseRate":{"type":"integer","description":"Base rate for the tax calculation. Applicable for partial deduction (\"forholdsmessig fradrag\"), otherwise don't set.","minimum":0,"maximum":100,"multipleOf":0.01},"specificationNumber":{"type":"integer","description":"Optional specification number for the tax type, if applicable."}},"example":{"number":1,"amount":300}},"TransactionLineInvoiceProps":{"type":"object","description":"Details of the invoice associated with the transaction, if applicable.","properties":{"dueDate":{"type":"string","format":"date","description":"Due date for the invoice related to the transaction line in ISO 8601 format, if applicable.","example":"2025-05-05"},"number":{"type":"string","description":"Invoice number for the invoice associated with the transaction line, if applicable.","maxLength":50,"example":"INV-12345"},"remittanceReference":{"type":"string","description":"The remittance reference (OCR number) for the invoice associated with the transaction line, if applicable.","maxLength":32,"example":"1234567890"},"bankAccount":{"type":"string","description":"Bank account number for the invoice associated with the transaction line, if applicable.","maxLength":50,"example":"1234.56.78901"}}},"TransactionCreatedResponse":{"type":"object","required":["transactionId"],"properties":{"transactionId":{"type":"string","example":"abc123","description":"Unique identifier assigned to the posted transaction"}}},"FileUploadRequest":{"type":"object","required":["contentType"],"properties":{"contentType":{"type":"string","description":"content type (MIME type) of the file being uploaded","example":"application/pdf"}}},"FileUploadResponse":{"type":"object","required":["uploadMethod","uploadUrl","fileId"],"properties":{"uploadMethod":{"type":"string","description":"HTTP method to use for uploading the file","example":"PUT"},"uploadUrl":{"type":"string","format":"uri","description":"Presigned URL to which the file should be uploaded, using {uploadMethod} as HTTP method","example":"https://attachment.api.24sevenoffice.com/upload/abc123?signature=xyz"},"fileId":{"type":"string","description":"Identifier for the file to be uploaded in the system","example":67890}}},"FileUploadStatusResponse":{"type":"object","required":["fileId","status"],"properties":{"fileId":{"type":"string","description":"Identifier for the file upload","example":67890},"status":{"type":"string","description":"Current status of the file upload (e.g., Pending, Completed, Failed)","example":"Completed"},"documentId":{"type":"integer","description":"Identifier of the document associated with the uploaded file, if completed","example":12345}}},"TransactionTypes":{"description":"List of transaction types available within the Finago Office accounting module.","minItems":1,"type":"array","items":{"$ref":"#/components/schemas/TransactionType1"}},"TransactionType1":{"description":"Information about a single transaction type within the Finago Office accounting module.","type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the transaction type within Finago Office accounting module.","example":5001},"number":{"type":"integer","description":"A unique number representing the transaction type.","example":1001},"name":{"type":"string","description":"A human-readable name of the transaction type.","example":"Sale"}}},"BankAccountResponse":{"description":"Response model for a bank account","type":"object","required":["id","number","bic","type","name","owner","createdAt","modifiedAt"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"A unique identifier for the bank account within Finago Office.","example":"123-456-789"}}},{"$ref":"#/components/schemas/BankAccountBase"},{"type":"object","properties":{"balance":{"$ref":"#/components/schemas/BankAccountBalance"},"createdAt":{"description":"A timestamp for when a record was created, in ISO 8601 format.","example":"2022-01-01T18:00:00.000Z","type":"string","format":"date-time"},"modifiedAt":{"description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format. The Bank Account Balance changes are not included here, as these are defined by a separate \"timestamp\" property for the `balance` object.","example":"2023-12-31T18:00:00.000Z","type":"string","format":"date-time"}}}]},"BankAccountBase":{"description":"Base bank account object","type":"object","properties":{"number":{"type":"string","description":"The account number of the bank account.","example":"90000000001"},"bic":{"type":"string","description":"The Business Identifier Codes (BIC) for the bank that manages the bank account.","example":"DNBANOKKXXX"},"type":{"type":"string","description":"The type of the bank account, which is one of the following:\n* `bban`: Basic Bank Account Number is a country-specific bank account number format.\n* `iban`: International Bank Account Number format.\n","enum":["bban","iban"],"example":"bban"},"name":{"type":"string","description":"A user-defined name of the bank account, as it is shown in Finago Office.","example":"ABC bank account"},"owner":{"type":"object","required":["name","organizationNumber","contact"],"description":"Details for the bank account owner.","properties":{"name":{"type":"string","description":"The company name of the bank account owner.","example":"ABC Corporation"},"organizationNumber":{"type":"string","description":"The organization number of the bank account owner.","example":"123456789"},"contact":{"type":"object","required":["name","email"],"description":"Details for the contact person for the bank account owner.","properties":{"name":{"type":"string","description":"The name of the contact person.","example":"John Doe"},"email":{"type":"string","format":"email","description":"The email of the contact person.","example":"doe@example.com"}}}}},"transactionType":{"description":"The transaction type within the Finago Office accounting module, used when posting bank transactions in the Finago Office bank module. Transaction types can be retrieved from the separate /transactiontypes endpoint.","type":"object","required":["number"],"properties":{"number":{"type":"integer","description":"A unique number representing the transaction type.","example":5}}},"ledgerAccount":{"type":"object","description":"The ledger account within the Finago Office accounting module that corresponds to this bank account. Accounts can be retrieved from the separate /accounts endpoint.","required":["number"],"properties":{"number":{"type":"integer","description":"The unique number that indicates which type of account it belongs to.","example":1920}}}}},"BankAccountBalance":{"description":"The balance of the bank account. The whole balance object is omitted if no balance is available.","type":"object","properties":{"amount":{"type":"number","description":"The amount of the balance.","example":1100},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the balance.","example":"2024-06-01T12:00:00.000Z"},"currency":{"type":"object","description":"The currency of the balance.\n","required":["code"],"properties":{"code":{"type":"string","description":"The currency code of the balance.","example":"NOK"}}}}},"BankAccountBalanceResponse":{"description":"Response model for a bank account balance","type":"object","allOf":[{"$ref":"#/components/schemas/BankAccountBalance"}]},"BankAccountRequestPost":{"description":"Request model for creating a new bank account","type":"object","required":["name","number","bic","type","owner"],"allOf":[{"$ref":"#/components/schemas/BankAccountBase"}]},"BankAccountBalanceRequestPost":{"description":"Request model for creating a new bank account balance","type":"object","required":["amount","timestamp","currency"],"allOf":[{"$ref":"#/components/schemas/BankAccountBalance"}]},"BankTransactionRequestPost":{"description":"Request Body for creating a new bank transaction","required":["type","bankTransactionReference","bankAccount","paymentReference","amount","date"],"allOf":[{"$ref":"#/components/schemas/BankTransactionBase"}]},"BankTransactionResponse":{"description":"A single bank transaction","required":["bankTransactionReference","type","bankAccount","paymentReference","amount","date","status","createdAt","modifiedAt"],"allOf":[{"$ref":"#/components/schemas/BankTransactionBase"},{"type":"object","properties":{"status":{"type":"string","description":"Status of the bank transaction, controlled by the backend and always returned in the API-responses. Possible values are the following:\n- `created`: The transaction has been created.\n- `closed`: The transaction has been closed in the bank reconciliation module.\n","example":"created","enum":["created","closed"]},"createdAt":{"description":"A timestamp for when a record was created, in ISO 8601 format.","example":"2024-06-01T18:00:00Z","type":"string","format":"date-time"},"modifiedAt":{"description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.","example":"2024-06-31T18:00:00Z","type":"string","format":"date-time"}}}]},"BankTransactionBase":{"description":"Base fields of bank transactions.","type":"object","properties":{"bankTransactionReference":{"type":"string","description":"Unique identifier for the bank transaction supplied by the bank that manages the bank account. It must be globally unique across all bank accounts for the client. A duplication warning is returned if this is not the case. Min 10 and max 130 characters.","example":"10001-987-654-321","nullable":false},"type":{"type":"string","description":"Direction of the payment. \"Inbound\" stands for an incoming payment. E.g. a payment of an invoice by a customer. \"Outbound\" is a payment originating from this bank account. E.g a debet card transaction, when paid for goods and services.","enum":["inbound","outbound"],"example":"outbound","nullable":false},"bankAccount":{"type":"object","description":"Details of the bank account involved in the transaction.","nullable":false,"required":["id"],"properties":{"id":{"type":"string","description":"A unique identifier for the bank account within Finago Office.","example":"123-456-789","nullable":false}}},"paymentReference":{"type":"object","description":"The payment reference must be one of the following types: text, ocr, invoiceRef.\n* `text`: The value is a free text reference.\n* `ocr`: The value is an structured OCR reference. KID number in Norway.\n* `invoiceRef`: The value is an invoice number.\n\nThe actual value of the reference is set in the `value` property.\n","required":["type","value"],"properties":{"type":{"type":"string","example":"text","nullable":false,"enum":["text","ocr","invoiceRef"]},"value":{"type":"string","description":"This must be a string of max 1000 characters.","example":"Payment for shipment AA-001.","nullable":false}}},"amount":{"type":"object","description":"Amount of the bank transaction.","required":["value","currency"],"properties":{"value":{"type":"number","description":"The amount in the currency specified. Must be a positive number.","example":1200,"nullable":false},"currency":{"type":"object","description":"The currency of the balance.\n","required":["code"],"properties":{"code":{"type":"string","description":"The currency code of the balance.","example":"NOK"}}}}},"date":{"type":"string","description":"Date of the transaction.","example":"2024-06-01","nullable":false},"fromBankAccount":{"type":"object","description":"The originating bank account for transactions. This is automatically set for outbound transactions, i.e. the property is always returned in the API responses for outbound transactions.","properties":{"number":{"type":"string","example":"123456789","description":"Number of the originating bank account for outbound transactions.","nullable":true},"type":{"type":"string","enum":["bban","iban"],"default":"bban","description":"Type of the originating bank account for outbound transactions.","example":"bban","nullable":true}}},"toBankAccount":{"type":"object","description":"The receiving bank account for transactions. This is automatically set for inbound transactions, i.e. the property is always returned in the API responses for inbound transactions.","properties":{"number":{"type":"string","description":"Number of the receiving bank account for inbound transactions.","example":"987654321","nullable":true},"type":{"type":"string","enum":["bban","iban"],"default":"bban","description":"Type of the receiving bank account for inbound transactions.","example":"bban","nullable":true}}},"bankTransactionCode":{"type":"object","description":"The bank transaction code is a structured code that identifies the type of a transaction. The code is structured in three levels: domain, family and subfamily.\n* The domain code is the highest level and is used to group the transaction codes into different domains.\n* The family code is used to group the transaction codes within a domain. \n* The subfamily code is used to group the transaction codes within a family.\n","properties":{"domainCode":{"type":"string","description":"Domain code of the bank transaction.","nullable":true,"example":"D001"},"familyCode":{"type":"string","description":"Family code of the bank transaction.","nullable":true,"example":"F002"},"subFamilyCode":{"type":"string","description":"Subfamily code of the bank transaction.","nullable":true,"example":"SF003"}}}}},"CustomerResponse":{"$ref":"#/components/schemas/CustomerProperties"},"CustomerPatchRequest":{"allOf":[{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","nullable":true,"description":"The first name of a person if the customer is a person.","example":"John"},"lastName":{"type":"string","nullable":true,"description":"The last name of a person if the customer is a person.","example":"Doe"}},"description":"The first and the last name of a customer if the customer is a person."},"name":{"type":"string","description":"A human-readable name or label for a customer, making it easily identifiable to users.","example":"ABC Corporation","nullable":true},"organizationNumber":{"type":"string","nullable":true,"description":"The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.","example":"123456789"}}},{"$ref":"#/components/schemas/CustomerSharedProperties"}]},"CustomerSharedProperties":{"type":"object","properties":{"externalReference":{"type":"string","nullable":true,"maxLength":100,"description":"An optional field for referencing the customer with an ID from an external system, like an ERP or invoicing system.","example":"EXT-12345"},"isSupplier":{"type":"boolean","nullable":false,"description":"A flag variable indicating whether the customer is also a supplier (true) or not (false).","example":false},"address":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitAddress"},"postal":{"$ref":"#/components/schemas/PostalAddress"},"billing":{"$ref":"#/components/schemas/BillingAddress"},"delivery":{"$ref":"#/components/schemas/DeliveryAddress"}},"description":"Addresses for the customer."},"email":{"type":"object","properties":{"contact":{"type":"string","nullable":true,"description":"The email address for contacting the customer.","example":"contact@example.com"},"billing":{"type":"string","nullable":true,"description":"The billing email address for the customer.","example":"billing@example.com"}},"description":"Email addresses for the customer."},"phone":{"type":"string","nullable":true,"description":"A phone number for contacting the customer.","example":"+47-12345678"},"mobilePhone":{"type":"string","nullable":true,"maxLength":25,"description":"A mobile phone number for contacting the customer.","example":"+47-98765432"}}},"CustomerPostRequest":{"description":"A new customer to be created in Finago Office CRM, either a company or a private person - decided by the `isCompany` flag.","oneOf":[{"$ref":"#/components/schemas/CompanyCustomerPostRequest"},{"$ref":"#/components/schemas/PersonCustomerPostRequest"}],"discriminator":{"propertyName":"isCompany","mapping":{"true":"#/components/schemas/CompanyCustomerPostRequest","false":"#/components/schemas/PersonCustomerPostRequest"}}},"CompanyCustomerPostRequest":{"description":"A new company customer to be created in Finago Office CRM.","allOf":[{"type":"object","required":["isCompany","name"],"properties":{"isCompany":{"type":"boolean","description":"Discriminator flag set to true - indicating that the customer is a company.","enum":[true]},"name":{"type":"string","description":"A human-readable name or label for a customer, making it easily identifiable to users."},"organizationNumber":{"type":"string","nullable":true,"description":"The organization number issued by authorities, like a VAT number, of the customer.","example":"123456789"}}},{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"A unique identifier for the customer within Finago Office CRM. This ID is used for reference and linking transactions to specific customers."}}},{"$ref":"#/components/schemas/CustomerSharedProperties"}]},"PersonCustomerPostRequest":{"description":"A new private person customer to be created in Finago Office CRM.","allOf":[{"type":"object","required":["isCompany","person"],"properties":{"isCompany":{"type":"boolean","description":"Discriminator flag set to false - indicating that the customer is a person.","enum":[false]},"person":{"type":"object","properties":{"firstName":{"type":"string","nullable":true,"description":"The first name of the person."},"lastName":{"type":"string","nullable":true,"description":"The last name of the person."}}}}},{"type":"object","properties":{"id":{"type":"number","nullable":true,"description":"A unique identifier for the customer within Finago Office CRM. This ID is used for reference and linking transactions to specific customers."}}},{"$ref":"#/components/schemas/CustomerSharedProperties"}]},"CustomerProperties":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"A unique identifier for the customer within Finago Office CRM. This ID is used for reference and linking transactions to specific customers.","example":12345},"name":{"type":"string","description":"A human-readable name or label for a customer, making it easily identifiable to users.","example":"ABC Corporation","nullable":true},"externalReference":{"type":"string","nullable":true,"maxLength":100,"description":"An optional field for referencing the customer with an ID from an external system, like an ERP or invoicing system.","example":"EXT-12345"},"pricelistId":{"type":"integer","description":"The ID of the pricelist associated with this customer for pricing.","example":1},"person":{"type":"object","properties":{"firstName":{"type":"string","nullable":true,"description":"The first name of a person if the customer is a person.","example":"John"},"lastName":{"type":"string","nullable":true,"description":"The last name of a person if the customer is a person.","example":"Doe"}},"description":"The first and the last name of a customer if the customer is a person."},"isCompany":{"type":"boolean","nullable":false,"description":"A flag variable indicating whether the customer is a company (true) or a person (false).","example":true},"isSupplier":{"type":"boolean","nullable":false,"description":"A flag variable indicating whether the customer is also a supplier (true) or not (false).","example":false},"organizationNumber":{"type":"string","nullable":true,"description":"The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.","example":"123456789"},"address":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitAddress"},"postal":{"$ref":"#/components/schemas/PostalAddress"},"billing":{"$ref":"#/components/schemas/BillingAddress"},"delivery":{"$ref":"#/components/schemas/DeliveryAddress"}},"description":"Addresses for the customer."},"email":{"type":"object","properties":{"contact":{"type":"string","nullable":true,"description":"The email address for contacting the customer.","example":"contact@example.com"},"billing":{"type":"string","nullable":true,"description":"The billing email address for the customer.","example":"billing@example.com"}},"description":"Email addresses for the customer."},"phone":{"type":"string","nullable":true,"description":"A phone number for contacting the customer.","example":"+47-12345678"},"mobilePhone":{"type":"string","nullable":true,"maxLength":25,"description":"A mobile phone number for contacting the customer.","example":"+47-98765432"},"createdAt":{"$ref":"#/components/schemas/createdAt"},"modifiedAt":{"$ref":"#/components/schemas/modifiedAt"}}},"AddressBasic":{"type":"object","properties":{"street":{"type":"string","nullable":true,"description":"The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.","example":"Hovedgata 1"},"postalCode":{"type":"string","nullable":true,"description":"The postal code for the address.","example":"0123"},"postalArea":{"type":"string","nullable":true,"description":"The postal area for the address.","example":"Fornebu"},"countrySubdivision":{"type":"string","nullable":true,"description":"The geographical subdivision for the address, like a county (\"fylke\" in Norway) or a state.","example":"Viken"}}},"VisitAddress":{"description":"The visiting address of the customer.","type":"object","allOf":[{"type":"object","properties":{"countryCode":{"type":"string","maxLength":2,"nullable":true,"description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO"}}},{"$ref":"#/components/schemas/AddressBasic"}]},"PostalAddress":{"type":"object","description":"The postal address of the customer.","allOf":[{"$ref":"#/components/schemas/AddressBasic"}]},"BillingAddress":{"type":"object","description":"The billing address of the customer.","allOf":[{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"The name for the address.","example":"ABC Corporation"},"countryCode":{"type":"string","maxLength":2,"nullable":true,"description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO"}}},{"$ref":"#/components/schemas/AddressBasic"}]},"DeliveryAddress":{"type":"object","description":"The delivery address of the customer.","allOf":[{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"The name for the address.","example":"ABC Corporation"},"countryCode":{"type":"string","maxLength":2,"nullable":true,"description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO"}}},{"$ref":"#/components/schemas/AddressBasic"}]},"createdAt":{"description":"A timestamp for when a record was created, in ISO 8601 format.","example":"2022-01-01 18:00:00.000Z","type":"string"},"modifiedAt":{"description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.","example":"2023-12-31 18:00:00.000Z","type":"string"},"SortInput":{"type":"string","pattern":"^(name|createdAt|modifiedAt|organizationNumber|id):(asc|desc)$"},"CustomerBankAccount":{"type":"object","required":["number","type","isDefault"],"properties":{"number":{"type":"string","maxLength":50,"pattern":"^[A-Z0-9-]+$","description":"Bank account number (uppercase letters, numbers, or dash only)"},"type":{"type":"string","enum":["bban","iban","bankgiro","plusgiro"],"description":"Type of bank account"},"isDefault":{"type":"boolean","description":"Whether this is the default bank account"},"name":{"type":"string","maxLength":50,"description":"Optional name for the bank account"},"countryCode":{"type":"string","maxLength":2,"description":"ISO country code"},"address":{"type":"string","maxLength":490,"description":"Bank address"},"bsc":{"type":"string","maxLength":50,"pattern":"^[A-Z]{5}[A-Z0-9]{1,12}$|^$","description":"Bank Sort Code"},"bic":{"type":"string","maxLength":20,"pattern":"^[A-Z]{6}[A-Z0-9]{2,5}$|^$","description":"Bank Identifier Code (SWIFT code)"}}},"Dimension":{"type":"object","required":["id","name"],"properties":{"id":{"description":"ID of the dimension type","type":"integer","example":1},"name":{"description":"Name of the dimension type","type":"string","maxLength":150,"example":"Project"}}},"DimensionElement":{"type":"object","required":["dimensionType","value","name"],"properties":{"dimensionType":{"description":"ID of the dimension type (ie 1=project, 2=department etc)","type":"integer","format":"int32","example":1},"value":{"description":"Value (id) of the dimension element","type":"string","example":"13"},"name":{"description":"Name of the dimension element","type":"string","maxLength":510,"example":"Project 13"}}},"SalesOrderRequestPost":{"allOf":[{"type":"object","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/Customer1"},{"type":"object","required":["id","name"]}]}}},{"$ref":"#/components/schemas/SalesOrderBasic"},{"$ref":"#/components/schemas/DimensionsObject"}]},"SalesOrderRequestPatch":{"allOf":[{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer1"}}},{"$ref":"#/components/schemas/SalesOrderBasic"},{"$ref":"#/components/schemas/DimensionsObject"}]},"SalesOrderExtended":{"allOf":[{"$ref":"#/components/schemas/SalesOrder"},{"$ref":"#/components/schemas/DimensionsObject"}]},"SalesOrder":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the sales order within Finago Office ERP.","example":1234}}},{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer1"}}},{"$ref":"#/components/schemas/SalesOrderBasic"},{"type":"object","properties":{"grossAmount":{"type":"number","description":"The total amount for the sales order, including taxes.","example":124.99},"netAmount":{"type":"number","description":"The total amount for the sales order, excluding taxes.","example":99.99},"taxAmount":{"type":"number","description":"The total tax amount for the sales order.","example":25}}}]},"SalesOrderBasic":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency2"},"status":{"type":"string","description":"Current status of the sales order.","enum":["Draft","Web","Proposal","Confirmed","Invoice","AdvanceInvoice","Inactive"],"example":"Invoice"},"deliveryCustomer":{"$ref":"#/components/schemas/DeliveryCustomer"},"deliveryDate":{"type":"string","format":"date","description":"The set delivery date for the sales order.","example":"2023-06-10"},"invoice":{"$ref":"#/components/schemas/Invoice1"},"accrual":{"$ref":"#/components/schemas/Accrual"},"date":{"type":"string","format":"date","description":"The date when the sales order was issued.","example":"2023-06-01"},"internalMemo":{"type":"string","maxLength":300,"description":"An internal memo for the sales order.","example":"Customer requested special packaging."},"memo":{"type":"string","description":"A memo or comments for the sales order.","example":"Urgent delivery."},"yourReference":{"type":"object","description":"Details of the contact person at the customer side who is the sales order's point of contact at the customer","properties":{"id":{"type":"number","description":"Identifier of the contact person. Used for reference only, as the 'name'-property contains the actual name of the contact person.","example":123},"name":{"type":"string","description":"The name of the person.","example":"John Doe"}}},"ourReference":{"type":"object","description":"Details of the person at your organization who is the sales order's point of contact within your organization. It should be one of the people provided by `/organization/people` endpoint.","properties":{"id":{"type":"number","description":"Identifier of the contact person (candidates provided by `/organization/people` endpoint).","example":123}}},"paymentMethod":{"type":"object","description":"Reference to the payment method used for the sales order. See GET /paymentmethods. Send with id set to null to remove the payment method from the sales order.","required":["id"],"properties":{"id":{"type":"integer","nullable":true,"description":"Identifier of the payment method. (Set to null to remove the payment method from the sales order).","example":123}}},"referenceNumber":{"type":"string","maxLength":50,"description":"A reference number for the sales order, like a purchase order number provided by the customer.","example":"PO12345"},"salesType":{"type":"object","description":"The sales type for the sales order.","properties":{"id":{"type":"integer","description":"The unique identifier for the sales type. A negative value stands for a system-defined ID.","example":-100}}},"createdAt":{"type":"string","format":"date-time","description":"A timestamp for when a record was created, in ISO 8601 format.","example":"2023-06-01T12:00:00Z"},"modifiedAt":{"type":"string","format":"date-time","description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.","example":"2023-06-02T15:30:00Z"}}},"DimensionsObject":{"type":"object","properties":{"dimensions":{"$ref":"#/components/schemas/Dimensions"}}},"Dimensions":{"type":"array","description":"A list of dimensions such as department or project.","items":{"$ref":"#/components/schemas/Dimension1"}},"Dimension1":{"type":"object","required":["dimensionType","value","name"],"properties":{"dimensionType":{"type":"integer","description":"The unique identifier for the dimension within Finago Office ERP modules.","example":1},"value":{"type":"string","description":"The value (ie key) for the dimension.","example":"13"},"name":{"type":"string","description":"The display name associated with the value of the dimension.","example":"Project with ID 13"}},"additionalProperties":false},"Invoice1":{"type":"object","description":"Details of an invoice associated with a sales order.","properties":{"number":{"type":"integer","description":"A unique number for the invoice within Finago Office ERP.","example":123,"format":"int32"},"date":{"type":"string","format":"date","description":"The date when the invoice was issued.","example":"2023-06-01"},"dueDate":{"type":"string","format":"date","description":"The due date by which the invoice must be paid.","example":"2023-06-15"},"distributionMethod":{"$ref":"#/components/schemas/DistributionMethod"},"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"},"remittanceReference":{"type":"string","description":"A reference number for the invoice used for remittance purposes, like \"KID\"-number in Norway, or OCR.","example":"ABC12345"},"transaction":{"type":"object","description":"Details of the transaction associated with the invoice.","properties":{"id":{"type":"string","format":"guid","description":"A unique identifier for the transaction within Finago Office ERP.","example":"63293496-884f-4358-b489-f641fe51cdaa"}}}}},"FixedDateTerms":{"description":"Due date is a specific date. NB: Only supported in new invoicing module","type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["FixedDate"]},"value":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"NumberOfDaysTerms":{"description":"Due date is calculated as a number of days after the invoice date.","type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["NumberOfDays"]},"value":{"type":"integer","minimum":0}}},"OutMonthPlusDaysTerms":{"description":"Due date is calculated as a number of days after the end of the invoicing month.","type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["OutMonthPlusDays"]},"value":{"type":"integer","minimum":0}}},"PaymentTerms":{"description":"Payment terms for an invoice, specified in one of three three different ways:  (NB: FixedDateTerms is only supported if client has activated the new invoicing module)","oneOf":[{"$ref":"#/components/schemas/NumberOfDaysTerms"},{"$ref":"#/components/schemas/OutMonthPlusDaysTerms"},{"$ref":"#/components/schemas/FixedDateTerms"}],"discriminator":{"propertyName":"type","mapping":{"NumberOfDays":"#/components/schemas/NumberOfDaysTerms","OutMonthPlusDays":"#/components/schemas/OutMonthPlusDaysTerms","FixedDate":"#/components/schemas/FixedDateTerms"}},"example":{"type":"NumberOfDays","value":14}},"Accrual":{"description":"Accrual information, empty object is ussed to reset accrual data","oneOf":[{"type":"object","properties":{},"additionalProperties":false},{"type":"object","required":["startDate","length"],"properties":{"startDate":{"type":"string","format":"date","description":"The start date of the accrual period.","example":"2023-06-01"},"length":{"type":"integer","minimum":1,"description":"The length of the accrual period in months.","example":12}},"additionalProperties":false}]},"DistributionMethod":{"type":"string","description":"The method used for distributing the sales order or invoice. Use \"\" for automatic selection based on client preferences. Values:\n  \"\" - Automatic\n  \"manualdistribution\" - Manual handling (no distribution)\n  \"efakturadistribution\" - eFaktura\n  \"ehfdistribution\" - EHF\n  \"postaldistribution\" - Autopost\n  \"printdistribution\" - Cloudprint\n  \"emaildistribution\" - Email\n","enum":["","manualdistribution","efakturadistribution","ehfdistribution","postaldistribution","printdistribution","emaildistribution"],"default":""},"Currency2":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Z]{3}$","description":"Three-letter currency code in uppercase (ISO 4217)","example":"USD"},"rate":{"type":"number","minimum":1e-10,"maximum":1000000000,"default":1}}},"Customer1":{"type":"object","description":"Customer details for the sales order. Note that the `customer` object for the `/salesOrders` endpoint is not the same as the customer that can be retrieved from the `/customers` endpoint, even though both share the same ID reference and their schemas are similar. The `customer` object in the context of `/salesOrders` contains the customer details as they were at the time the sales order was created. In contrast, the `/customers` endpoint always provides the latest state values for the customer properties.","properties":{"id":{"type":"integer","description":"A unique identifier for the customer within Finago Office CRM.","example":12345},"organizationNumber":{"type":"string","description":"The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.","example":"123456789","maxLength":20},"invoiceEmailAddresses":{"type":"array","description":"A list of email addresses to which the invoice should be sent.","items":{"type":"string","format":"email"}},"gln":{"type":"string","description":"The Global Location Number (GLN) for the customer.","example":"1234567890123","minLength":13,"maxLength":13},"name":{"type":"string","description":"The customer name as it appears on the sales order and an invoice associated with the sales order.","example":"ABC Corporation","maxLength":200},"street":{"type":"string","description":"The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.","example":"Hovedgata 1","maxLength":250},"postalCode":{"type":"string","description":"The postal code for the address.","example":"0123","maxLength":50},"postalArea":{"type":"string","description":"The postal area for the address.","example":"Fornebu","maxLength":50},"city":{"type":"string","description":"The city for the address.","example":"Fornebu","maxLength":50},"countrySubdivision":{"type":"string","description":"The geographical subdivision for the address, like a county (\"fylke\" in Norway) or a state.","example":"Viken","maxLength":50},"countryCode":{"type":"string","description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO","maxLength":2}}},"DeliveryCustomer":{"type":"object","description":"Delivery details for the sales order.","properties":{"id":{"type":"integer","description":"A unique identifier for the customer within Finago Office CRM.","example":12345},"name":{"type":"string","description":"A human-readable name or label for a customer, making it easily identifiable to users.","example":"ABC Corporation","maxLength":250},"street":{"type":"string","description":"The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.","example":"Hovedgata 1","maxLength":250},"postalCode":{"type":"string","description":"The postal code for the address.","example":"0123","maxLength":16},"postalArea":{"type":"string","description":"The postal area for the address.","example":"Fornebu","maxLength":200},"city":{"type":"string","description":"The city name for the address.","example":"Fornebu","maxLength":50},"countrySubdivision":{"type":"string","description":"The geographical subdivision for the address, like a county (\"fylke\" in Norway) or a state.","example":"Viken","maxLength":100},"countryCode":{"type":"string","description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO","maxLength":2}}},"LineWithoutId":{"type":"object","description":"A line item with its details in a sales order. The line item can be either a product or a text entry.","properties":{"type":{"type":"string","enum":["product","text"],"description":"A specification for the type of the line item, whether this is a product or a text entry.","example":"product"},"product":{"$ref":"#/components/schemas/Product"},"description":{"type":"string","minLength":1,"maxLength":300,"description":"A description for the line item.","example":"Leather handbag with adjustable strap."},"quantity":{"type":"number","description":"The quantity of the product in the line item.","example":2},"price":{"type":"number","description":"The price of a single unit of the product in the line item.","example":49.99},"costPrice":{"type":"number","nullable":true,"description":"The cost of buying a single unit of the product from the supplier.","example":50,"multipleOf":0.0001,"maximum":999999999999.9999},"discountRate":{"type":"number","minimum":0,"maximum":100,"description":"The discount rate applied to the line item, expressed as a whole number. For example, a discount rate of 10% is represented as 10.","example":10},"tax":{"type":"object","description":"Details for the tax applied to the line item.","properties":{"id":{"type":"integer","description":"A unique identifier for the tax code within Finago Office ERP modules, associated with the line item.","example":1},"number":{"type":"integer","format":"int32","description":"The tax code reference number visible for users.","example":1},"rate":{"type":"number","minimum":0,"maximum":100,"description":"The tax rate percentage, expressed as a whole number. For example, a tax rate of 25% is represented as 25.","example":25}}},"account":{"type":"object","description":"Details for the account to which the sale is posted.","properties":{"id":{"type":"integer","description":"A unique identifier for the account within Finago Office accounting module.","example":200001},"number":{"type":"integer","format":"int32","description":"The unique number that indicates which type of account it belongs to.","example":1500},"name":{"type":"string","maxLength":75,"description":"The human-readable name that describes the purpose or nature of the account.","example":"Accounts Receivable"}}},"isHidden":{"deprecated":true,"type":"boolean","description":"An optional flag for the old invoicing module, indicating whether the line item is hidden on the generated PDF-invoice. NB! Ignored in new module. NB! Do not use for PEPOL/EHF-distributed invoices.","default":false},"dimensions":{"$ref":"#/components/schemas/Dimensions"},"accrual":{"$ref":"#/components/schemas/Accrual"}},"additionalProperties":false},"Line":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier for the sales order line item within Finago Office ERP.","example":123456789}}},{"$ref":"#/components/schemas/LineWithoutId"}]},"Product":{"type":"object","description":"Product details, if the line item type is 'product'. Note that the `product` object for the `/salesorders/{id}/lines` endpoint is not the same as the product that can be retrieved from the `/products` endpoint, even though both share the same ID reference and their schemas are similar. The `product` object in the context of `/salesorders/{id}/lines` contains the product details as they were at the time the sales order line item was created. In contrast, the `/products` endpoint always provides the latest state values for the product properties.","properties":{"id":{"type":"integer","description":"A unique identifier for the product within Finago Office ERP-modules.","example":101},"number":{"type":"string","description":"The product number assigned to the product. Read-only property (ignored if set in POST/PATCH requests)","example":"PROD-001","maxLength":100}}},"SalesOrderAttachment":{"type":"object","description":"Details of an attachment associated with a sales order.","properties":{"fileId":{"type":"string","description":"The unique identifier for the file associated with the attachment.","example":"file-1234567890"},"orderId":{"type":"integer","description":"The unique identifier for the sales order to which the attachment belongs.","example":1234},"fileName":{"type":"string","description":"The name of the attached file.","example":"attachment.pdf"},"mediaType":{"type":"string","description":"The media type (MIME type) of the attached file.","example":"application/pdf"},"size":{"type":"integer","format":"int64","description":"The size of the attached file in bytes.","example":2048000},"timestamp":{"type":"string","format":"date-time","description":"A timestamp for when the attachment was created, in ISO 8601 format.","example":"2023-06-01T12:00:00Z"},"tags":{"type":"array","items":{"type":"string","description":"Tags associated with the attachment for categorization or search purposes.","example":["invoice","urgent"]}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}}},"trackingId":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"error":{"type":"object","description":"Validation error details.","properties":{"name":{"type":"string","description":"The name for the error.","enum":["ValidationError"],"default":"ValidationError"},"payload":{"type":"object","description":"The payload for the validation error.","properties":{"validationErrors":{"type":"array","description":"A list of validation errors.","items":{"type":"object","properties":{"path":{"type":"string","description":"A path for the invalid field.","example":"customer.name"},"keyword":{"type":"string","description":"A validation keyword.","example":"required"}}}}}}}},"trackingId":{"type":"string","description":"A tracking identifier for the validation error.","example":"def456"}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"object","description":"Bad request error details.","properties":{"name":{"type":"string","description":"The name for the error.","enum":["BadRequestError"],"default":"BadRequestError"},"payload":{"type":"object","description":"The payload for the bad request error.","properties":{"errors":{"type":"array","description":"A list of errors.","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of the error.","enum":["DepartmentMissing","ProjectMissing","NoLines"],"example":"NoLines"},"message":{"type":"string","description":"An error message.","example":"No lines in the sales order"},"arguments":{"type":"array","description":"Arguments for the error message.","items":{"type":"string","example":"lineItems"}}}}}}}}},"trackingId":{"type":"string","description":"A tracking identifier for the bad request error.","example":"ghi789"}}},"PaymentMethod":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","description":"Unique identifier for the payment method"},"name":{"type":"string","description":"Display name of the payment method"},"account":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the account associated with the payment method"}}}}},"ProfileModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"The unique identifier for the profile.","example":"123e4567-e89b-12d3-a456-426614174001"},"firstName":{"type":"string","nullable":true,"description":"The first name of the user.","example":"John"},"lastName":{"type":"string","nullable":true,"description":"The last name of the user.","example":"Doe"},"timeZone":{"type":"string","nullable":true,"description":"The time zone of the user.","example":"Europe/Oslo"},"countryCode":{"type":"string","nullable":true,"description":"The two-letter country code for the user, as in ISO 3166-1 alpha-2 standard.","example":"NO"},"language":{"type":"string","nullable":true,"description":"The language preference of the user.","example":"en"},"culture":{"type":"string","nullable":true,"description":"The culture setting of the user.","example":"en-US"}},"additionalProperties":false},"CommunicationStatusType":{"enum":["Unconfirmed","Confirmed"],"type":"string"},"IdentifierModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"The unique identifier for the identifier.","example":"123e4567-e89b-12d3-a456-426614174002"},"type":{"type":"string","nullable":true,"description":"The type of the identifier.","example":"Email"},"value":{"type":"string","nullable":true,"description":"The value of the identifier.","example":"john.doe@example.com"},"status":{"$ref":"#/components/schemas/CommunicationStatusType","description":"The status of the identifier as per communication status type.","example":"Confirmed"}},"additionalProperties":false},"LicenseModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"The unique identifier for the license.","example":"123e4567-e89b-12d3-a456-426614174003"},"name":{"type":"string","nullable":true,"description":"The name of the organization.","example":"ABC Corporation"},"organizationId":{"type":"integer","format":"int64","nullable":true,"description":"The identifier for the organization.","example":12345},"identityId":{"type":"string","format":"uuid","nullable":true,"description":"The identifier for the connected person's identity.","example":"123e4567-e89b-12d3-a456-426614174001"},"personId":{"type":"integer","format":"int32","nullable":true,"description":"The identifier for the connected person.","example":67890}},"additionalProperties":false},"OrganizationModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"The unique identifier for the organization.","example":"123e4567-e89b-12d3-a456-426614174004"},"name":{"type":"string","description":"The name of the organization.","example":"ABC Corporation"},"email":{"type":"string","description":"The email address of the organization.","example":"contact@example.com"}},"additionalProperties":false},"AddressModel":{"type":"object","description":"The address of the organization.","properties":{"street":{"type":"string","nullable":true,"description":"The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.","example":"Hovedgata 1"},"city":{"type":"string","nullable":true,"description":"The city for the address.","example":"Baerum"},"postalArea":{"type":"string","nullable":true,"description":"The postal area for the address.","example":"Fornebu"},"postalCode":{"type":"string","nullable":true,"description":"The postal code for the address.","example":"0123"},"countrySubdivision":{"type":"string","nullable":true,"description":"The geographical subdivision for the address, like a county (\"fylke\" in Norway) or a state.","example":"Viken"},"countryCode":{"type":"string","nullable":true,"description":"The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.","example":"NO"}},"additionalProperties":false},"ClientContactModel":{"description":"Contact information for the organization.","type":"object","properties":{"name":{"type":"string","nullable":true,"description":"The name of the organization's contact person.","example":"John Doe"},"phone":{"type":"string","nullable":true,"description":"The phone number for contacting the organization's contact person.","example":"+47-12345678"},"email":{"type":"string","nullable":true,"description":"The email address for contacting the organization's contact person.","example":"john.doe@example.com"},"language":{"type":"string","nullable":true,"description":"The contact person's language setting.","example":"en"}},"additionalProperties":false},"ClientStateType":{"description":"The state of the organization.","enum":["Unknown","Inactive","Active"],"type":"string"},"OrganizationModel1":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"description":"The unique identifier for the organization within Finago Office.","example":12345},"name":{"type":"string","nullable":true,"description":"The name of the organization.","example":"ABC Corporation"},"email":{"type":"string","nullable":true,"description":"The email address of the organization.","example":"contact@example.com"},"invoiceEmail":{"type":"string","nullable":true,"description":"The email address for invoices.","example":"invoices@example.com"},"address":{"$ref":"#/components/schemas/AddressModel"},"status":{"$ref":"#/components/schemas/ClientStateType"},"settings":{"$ref":"#/components/schemas/OrganizationSettingsModel"},"contact":{"$ref":"#/components/schemas/ClientContactModel"}},"additionalProperties":false},"OrganizationSettingsModel":{"description":"Settings for the organization.","type":"object","properties":{"currencyCode":{"type":"string","nullable":true,"description":"The currency code for the organization.","example":"USD"}},"additionalProperties":false},"TfsoApiOrganizationModelsUserType":{"enum":["Organization","External","Basic","Client"],"type":"string"},"TfsoApiOrganizationUnitOfWorkModelsPersonModel":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The unique identifier for the person within Finago Office.","example":123},"identityId":{"type":"string","format":"uuid","nullable":true,"description":"The identifier for the connected identity.","example":"123e4567-e89b-12d3-a456-426614174001"},"firstName":{"type":"string","nullable":true,"description":"The first name of the person.","example":"John"},"lastName":{"type":"string","nullable":true,"description":"The last name of the person.","example":"Doe"},"personType":{"$ref":"#/components/schemas/TfsoApiOrganizationModelsUserType","description":"The type of the person.","example":"Organization"},"hasLicense":{"type":"boolean","description":"A flag variable indicating whether the person has a license.","example":true}},"additionalProperties":false},"Pricelist":{"type":"object","required":["id","name","currencyCode","isInclusiveTax"],"properties":{"id":{"type":"integer","description":"Unique identifier of the pricelist","example":2},"name":{"type":"string","description":"Name of the pricelist","example":"Price 2"},"description":{"type":"string","nullable":true,"description":"Optional description of the pricelist"},"currencyCode":{"type":"string","description":"Currency code (e.g., LOCAL, USD, EUR)","example":"LOCAL"},"isInclusiveTax":{"type":"boolean","description":"Whether prices include tax","example":false}}},"PricelistPrice":{"type":"object","required":["productId","price"],"properties":{"productId":{"type":"integer","description":"Product identifier","example":123},"price":{"type":"number","format":"float","description":"Price for the product in this pricelist","example":99.99}}},"Categories":{"description":"List of product categories","type":"array","items":{"$ref":"#/components/schemas/CategoryResponse"}},"CategoryResponse":{"description":"A single product category","allOf":[{"type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the product category within Finago Office ERP modules.","example":12}}},{"$ref":"#/components/schemas/CategoryBase"},{"type":"object","properties":{"modifiedAt":{"$ref":"#/components/schemas/ModifiedAt"}}}]},"CategoryPostRequest":{"description":"Request body for creating a product category","required":["name"],"allOf":[{"$ref":"#/components/schemas/CategoryBase"}]},"CategoryPatchRequest":{"description":"Request body for updating a product category","allOf":[{"$ref":"#/components/schemas/CategoryBase"}]},"CategoryBase":{"description":"Category base fields","type":"object","properties":{"alternativeReference":{"example":"dk-45-34","type":"string","description":"An alternative user-defined reference for the category.","nullable":false},"name":{"example":"Shoe accessories","type":"string","description":"The name of the category."},"parentId":{"example":0,"description":"A reference to the ID of the parent category.","type":"number","default":0}}},"ModifiedAt":{"description":"A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.","example":"2023-12-31 18:00:00.000Z","type":"string"},"Units":{"description":"List of product units of measurement.","type":"array","items":{"$ref":"#/components/schemas/UnitsResponse"}},"UnitsResponse":{"description":"A single unit of measurement.","type":"object","properties":{"id":{"type":"number","description":"The ID of the unit of measurement.","nullable":true,"example":2},"name":{"type":"string","description":"The name of the unit of measurement.","nullable":true,"example":"Meter"},"symbol":{"type":"string","description":"The symbol of the unit of measurement.","nullable":true,"example":"m"}}},"Products":{"description":"List of products","type":"array","items":{"$ref":"#/components/schemas/ProductResponse"}},"ProductResponse":{"description":"A single product","allOf":[{"type":"object","properties":{"id":{"type":"integer","nullable":false,"example":123,"description":"A unique identifier for the product within Finago Office ERP-modules."}}},{"$ref":"#/components/schemas/ProductBase"},{"type":"object","properties":{"units":{"allOf":[{},{"$ref":"#/components/schemas/UnitsResponse1"}]},"category":{"$ref":"#/components/schemas/CategoryResponse1"},"supplier":{"$ref":"#/components/schemas/SupplierResponse"},"createdAt":{"$ref":"#/components/schemas/CreatedAt"},"modifiedAt":{"$ref":"#/components/schemas/ModifiedAt"}}}]},"ProductRequestPost":{"description":"Request Body for creating a new product","required":["name","category"],"allOf":[{"$ref":"#/components/schemas/ProductBase"},{"type":"object","properties":{"units":{"allOf":[{},{"$ref":"#/components/schemas/UnitsRequest"}]},"category":{"allOf":[{"required":["id"]},{"$ref":"#/components/schemas/CategoryRequest"}]},"supplier":{"$ref":"#/components/schemas/SupplierRequest"}}}]},"ProductRequestPatch":{"description":"Request Body for updating an existing product","allOf":[{"$ref":"#/components/schemas/ProductBase"},{"type":"object","properties":{"units":{"allOf":[{},{"$ref":"#/components/schemas/UnitsRequest"}]},"category":{"$ref":"#/components/schemas/CategoryRequest"},"supplier":{"$ref":"#/components/schemas/SupplierRequest"}}}]},"ProductBase":{"description":"Base fields of products.","type":"object","properties":{"name":{"type":"string","description":"The name of the product.","maxLength":150,"example":"White shoe laces"},"number":{"type":"string","description":"The alternative user-defined product number.","nullable":true,"example":"SH-1234567","maxLength":100},"type":{"type":"string","enum":["default","structure"],"description":"Specifies whether the product is defined as a regular or structure product.","example":"default","default":"default"},"status":{"type":"string","enum":["active","inactive"],"description":"Specifies whether the product's status is active or inactive (expired).","example":"active","default":"active"},"description":{"type":"string","description":"The description of the product.","maxLength":500,"example":"1 meter long shoe laces - white","nullable":true},"costPrice":{"type":"number","nullable":true,"description":"The cost of buying the product from the supplier.","example":50,"default":0},"salesPrice":{"type":"number","description":"The selling price of the product.","nullable":true,"example":400,"default":0},"indirectCost":{"type":"number","nullable":true,"description":"The sum of indirect costs related to the product.","example":12.77,"default":0},"webshopEnabled":{"type":"boolean","description":"A flag variable set to true if the product is enabled for webshop sales.","example":true},"stock":{"type":"object","description":"Stock information for the product.","properties":{"isManaged":{"type":"boolean","description":"A flag variable indicating whether a product should handle adjusting product quantity.","nullable":false,"default":false,"example":true},"quantity":{"type":"number","description":"The quantity of products that are in stock.","nullable":false,"example":146,"default":0},"location":{"type":"string","description":"The location identifier for the product, like a shelf or a facility number for inventory management.","nullable":true,"example":"A-313"}}},"ean":{"type":"string","maxLength":14,"description":"The product's GTIN - Usually a 13-digit European Article Number (EAN), but can also be one of the other GTIN formats.","nullable":true,"example":"0123456789000"},"eanAlternative":{"type":"string","maxLength":25,"description":"An alternative article number field, supporting up to 25 digits.","nullable":true,"example":"0123456789012345678901234"},"supplierProduct":{"type":"object","description":"Collection of properties related to the supplier's product.","properties":{"itemCode":{"type":"string","maxLength":50,"description":"The item code of the supplier product.","nullable":true,"example":"T1234"},"number":{"type":"string","maxLength":50,"description":"The item number of the supplier product.","nullable":true,"example":"1234"},"name":{"type":"string","maxLength":250,"description":"The name of the supplier product.","nullable":true,"example":"Shoe laces, white, 1m"},"price":{"type":"number","description":"The price of the supplier product.","nullable":true,"example":10.5}}}}},"CategoryResponse1":{"type":"object","description":"Information about the category to which the product belongs.","properties":{"id":{"type":"integer","description":"A reference by ID to the category the product belongs to. Product categories can be retrieved from the separate `/productcategories` endpoint.","example":12},"name":{"type":"string","description":"The category that the product belongs to.","example":"Shoe accessories"}}},"CategoryRequest":{"type":"object","description":"Information about the category to which the product belongs.","properties":{"id":{"type":"integer","description":"A reference by ID to the category the product belongs to. Product categories can be retrieved from the separate `/productcategories` endpoint.","example":12}}},"SupplierRequest":{"type":"object","description":"Information about the supplier of the product.","properties":{"id":{"type":"number","description":"The ID of the supplier. Product suppliers can be retrieved from the separate `/customers` endpoint (suppliers are customers with a flag variable \"isSupplier\" set to \"true\").","nullable":true,"example":67890}}},"SupplierResponse":{"type":"object","description":"Information about the supplier of the product.","properties":{"id":{"type":"number","description":"The ID of the supplier. Product suppliers can be retrieved from the separate `/customers` endpoint (suppliers are customers with a flag variable \"isSupplier\" set to \"true\").","nullable":true,"example":67890},"name":{"type":"string","description":"The name of the supplier.","nullable":true,"example":"XYZ Inc."}}},"UnitsRequest":{"type":"object","description":"Information about the units of measurement for the product.","properties":{"id":{"type":"number","description":"The ID of the units of measurement. Product units can be retrieved from the separate `/productunits` endpoint.","nullable":true,"example":2}}},"UnitsResponse1":{"type":"object","description":"Information about the units of measurement for the product.","properties":{"id":{"type":"number","description":"The ID of the units of measurement. Product units can be retrieved from the separate `/productunits` endpoint.","nullable":true,"example":2},"name":{"type":"string","description":"The name of the units of measurement.","nullable":true,"example":"Meter"},"symbol":{"type":"string","description":"The symbol of the units of measurement.","nullable":true,"example":"m"}}},"CreatedAt":{"description":"A timestamp for when a record was created, in ISO 8601 format.","example":"2022-01-01 18:00:00.000Z","type":"string"},"ProductDimensionsResponse":{"type":"array","description":"A list of dimensions of a product as set in the system","items":{"$ref":"#/components/schemas/ProductDimensionRead"}},"ProductDimensionRead":{"type":"object","required":["dimensionType","dimensionTypeName","value","name"],"properties":{"dimensionType":{"type":"integer","description":"The unique identifier for the dimension within Finago Office ERP modules.","example":1},"dimensionTypeName":{"type":"string","description":"The display name of the dimension.","example":"Project"},"value":{"type":"string","description":"The value (ie key) for the dimension.","example":"13"},"name":{"type":"string","description":"The display name associated with the value of the dimension.","example":"Project with ID 13"}},"additionalProperties":false},"ProductDimensionWrite":{"type":"object","required":["value"],"properties":{"value":{"type":"string","description":"The value (ie key) for the dimension.","example":"13"}},"additionalProperties":false},"ProductSalesTypeOverridesResponse":{"description":"List of sales type overrides applied for a product (empty list if no overrides exist)","type":"array","items":{"$ref":"#/components/schemas/ProductSalesTypeOverride"}},"ProductSalesTypeOverride":{"type":"object","description":"An override of the default account number for a sales type on a specific product","required":["productId","salesTypeId","accountNumber"],"properties":{"productId":{"type":"integer","description":"The id of the product for which the override applies (see GET /products/{id})"},"salesTypeId":{"type":"integer","description":"The id of the sales type for which the override applies (see GET /salestypes/{id})"},"accountNumber":{"type":"integer","description":"The account number that should be used instead of the default account number for the sales type"}},"additionalProperties":false},"ProductSalesTypeOverrideRequest":{"type":"object","description":"Request body for creating or updating a product sales type override","required":["accountNumber"],"properties":{"accountNumber":{"type":"integer","nullable":true,"description":"The account number that should be used instead of the default account number for the sales type (set to null to remove the override)"}},"additionalProperties":false},"SalesType":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the sales type.","example":1},"name":{"type":"string","description":"The name of the sales type.","example":"Product Sales"},"account":{"type":"object","description":"The associated account within the Finago Office accounting module for this sales type.","properties":{"id":{"type":"integer","description":"A unique identifier for the account within Finago Office accounting module.","example":2000001}}}}}},"parameters":{"customerId":{"name":"customerId","in":"path","required":true,"description":"A unique identifier for the customer within Finago Office CRM.","schema":{"type":"integer","format":"int32"}}},"examples":{"AccountBalancesReadAllResponseExample":{"value":[{"account":{"id":1000001,"number":1900,"name":"Cash, NOK"},"balances":[{"date":"2024-01-01","opening":50000,"closing":55000,"change":5000},{"date":"2024-02-01","opening":55000,"closing":60000,"change":5000}]},{"account":{"id":1000002,"number":1920,"name":"Bank Account"},"balances":[{"date":"2024-01-01","opening":80000,"closing":85000,"change":5000},{"date":"2024-02-01","opening":85000,"closing":90000,"change":5000}]},{"account":{"id":2000001,"number":1500,"name":"Accounts Receivable"},"balances":[{"date":"2024-01-01","opening":100000,"closing":110000,"change":10000},{"date":"2024-02-01","opening":110000,"closing":120000,"change":10000}]}]},"AccountReadAllResponseExample":{"value":[{"id":1000001,"number":1900,"name":"Cash, NOK","taxId":0},{"id":1000002,"number":1920,"name":"Bank Account","taxId":0},{"id":2000001,"number":1500,"name":"Accounts Receivable","taxId":0}]},"CurrenciesReadAllResponseExample":{"summary":"Example response for fetching all currencies","value":[{"code":"USD","rate":1.25},{"code":"EUR","rate":1.12},{"code":"GBP","rate":1.38}]},"TaxReadAllResponseExample":{"value":[{"id":0,"number":0,"name":"No VAT","rate":0},{"id":1,"number":1,"name":"Standard VAT","rate":25},{"id":2,"number":2,"name":"Reduced VAT","rate":15}]},"TransactionLinesReadAllResponseExample":{"summary":"Example response for reading transaction lines","value":[{"id":"123e4567-e89b-12d3-a456-426614174001","transaction":{"id":"123e4567-e89b-12d3-a456-426614174002","number":1010},"account":{"id":1000001,"number":1900},"transactionType":{"id":5001},"tax":{"id":2001},"amount":1500,"currency":{"code":"USD","rate":10},"date":"2022-07-01","invoice":{"number":"INV-2022-001","dueDate":"2022-08-01","remittanceReference":"OCR-123456789"},"customer":{"id":6001},"comment":"Payment for services","createdAt":"2022-01-01T18:00:00Z","modifiedAt":"2023-12-31T18:00:00Z"},{"id":"123e4567-e89b-12d3-a456-426614174003","transaction":{"id":"123e4567-e89b-12d3-a456-426614174004","number":1020},"account":{"id":1000002,"number":1800},"transactionType":{"id":5002},"tax":{"id":2002},"amount":2500,"currency":{"code":"NOK","rate":1},"date":"2022-07-15","invoice":{"number":"INV-2022-002","dueDate":"2022-08-15","remittanceReference":"OCR-987654321"},"customer":{"id":6002},"comment":"Consulting fees","createdAt":"2022-02-01T12:00:00Z","modifiedAt":"2023-11-30T14:30:00Z"},{"id":"123e4567-e89b-12d3-a456-426614174005","transaction":{"id":"123e4567-e89b-12d3-a456-426614174006","number":1030},"account":{"id":1000003,"number":2000},"transactionType":{"id":5003},"tax":{"id":2003},"amount":3000,"currency":{"code":"NOK","rate":1},"date":"2022-07-20","invoice":{"number":"INV-2022-003","dueDate":"2022-08-20","remittanceReference":"OCR-543216789"},"customer":{"id":6003},"comment":"Product sales","createdAt":"2022-03-01T10:30:00Z","modifiedAt":"2023-10-31T16:45:00Z"}]},"TransactionTypesReadAllResponseExample":{"summary":"Example response for fetching all transaction types","value":[{"id":1,"number":1,"name":"Sale"},{"id":2,"number":2,"name":"Purchase"},{"id":3,"number":-3,"name":"Expense"}]},"BankAccountsReadAllResponseExample":{"value":[{"id":"123-456-789","number":"90000000001","bic":"DNBANOKKXXX","type":"bban","name":"ABC bank account","balance":{"amount":1100,"timestamp":"2024-06-02T12:00:00.000Z","currency":{"code":"NOK"}},"owner":{"name":"ABC Corporation","organizationNumber":"123456789","contact":{"name":"John Doe","email":"doe@example.com"}},"transactionType":{"number":5},"ledgerAccount":{"number":1920},"createdAt":"2022-01-01T18:00:00.000Z","modifiedAt":"2023-12-31T18:00:00.000Z"},{"id":"456-789-012","number":"90000000002","bic":"DNBANOKKYYY","type":"iban","name":"XYZ bank account","balance":{"amount":1500,"timestamp":"2024-07-01T12:00:00.000Z","currency":{"code":"USD"}},"owner":{"name":"XYZ Corporation","organizationNumber":"987654321","contact":{"name":"Jane Doe","email":"jane@example.com"}},"transactionType":{"number":5},"ledgerAccount":{"number":1921},"createdAt":"2023-01-01T18:00:00.000Z","modifiedAt":"2024-01-01T18:00:00.000Z"},{"id":"789-012-345","number":"90000000003","bic":"DNBANOKKZZZ","type":"bban","name":"DEF bank account","owner":{"name":"DEF Corporation","organizationNumber":"987654321","contact":{"name":"Alice Smith","email":"alice@example.com"}},"transactionType":{"number":5},"ledgerAccount":{"number":1922},"createdAt":"2023-02-01T18:00:00.000Z","modifiedAt":"2024-02-01T18:00:00.000Z"}]},"BankAccountWithBalanceExample":{"value":[{"id":"123-456-789","number":"90000000001","bic":"DNBANOKKXXX","type":"bban","name":"ABC bank account","balance":{"amount":1100,"timestamp":"2024-06-02T12:00:00.000Z","currency":{"code":"NOK"}},"owner":{"name":"ABC Corporation","organizationNumber":"123456789","contact":{"name":"John Doe","email":"doe@example.com"}},"transactionType":{"number":5},"ledgerAccount":{"number":1920},"createdAt":"2022-01-01T18:00:00.000Z","modifiedAt":"2023-12-31T18:00:00.000Z"}]},"BankAccountExample":{"value":[{"id":"123-456-789","number":"90000000001","bic":"DNBANOKKXXX","type":"bban","name":"ABC bank account","owner":{"name":"ABC Corporation","organizationNumber":"123456789","contact":{"name":"John Doe","email":"doe@example.com"}},"transactionType":{"number":5},"ledgerAccount":{"number":1920},"createdAt":"2022-01-01T18:00:00.000Z","modifiedAt":"2022-01-01T18:00:00.000Z"}]},"BankTransactionsExample":{"value":[{"bankTransactionReference":"10001-987-654-321","type":"outbound","bankAccount":{"id":"123-456-789"},"paymentReference":{"type":"text","value":"Payment for shipment AA-001."},"amount":{"value":1200,"currency":{"code":"NOK"}},"date":"2024-06-01","fromBankAccount":{"number":"123456789","type":"bban"},"toBankAccount":{"number":"987654321","type":"iban"},"bankTransactionCode":{"domainCode":"D001","familyCode":"F002","subFamilyCode":"SF003"},"status":"created","createdAt":"2024-06-01T18:00:00Z","modifiedAt":"2024-06-31T18:00:00Z"},{"bankTransactionReference":"20002-876-543-210","type":"inbound","bankAccount":{"id":"456-789-012"},"paymentReference":{"type":"ocr","value":"1234567890"},"amount":{"value":2500,"currency":{"code":"USD"}},"date":"2024-06-15","toBankAccount":{"number":"987654321","type":"iban"},"bankTransactionCode":{"domainCode":"D002","familyCode":"F003","subFamilyCode":"SF004"},"status":"created","createdAt":"2024-06-15T10:00:00Z","modifiedAt":"2024-06-15T12:00:00Z"},{"bankTransactionReference":"30003-765-432-109","type":"outbound","bankAccount":{"id":"789-012-345"},"paymentReference":{"type":"invoiceRef","value":"INV-2024-001"},"amount":{"value":3400,"currency":{"code":"EUR"}},"date":"2024-06-20","fromBankAccount":{"number":"123450987","type":"bban"},"bankTransactionCode":{"domainCode":"D003","familyCode":"F004","subFamilyCode":"SF005"},"status":"closed","createdAt":"2024-06-20T09:00:00Z","modifiedAt":"2024-06-21T14:00:00Z"}]},"BankTransactionExampleFull":{"value":{"bankTransactionReference":"10001-987-654-321","type":"outbound","bankAccount":{"id":"123-456-789"},"paymentReference":{"type":"text","value":"Payment for shipment AA-001."},"amount":{"value":1200,"currency":{"code":"NOK"}},"date":"2024-06-01","fromBankAccount":{"number":"123456789","type":"bban"},"toBankAccount":{"number":"987654321","type":"iban"},"bankTransactionCode":{"domainCode":"D001","familyCode":"F002","subFamilyCode":"SF003"},"status":"created","createdAt":"2024-06-01T18:00:00Z","modifiedAt":"2024-06-31T18:00:00Z"}},"BankTransactionExampleMinimal":{"value":{"bankTransactionReference":"10001-987-654-321","type":"outbound","bankAccount":{"id":"123-456-789"},"paymentReference":{"type":"text","value":"Payment for shipment AA-001."},"amount":{"value":1200,"currency":{"code":"NOK"}},"date":"2024-06-01","status":"created"}},"CustomerReadAllResponseExample":{"value":[{"id":12345,"name":"ABC Corporation","isCompany":true,"isSupplier":false,"organizationNumber":"123456789","address":{"visit":{"street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countryCode":"NO","countrySubdivision":"Viken"},"postal":"{...}","billing":"{...}","delivery":"{...}"},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+47-12345678","mobilePhone":"+47-98765432","createdAt":"2022-01-01 18:00:00.000Z","modifiedAt":"2023-12-31 18:00:00.000Z"},{"id":54321,"name":"John Doe","person":{"firstName":"John","lastName":"Doe"},"isCompany":false,"isSupplier":false,"address":{"visit":{"street":"Hovedgata 2","postalCode":"0123","postalArea":"Fornebu","countryCode":"NO","countrySubdivision":"Viken"},"postal":"{...}","billing":"{...}","delivery":"{...}"},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+47-87654321","mobilePhone":"+47-98765432","createdAt":"2022-01-01 18:00:00.000Z","modifiedAt":"2023-12-31 18:00:00.000Z"},{"id":67890,"name":"XYZ Inc.","isCompany":true,"isSupplier":true,"organizationNumber":"987654321","address":{"visit":{"street":"123 Main St, Cityville","postalCode":"98101","postalArea":"Seattle","countryCode":"US","countrySubdivision":"Washington"},"postal":"{...}","billing":"{...}","delivery":"{...}"},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+1 555-123-4567","mobilePhone":null,"createdAt":"2022-01-01 18:00:00.000Z","modifiedAt":"2023-12-31 18:00:00.000Z"}]},"CustomerCreateRequestExample":{"value":["\u003c!-- A payload example for when a new customer is a company --\u003e",{"name":"ABC Corporation","isCompany":true,"isSupplier":false,"organizationNumber":"123456789","address":{"visit":{"street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countryCode":"NO","countrySubdivision":"Viken"}},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+47-12345678","id":123},"\u003c!-- A payload example for when a new customer is a private person --\u003e",{"person":{"firstName":"John","lastName":"Doe"},"isCompany":false,"isSupplier":false,"address":{"visit":{"street":"Hovedgata 2","postalCode":"0123","postalArea":"Fornebu","countryCode":"NO","countrySubdivision":"Viken"}},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+47-87654321","mobilePhone":"+47-98765432","id":321}]},"SalesOrdersReadAllResponseExample":{"value":[{"id":1234,"customer":{"id":12345,"organizationNumber":"123456789","gln":"1234567890123","name":"ABC Corporation","street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","city":"Fornebu","countrySubdivision":"Viken","countryCode":"NO"},"status":"Invoice","deliveryCustomer":{"id":12345,"name":"ABC Corporation","street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","city":"Fornebu","countrySubdivision":"Viken","countryCode":"NO"},"invoice":{"number":123,"date":"2023-06-01","dueDate":"2023-06-15","paymentTerms":{"type":"NumberOfDays","value":14},"remittanceReference":"ABC12345"},"date":"2023-06-01","internalMemo":"Customer requested special packaging.","memo":"Urgent delivery.","salesType":{"id":-100},"createdAt":"2023-06-01T12:00:00Z","modifiedAt":"2023-06-02T15:30:00Z"},{"id":5678,"customer":{"id":67890,"organizationNumber":"987654321","gln":"9876543210987","name":"ZYX Ltd.","street":"Sentralplass 5","postalCode":"0456","postalArea":"Oslo","city":"Oslo","countrySubdivision":"Oslo","countryCode":"NO"},"status":"Draft","deliveryCustomer":{"id":67890,"name":"John Smith at ZYX Ltd.","street":"Sentralplass 5","postalCode":"0456","postalArea":"Oslo","city":"Oslo","countrySubdivision":"Oslo","countryCode":"NO"},"invoice":{"date":"2023-07-01","dueDate":"2023-08-15","paymentTerms":{"type":"OutMonthPlusDays","value":15}},"accrual":{"startDate":"2023-07-01","length":6},"date":"2023-07-01","internalMemo":"Customer needs delivery before end of month.","memo":"Express delivery.","createdAt":"2023-07-01T08:30:00Z","modifiedAt":"2023-07-02T10:00:00Z"},{"id":91011,"customer":{"id":11223,"organizationNumber":"564738291","gln":"5647382910234","name":"DEF Industries","street":"Industriveien 10","postalCode":"5001","postalArea":"Bergen","city":"Bergen","countrySubdivision":"Vestland","countryCode":"NO"},"status":"AdvanceInvoice","deliveryCustomer":{"id":11223,"name":"DEF Industries","street":"Industriveien 10","postalCode":"5001","postalArea":"Bergen","city":"Bergen","countrySubdivision":"Vestland","countryCode":"NO"},"invoice":{"number":789,"date":"2023-08-01","dueDate":"2023-08-15","paymentTerms":{"type":"FixedDate","value":"2023-08-15"},"remittanceReference":"DEF78901"},"date":"2023-08-01","internalMemo":"Customer has specific handling instructions.","memo":"Handle with care.","salesType":{"id":-99},"createdAt":"2023-08-01T09:00:00Z","modifiedAt":"2023-08-02T11:15:00Z"}]},"SalesOrderLinesReadAllExample":{"value":[{"id":123456789,"type":"product","product":{"id":101},"description":"Leather handbag with adjustable strap.","quantity":2,"price":49.99,"discountRate":10,"tax":{"id":1,"number":1,"rate":25},"account":{"id":200001,"number":1500,"name":"Accounts Receivable"}},{"id":123456790,"type":"text","description":"Customized gift wrapping service.","quantity":5,"price":4.99,"discountRate":0,"tax":{"id":1,"number":1,"rate":25},"account":{"id":200001,"number":1500,"name":"Accounts Receivable"}},{"id":123456791,"type":"product","product":{"id":103},"description":"Silk scarves with intricate floral patterns.","quantity":1,"price":39.99,"discountRate":0,"tax":{"id":1,"number":1,"rate":25},"account":{"id":200001,"number":1500,"name":"Accounts Receivable"}}]},"PeopleReadAllExample":{"value":[{"id":123,"identityId":"123e4567-e89b-12d3-a456-426614174001","firstName":"John","lastName":"Doe","personType":"Organization","hasLicense":true},{"id":456,"identityId":"123e4567-e89b-12d3-a456-426614174002","firstName":"Jane","lastName":"Smith","personType":"External","hasLicense":false}]},"PeopleReadOneExample":{"value":[{"id":123,"identityId":"123e4567-e89b-12d3-a456-426614174001","firstName":"John","lastName":"Doe","personType":"Organization","hasLicense":true}]},"ProductCategoryReadAllResponseExample":{"value":[{"id":12,"name":"Shoe accessories","alternativeReference":"dk-45-34","parentId":0,"modifiedAt":"2023-12-31 18:00:00.000Z"},{"id":15,"name":"Fashion accessories","alternativeReference":"us-67-89","parentId":1,"modifiedAt":"2023-11-30 15:30:00.000Z"},{"id":18,"name":"Apparel","alternativeReference":"us-98-76","parentId":2,"modifiedAt":"2023-10-25 10:45:00.000Z"}]},"Units":{"value":[{"id":1,"name":"Litre","symbol":"l"},{"id":2,"name":"Metre","symbol":"m"},{"id":3,"name":"Kilometre","symbol":"km"}]},"ProductReadAllResponseExample":{"value":[{"id":123,"name":"White shoe laces","number":"SH-1234567","type":"default","status":"active","description":"1 meter long shoe laces - white","costPrice":50,"salesPrice":400,"indirectCost":12.77,"stock":{"isManaged":true,"quantity":146,"location":"A-313"},"ean":"0123456789000","eanAlternative":"0123456789012345678901234","units":{"id":2,"name":"Metre","symbol":"m"},"category":{"id":12,"name":"Shoe accessories"},"supplier":{"id":67890,"name":"XYZ Inc."},"createdAt":"2022-01-01 18:00:00.000Z","modifiedAt":"2023-12-31 18:00:00.000Z"},{"id":456,"name":"Black leather belt","number":"BL-9876543","type":"default","status":"active","description":"Genuine leather belt for men","costPrice":30,"salesPrice":150,"indirectCost":8.5,"stock":{"isManaged":true,"quantity":82,"location":"B-105"},"ean":"0987654321000","units":{"id":13,"name":"Piece","symbol":"pcs"},"category":{"id":15,"name":"Fashion accessories"},"supplier":{"id":54321,"name":"ABC Supplies"},"createdAt":"2022-02-15 12:00:00.000Z","modifiedAt":"2023-11-30 15:30:00.000Z"},{"id":789,"name":"Blue cotton t-shirt","number":"TC-5678901","type":"default","status":"active","description":"Comfortable round-neck t-shirt for casual wear","costPrice":15,"salesPrice":35,"indirectCost":5.25,"stock":{"isManaged":true,"quantity":210,"location":"C-212"},"ean":"5678901234000","units":{"id":13,"name":"Piece","symbol":"pcs"},"category":{"id":18,"name":"Apparel"},"supplier":{"id":12345,"name":"Fashion Hub"},"createdAt":"2022-03-20 09:30:00.000Z","modifiedAt":"2023-10-25 10:45:00.000Z"}]},"SalesTypeListExample":{"summary":"A sample list of sales types","value":[{"id":1,"name":"Product Sales","account":{"id":2000001}},{"id":2,"name":"Service Sales","account":{"id":2000003}}]}},"securitySchemes":{"tfso":{"type":"apiKey","name":"Authorization","in":"header"}}},"x-topics":[{"title":"Welcome","content":"Welcome to Finago Office (formerly 24SevenOffice) API documentation!\n\nWe are excited to announce that we are gradually releasing new API endpoints for public access. Our REST API is designed to provide developers with a simple and secure way to integrate with our platform and access our services.\n\nBy leveraging Finago Office API, you can build integrations, custom applications, automate workflows, and access data in real-time. We believe that our API will help you create innovative solutions based on Finago Office products and enhance the overall user experience.\n\nPlease note that we will be rolling out new API endpoints over time, and not all endpoints will be available for public access at once. Our team is committed to providing high-quality, reliable API that meet the needs of our developer community. As we continue to develop and release new endpoints, we will keep you informed through our API documentation and other communication channels.\n\nWe encourage you to explore our API documentation, which provides detailed information about each endpoint, including how to authenticate, make requests, and handle responses. \n\nWe do our best to make sure that this documentation has everything you need to help you get started quickly and make good use of our API. Please do not hesitate to contact API Team, should you feel like something is off. \n\nWe are thrilled to have you on board and look forward to seeing what you are about to create with Finago Office API!\n"},{"title":"Get Started","content":"\nTo initiate your journey with the Finago Office API, follow these steps:\n\n**Step 1: Request Access**\n\nLocate your Finago Office Client ID for the organization you intend to request access for. Keep this Client ID on hand and complete the access request form by visiting [this link](https://forms.office.com/e/eKGahcT804).\n\n*How to find Client ID:*\n  * *Log in to Finago Office under the organization that will own your integrations.*\n  * *Navigate to Accounting and then either:*\n    * *Go to [Manage vouchers](https://app.24sevenoffice.com/modules/accounting/vouchers), where you can find the Client ID. The Client ID is the number preceding \"@voucher.24sevenoffice.com\" at the top-right corner.*\n    * *Alternatively, go to Administration \u003e Settings \u003e Retrieval, and find the Client ID next to \"@voucher.24sevenoffice.com\" there.*\n\n**Step 2: Enable Developer Admin Panel**\n\nAfter we review your request and approve it, the Developer Admin Panel will be activated for your organization's account with the specified Client ID.\n\n**Step 3: Create Your First Application**\n\nHead over to the [Developer Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/applications). Here, you can create your inaugural application, define its scopes, obtain the necessary credentials for acquiring an access token, and kickstart your integration with our API in no time.\n\nIf you have any questions or issues during the setup process, please do not hesitate to contact API Team for assistance. \n"},{"title":"Authentication","content":"To authenticate requests to Finago Office API, users must create an OAuth2 application in our system and obtain client ID and client secret.\n\nIn addition to client ID and client secret, users must also obtain an organization ID for which the application is granted access to. This is because Finago Office is a multi-tenant application, where a personal login gives access to more than one organization and its people. Please, refer to each of the endpoints for [Identity](/doc/v1/operation/operation-get-me), [Organization](/doc/v1/operation/operation-getclient), and [People](/doc/v1/operation/operation-get-organization-people) in Finago Office API for further details.\n\nThe application will then use these credentials (client ID, organization ID, and client secret) to obtain an access token for the user. The process of getting an access token follows OAuth 2.0 Client Credentials Flow (explained in details here: https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow)\n\nUsers must include this access token in the Authorization header of all requests over HTTPS. \n\nIf the access token is not valid or has expired, the API will respond with an HTTP 401 Unauthorized error, indicating that the request is not authorized.\n"},{"title":"Scopes","content":"Scopes refer to the specific areas or actions within the system that users or applications are authorized to access or perform. These scopes are organized into sets of permissions, which are then grouped into predefined sets called roles. \n\nOur API provides fine-grained access control that allows users and applications to interact with the system in a secure and controlled manner. However, it is important to note that when requesting access to specific scopes, you may end up with less scopes than you asked for. Therefore, it is essential to handle the 403 error response and adapt the features available to your integration accordingly.  \n"},{"title":"Get Access Token","content":"To acquire an access token and initiate your first API call, follow these steps:\n\nBefore you begin, ensure that you have the [Developer Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/applications) enabled for your account. You should locate a button labeled “Developer” (or “Utvikler” in Norwegian) at the bottom of the main navigation left-side menu on the Finago Office Home page.\n\n\u003e info\n\u003e If you do not have the Developer admin panel enabled, contact the Finago Office API team.\n\n1) Log in to the [Developer Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/applications) and select Create Application.\n\n2) Complete the required application details, then click Create.\n\n3) Once the new OAuth2 application is created, click Configure to view the application credentials.\n\n4) Navigate to Scopes, choose the necessary scopes from the dropdown list, and save changes.\n\n5) Proceed to Settings and copy the Application ID.\n\n6) Authorize the application to access your organization's user account details based on the previously selected scopes. To do this, visit the Finago Office Home page and select Integrations under Administration in the main navigation left-side menu. You will be redirected to the [Integrations Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/integrations) where you manage integrations for your organization account. Click Connect Application.\n\n7) Paste the Application ID, accept terms of usage and scopes. The application is now connected to your organization's account.\n\n8) You are now prepared to obtain an access token for your organization. Utilize the application's credentials (application ID/client ID and client secret) along with login hints for the organization. You can find the application's credentials in the [Developer Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/applications), and the login hint for the organization is usually provided by your future integration users. Your organization has already been connected in step 7 and it is your first user now. \n\n\u003e info\n\u003e **The endpoint for obtaining an authentication token is: `POST https://login.24sevenoffice.com/oauth/token`**  \n\n9) Define the application's `client_id`, `client_secret`, and `login_organization`. To access `client_id` and `client_secret`, navigate to the [Developer Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/applications) and click Configure for the application. For `client_id`, insert the value from \"Application ID / Client ID\" and for `client_secret`, insert the value from Client Secret. \n\nAn access token is associated with an organization account. To obtain an access token tied to your organization account, visit the [Integrations Admin Panel](https://app.24sevenoffice.com/modules/applicationadmin/integrations), click Configure for the application connected to your organization's account, and from the Info section, copy the Organization ID to paste it for `login_organization`.\n\n10) Finally, send an API request with all the credentials and receive an access token in the response body.\n\n\u003e info\n\u003e The access token is valid for a single organization. If you intend to access multiple organizations, steps 6 to 10 should be repeated for each organization.\n\nTo obtain an authentication token for accessing Finago Office REST API resources, you can utilize your code, development environment (Visual Studio, JetBrains, etc.) extensions, or employ API tools like Postman. You can also explore the Finago Office playground at [https://tfso.github.io/publicapi/playground/](https://tfso.github.io/publicapi/playground/) using the [OAuth 2.0 Client Credentials Flow](https://auth0.com/docs/flows/concepts/client-credentials).\n\nFor the purpose of further demonstration, we proceed with Postman. Access Postman here: [https://www.postman.com/](https://www.postman.com/)\nIf you are new to Postman, refer to this guide to help you get started: [Postman Overview](https://learning.postman.com/docs/introduction/overview/)\n\nInclude your application's credentials in the request body. A convenient way to do this in Postman is by switching to \"x-www-form-urlencoded\", enabling Bulk Edit mode, and pasting the following:\n```\ngrant_type:client_credentials\naudience:https://api.24sevenoffice.com\nclient_id: [insert from Application ID / Client ID]\nclient_secret: [insert from Client Secret]\nlogin_organization: [insert from Organization ID]\n```\nNow, send the request and receive an access token in the response body.\n"},{"title":"Status \u0026 Errors","content":"Our API returns status codes and error responses to help developers understand the outcome of their requests and troubleshoot issues that may arise. \n\nHere are the most commonly used status codes and error responses:\n\n* `200 OK` - The request was successful and the server was able to return the requested data.\n\n* `201 Created` - The request has been fulfilled and a new resource has been created.\n\n* `204 No Content` - The request was successful, but there is no response data to return.\n\n* `400 Bad Request` - The request was malformed or invalid and the server cannot process it.\n\n* `401 Unauthorized` - The user is not authenticated and the request cannot be processed until they are.\n\n* `403 Forbidden` - The user is authenticated, but they do not have permission to access the requested resource.\n\n* `404 Not Found` - The requested resource could not be found on the server.\n\n* `500 Internal Server Error` - There was an error on the server while processing the request.\n\n* `503 Service Unavailable` - The server is temporarily unavailable and unable to process the request.\n\nPlease note that each status code may come with additional information in the response body to help developers understand what went wrong and how to resolve the issue. We recommend reviewing the response body for each status code to get a better understanding of the error message.\n"},{"title":"Rate limiting","content":"We implement rate limiting to ensure fair usage and protect the stability and reliability of Finago Office API.\n\nRate limiting refers to the practice of limiting the number of requests that can be made to the API within a certain time period. This helps prevent excessive usage that could potentially overload the system or cause performance issues.\n\nOur API sets a limit on the number of requests that can be made within a given time period, usually measured in seconds or minutes. Once this limit is reached, further requests will be denied until the next time period begins.\n\nTo avoid rate limiting, we recommend that developers implement efficient coding practices and make use of caching to reduce the number of requests made to the API. If you do encounter rate limiting, please wait until the next time period begins before making further requests.\n\nPlease contact our API team for specific rate limit information, as it may vary depending on the API endpoint or resource.\n"},{"title":"Versioning","content":"Each version of Finago Office API is identified by a version number, which is included in the URL of the endpoint. This allows you to specify which version of the API you want to use in your requests.\n\nAs we make updates and improvements to our API, we will release new versions to ensure backward compatibility. This means that your existing integrations will continue to work, even as we introduce new features and functionality.\n\nYou must specify a version number when making requests to our API to ensure that your application continues to function as expected. You can find the latest version of our API in our API documentation, and we will also notify you of any upcoming changes or new versions via our communication channels.\n\nPlease note that older versions of our API may eventually be deprecated and no longer supported. We will provide advance notice of any deprecation and work with you to ensure a smooth transition to the latest version.\n"}]}