Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified ConnectWiseManageAPI.psd1
Binary file not shown.
Binary file modified ConnectWiseManageAPI/ConnectWiseManageAPI.psd1
Binary file not shown.
470 changes: 470 additions & 0 deletions ConnectWiseManageAPI/PSGetModuleInfo.xml

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions ConnectWiseManageAPI/Public/Finance/Invoices/Get-CWMInvoices.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function Get-CWMInvoices {
[CmdletBinding()]
param(
[int]$id,
[string]$condition,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields
)

if ($id) {
$Endpoint = '/finance/invoices/$($Id)'
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
else {
$Endpoint = '/finance/invoices'
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function Get-CWMProjectTicketAllNotes {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[Alias('ticketId')]
[int]$parentId,
[int]$id,
[switch]$count,
[string]$condition,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields,
[switch]$all
)

$Endpoint = "/project/tickets/$($parentId)/allnotes"
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function Get-CWMOpportunities {
[CmdletBinding()]
param(
[switch]$count,
[string]$condition,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields
)

$Endpoint = '/sales/opportunities'
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function Get-CWMOpportunityForecasts {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[Alias('OpportunityId')]
[int]$parentId,
[switch]$count,
[string]$conditions,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields
)

$Endpoint = "/sales/opportunities/$($parentId)/forecast"
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function Get-CWMOpportunityNote {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[Alias('OpportunityId')]
[int]$parentId,
[switch]$count,
[string]$conditions,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields
)

$Endpoint = "/sales/opportunities/$($parentId)/notes"
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function Get-CWMServiceTemplates {
[CmdletBinding()]
param(
[int]$pageId,
[string]$condition,
[ValidatePattern('\S* (desc|asc)')]
[string]$orderBy,
[string]$childConditions,
[string]$customFieldConditions,
[int]$page,
[int]$pageSize,
[string[]]$fields
)

$Endpoint = '/service/templates'
Invoke-CWMGetMaster -Arguments $PsBoundParameters -Endpoint $Endpoint
}
22 changes: 20 additions & 2 deletions ConnectWiseManageAPI_Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
Module Name: ConnectWiseManageAPI
Module Guid: 3374fb93-c06d-47b0-b4cc-9d49987e376f
Download Help Link: https://github.com/christaylorcodes/ConnectWiseManageAPI
Help Version: 0.0.0.1
Help Version: 0.0.0.2
Locale: en-US
---

# ConnectWiseManageAPI Module
## Description
These commands should mirror what is available via the REST API .
These commands should mirror what is available via the REST API.

## ConnectWiseManageAPI Cmdlets
### [Connect-CWM](Docs/Connect-CWM.md)
Expand Down Expand Up @@ -128,6 +128,9 @@ This function will list documents associated with a record.
### [Get-CWMInventory](Docs/Get-CWMInventory.md)
This function will list Inventory and Stock on Hand, including serial numbers from a specific Warehouse Bin

### [Get-CWMInvoices](Docs/Get-CWMInvoices.md)
This function will list Invoices

### [Get-CWMManufacturer](Docs/Get-CWMManufacturer.md)
This function will allow you to search for Manage manufacturers.

Expand All @@ -149,6 +152,15 @@ This function will return information about the user used for the API connection
### [Get-CWMMySecurity](Docs/Get-CWMMySecurity.md)
This function will return information about the users permissions.

### [Get-CWMOpportunities](Docs/Get-CWMOpportunities.md)
This function will return information about Opportunities.

### [Get-CWMOpportunityForecasts](Docs/Get-CWMOpportunityForecasts.md)
This function will return information about the Forecast lines on an Opportunit.

### [Get-CWMOpportunityNote](Docs/Get-CWMOpportunityNote.md)
This function will return the notes on an Opportunity.

### [Get-CWMPriority](Docs/Get-CWMPriority.md)
This function will list service priorities on conditions.

Expand Down Expand Up @@ -179,6 +191,9 @@ This will return a list of projects.
### [Get-CWMProjectPhase](Docs/Get-CWMProjectPhase.md)
This function will list all phases for a project.

### [Get-CWMProjectTicketAllNote](Docs/Get-CWMProjectTicketAllNote.md)
This function will list all notes for a project ticket.

### [Get-CWMProjectSecurityRole](Docs/Get-CWMProjectSecurityRole.md)
This function will list project security roles.

Expand Down Expand Up @@ -218,6 +233,9 @@ This function will list of service boards based on conditions.
### [Get-CWMServiceBoardInfo](Docs/Get-CWMServiceBoardInfo.md)
This will return information about service boards.

### [Get-CWMServiceTemplates](Docs/Get-CWMServiceTemplates.md)
This will return information about service/ticket templates.

### [Get-CWMSLA](Docs/Get-CWMSLA.md)
This function will list service SLAs on conditions.

Expand Down
170 changes: 170 additions & 0 deletions Docs/Get-CWMInvoices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
external help file: ConnectWiseManageAPI-help.xml
Module Name: ConnectWiseManageAPI
online version:
schema: 2.0.0
---

# Get-CWMInvoices

## SYNOPSIS
This function will list Invoice

## SYNTAX

```
Get-CWMInvoices [[-id] <Int32>] [[-condition] <String>] [[-orderBy] <String>]
[[-childConditions] <String>] [[-customFieldConditions] <String>] [[-page] <Int32>] [[-pageSize] <Int32>]
[[-fields] <String[]>] [-all] [<CommonParameters>]
```

## DESCRIPTION
{{ Fill in the Description }}

## EXAMPLES

### EXAMPLE 1
```powershell
Get-CWMInvoices -Id 555
```

Will return invoice 555

## PARAMETERS

### -childConditions
Allows searching arrays on endpoints that list childConditions under parameters

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -condition
This is your search condition to return the results you desire.
Example: `(contact/name like "Fred%" and closedFlag = false) and dateEntered \> \[2015-12-23T05:53:27Z\] or summary contains "test" AND summary != "Some Summary"`

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -customFieldConditions
Allows searching custom fields when customFieldConditions is listed in the parameters

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -fields
Allows you to return a partial response with just the fields listed.

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -id
{{ Fill id Description }}

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -orderBy
Choose which field to sort the results by, 'field/sub desc' or 'field/sub asc'

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -page
Used in pagination to cycle through results

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -pageSize
Number of results returned per page (Defaults to 25)

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None
## OUTPUTS

### System.Object
## NOTES
Author: Adam Wilson Date: 2025-06-30

## RELATED LINKS

[https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Invoices/getFinanceInvoices](https://developer.connectwise.com/Products/ConnectWise_PSA/REST#/Invoices/getFinanceInvoices)
Loading