| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-Vendor |
purchase vendor list, get, page, search |
Lists vendors, gets one by -Id, reads one page with -Page, or searches with -Search. |
New-Vendor |
purchase vendor create |
Creates a vendor from fields, a hashtable, or a JSON file. |
Update-Vendor |
purchase vendor update |
Sparse update of a vendor. |
Get-VendorTransaction |
purchase vendor transactions, transactions-for |
Reads one page of vendor transactions, or a vendor's own transactions with -ForVendor. |
| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-VendorInvoice |
purchase invoice processed, get, unprocessed, unprocessed-get, my-approved, my-unapproved |
Reads processed invoices (default), one invoice by -Id, unprocessed invoices with -Unprocessed, or the current user's -MyApproved and -MyUnapproved invoices. |
Save-VendorInvoiceAttachment |
purchase invoice attachment, unprocessed-attachment |
Saves an invoice attachment to a file. Add -Unprocessed for the unprocessed endpoint. |
New-VendorInvoice |
purchase invoice create |
Creates a vendor invoice. Confirmation: High. |
Update-VendorInvoiceApproval |
purchase invoice approval |
Updates the current user's approval of an invoice. Confirmation: High. |
| Cmdlet | CLI equivalent | What it does |
|---|---|---|
Get-LedgerAccount |
general-ledger account list, get |
Lists accounts or gets one by -Number. |
New-LedgerAccount |
general-ledger account create |
Creates an account. |
Get-LedgerAccountTransaction |
general-ledger account transaction list |
Reads one page of an account's transactions. |
Get-LedgerTransaction |
general-ledger transaction list |
Reads one page of ledger transactions. |
New-LedgerJournal |
general-ledger journal create |
Creates a journal from a hashtable or a JSON file. |
Get-TaxGroup |
general-ledger tax-group list |
Lists tax groups. |
New-TaxGroup |
general-ledger tax-group create |
Creates a tax group. |
# List vendors with a postal code
Get-Vendor -PostalCode 101
# One vendor
Get-Vendor 0101 | Format-List Number, Name, Email, Phone, Balance
# Text search
Get-Vendor -Search 'acme' -Maximum 20
# One page of the last month's changes
Get-Vendor -Page 1 -Count 500 -ModifiedAfter (Get-Date -Day 1)
A number given without a parameter name is the vendor to get: Get-Vendor 12 reads vendor 12. The page number needs its name: Get-Vendor -Page 2. A vendor that does not exist writes a non-terminating ObjectNotFound error, so -ErrorAction SilentlyContinue turns the call into an existence test.
DK Plus serves at most 50,000 records per query. A page and count whose product is above that limit fail before any request. Narrow the query with -ModifiedAfter and start again from page 1.
Create and update:
New-Vendor 0101 'Example ehf.' -NationalId 4101012345 -Email [email protected] -Address1 'Laugavegur 1' -PostalCode 101 -City Reykjavik
# Nested sections such as approvers need a hashtable
New-Vendor -InputObject @{ Number = '0102'; Name = 'Example sf.'; Approvers = @{ Approver1 = 'JON' } }
# Change the email and clear the phone number
Update-Vendor 0101 -Email [email protected] -Phone ''
# Block every vendor of a group; remove -WhatIf to send
Get-Vendor -Group 99 | Update-Vendor -Blocked -WhatIf
Transactions:
Get-VendorTransaction -Vendor 0101 -Page 2 -Count 50
Get-VendorTransaction -Vendor 0101 -ForVendor
Get-VendorTransaction -DueAfter (Get-Date -Day 1) -Sort Date -SortDirection Descending
Get-VendorInvoice -Vendor 0101 -Count 50 # processed, one page
Get-VendorInvoice 1234 # one processed invoice
Get-VendorInvoice -Unprocessed # the inbox
Get-VendorInvoice -MyUnapproved # waiting for you
New-VendorInvoice and Update-VendorInvoiceApproval need confirmation because the matching CLI commands need --yes. Scripts pass -Confirm:$false:
New-VendorInvoice 0101 -Number A-1 -Date 2026-10-12 -DueDate 2026-11-12 -Amount 1250.5 -CurrencyCode ISK -Confirm:$false
# With lines
New-VendorInvoice 0101 -InputObject @{ Number = 'A-2'; Lines = @(@{ Account = '4000'; Amount = 100 }) }
# The piped vendor binds -Vendor
Get-Vendor 0101 | New-VendorInvoice -Path ./invoice.json -Confirm:$false
Amounts use . as the decimal point and dates are ISO, whatever the machine's culture.
An approval must name the action. -ApprovalAction is required: a request without it, including -InputObject @{}, @{ Description = 'Checked' }, or a JSON file that sets only a description, fails with a DkPlus.Validation error before any request. The value is the numeric DK Plus approval-action code, and it is read as a whole number whatever your culture.
Update-VendorInvoiceApproval 1234 -ApprovalAction 1 -Description 'Checked' -Confirm:$false
# Preview the approvals waiting for you
Get-VendorInvoice -MyUnapproved | Update-VendorInvoiceApproval -ApprovalAction 1 -WhatIf
# From a file
Update-VendorInvoiceApproval 1234 -Path ./approval.json -Confirm:$false
Save-VendorInvoiceAttachment saves the file under its own name in the current location unless you pass -Path.
Save-VendorInvoiceAttachment 1234
Save-VendorInvoiceAttachment 1234 -Unprocessed -Path ./inbox/invoice.pdf -Force
# Every unprocessed attachment, each under its own name
Get-VendorInvoice -Unprocessed | Where-Object HasAttachment | Save-VendorInvoiceAttachment -Unprocessed
Invoices read with Get-VendorInvoice -Unprocessed or -MyUnapproved are marked as unprocessed (Unprocessed is $true), so piping them into Save-VendorInvoiceAttachment or Get-VendorInvoice always uses the unprocessed endpoint. An invoice without a downloadable attachment writes a non-terminating DkPlus.NotFound error. -Path and -Force follow the Save-* rules.
Get-LedgerAccount -ModifiedAfter (Get-Date -Day 1)
Get-LedgerAccount 1000
# Transactions of every closed account
Get-LedgerAccount | Where-Object Closed | Get-LedgerAccountTransaction
Get-LedgerAccountTransaction 1000 -CreatedAfter 2026-09-01 -CreatedBefore 2026-10-01 -Count 500
Get-LedgerTransaction -ModifiedAfter 2026-10-12 -ModifiedBefore 2026-10-13
New-LedgerAccount 1000 -Name 'Cash' -Group 1 -TaxCode T1
New-LedgerJournal @{
Code = 'GJ'
Description = 'Accrual'
Lines = @(@{ Account = '1000'; Amount = 100 }, @{ Account = '2000'; Amount = -100 })
}
Get-TaxGroup | Format-Table Number, Description, Percent
New-TaxGroup -Number A -Description 'VAT 24%' -Percent 24 -Account 3000 -InUse