Pax8API/Public/Quoting/Get-Pax8QuotesList.ps1
|
<#
.SYNOPSIS Get quotes list .DESCRIPTION Fetches a paginated list of quotes with optional search and status filters. OpenAPI: GET /v2/quotes Scope: Quoting. Audience: https://api.pax8.com. .PARAMETER Limit query parameter 'limit'. .PARAMETER Page query parameter 'page'. .PARAMETER Sort Return quotes sorted by fieldName,direction (e.g. sort=status,desc). Suggested values: id, status, client.name, createdBy, createdOn, updatedOn, totals.initialTotal, totals.recurringTotal. .PARAMETER Search Search on fields like client name, reference code, created by user name, and invoice totals. .PARAMETER Status Filter by status. Multiple values can be provided as a comma-separated list. Suggested values: draft, assigned, sent, closed, declined, accepted, changes_requested, expired, pending. .PARAMETER Account query parameter 'account'. Suggested values: user, partner. .PARAMETER PartnerId query parameter 'partnerId'. .PARAMETER IntentType query parameter 'intentType'. Suggested values: PARTNER_TO_CLIENT, PAX8_TO_PARTNER, PAX8_TO_PARTNER_CLIENT. .PARAMETER Direction Optional sort direction. When provided, the module sends sort as field,direction. .PARAMETER Raw Returns the unmodified API response instead of unwrapping paginated content. .EXAMPLE Get-Pax8QuotesList .LINK https://devx.pax8.com/openapi/quoting-endpoints.json #> function Get-Pax8QuotesList { [CmdletBinding()] param ( [double]$Limit, [double]$Page, [ValidateSet('id', 'status', 'client.name', 'createdBy', 'createdOn', 'updatedOn', 'totals.initialTotal', 'totals.recurringTotal')] [string]$Sort, [string]$Search, [ValidateSet('draft', 'assigned', 'sent', 'closed', 'declined', 'accepted', 'changes_requested', 'expired', 'pending')] [string]$Status, [ValidateSet('user', 'partner')] [string]$Account, [guid]$PartnerId, [ValidateSet('PARTNER_TO_CLIENT', 'PAX8_TO_PARTNER', 'PAX8_TO_PARTNER_CLIENT')] [string]$IntentType, [ValidateSet('asc', 'desc')] [string]$Direction, [switch]$Raw ) process { $boundParameters = @{} foreach ($entry in $PSBoundParameters.GetEnumerator()) { $boundParameters[$entry.Key] = $entry.Value } Invoke-Pax8ApiOperation -CommandName $MyInvocation.MyCommand.Name -Parameters $boundParameters } } |