iwcp.Platform.API.SDK.PowerShell

Company: interworks.cloud

Version: 1.0.0

Date: 06-06-2022

Description: This module provides Cmdlets to access the interworks.cloud API


Table of Contents

Get-IwcAccount
Get-IwcAccountById
Get-IwcCommand
Get-IwcToolDocumentation
Get-IwcVersion
New-IwcAccount
Set-IwcProfile
Use-IwcProfile

Cmdlets

Get-IwcAccount


NAME
    Get-IwcAccount
    
SYNOPSIS
    Retrieves all accounts
    
    
SYNTAX
    Get-IwcAccount [-Filter ] [-Include ] [-OrderBy ] [-PageIndex ] [-PageSize ] []
    
    
DESCRIPTION
    Retrieves all accounts.
    

PARAMETERS
    -Filter 
        A function that must evaluate to true for an account to be returned. More details available at https://developers.interworks.cloud/public-api/search-criteria?swcfpc=1#Accounts_filter
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Include 
        Supports: customfields, billingAddress.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -OrderBy 
        Determines which values are used to sort a collection of accounts.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -PageIndex 
        Default value : 1
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -PageSize 
        Default value : 10
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    Iwcp.Platform.Api.Client.Models.Api.V3.AccountV3[]
        
    
    
NOTES
    
    
        
    
    ---- Get all accounts, first page with 10 accounts per page ----
    
    Get-IwcAccount
    
    
    --- Get all accounts, second page with 10 accounts per page ---
    
    Get-IwcAccount -PageIndex 2
    
    
    ---- Get all accounts, first page with 20 accounts per page ----
    
    Get-IwcAccount -PageIndex 1 -PageSize 20
    
    
    --------------- Get all accounts ordered by Name ---------------
    
    Get-IwcAccount -OrderBy "name desc"
    
    
    ----------- Get all accounts including custom fields -----------
    
    Get-IwcAccount -Include "customfields"
    
    
    --------- Get all accounts with 'Cash' payment method ---------
    
    Get-IwcAccount -Filter "paymentMethod eq 'Cash'"
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Get-IwcAccount https://api.interworks.cloud/powershell/#Get-IwcAccount



Get-IwcAccountById


NAME
    Get-IwcAccountById
    
SYNOPSIS
    Retrieves a single account that corresponds to an account ID
    
    
SYNTAX
    Get-IwcAccountById [-Id]  [-Include ] []
    
    
DESCRIPTION
    Retrieves a single account that corresponds to an account ID.
    

PARAMETERS
    -Id 
        The account ID.
        
        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Include 
        Supports: customfields, billingAddress.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    Iwcp.Platform.Api.Client.Models.Api.V3.AccountV3
        
    
    
NOTES
    
    
        
    
    ----------------------- Get account info -----------------------
    
    Get-IwcAccountById -Id 5658
    
    
    ------------- Get account info and billing address -------------
    
    Get-IwcAccountById -Id 5658 -Include "billingAddress"
    
    
    -------------- Get account info and custom fields --------------
    
    Get-IwcAccountById -Id 5658 -Include "customfields"
    
    
    ---- Get account info and billing address and custom fields ----
    
    Get-IwcAccountById -Id 5658 -Include "customfields,billingAddress"
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Get-IwcAccountById https://api.interworks.cloud/powershell/#Get-IwcAccountById



Get-IwcCommand


NAME
    Get-IwcCommand
    
SYNOPSIS
    Returns all available commands
    
    
SYNTAX
    Get-IwcCommand [-Noun ] [-Verb ] []
    
    
DESCRIPTION
    Returns all available commands with their descriptions.
    

PARAMETERS
    -Noun 
        Array of command nouns.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Verb 
        Array of command verbs
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Object
        
    
    
NOTES
    
    
        
    
    ------------------ Get all available commands ------------------
    
    C:\> Get-IwcCommand
    
    
    --------- Get all available commands using verbs 'GET' ---------
    
    Get-IwcCommand -Verb Get
    
    
    ---- Get all available commands using verbs 'GET' or 'USE' ----
    
    Get-IwcCommand -Verb Get,Use
    
    
    ------- Get all available commands using noun 'Account' -------
    
    Get-IwcCommand -Noun Account
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Get-IwcCommand https://api.interworks.cloud/powershell/#Get-IwcCommand



Get-IwcToolDocumentation


NAME
    Get-IwcToolDocumentation
    
SYNOPSIS
    Creates an HTML document with all Help information for the iwcp.Platform.API.SDK.PowerShell
    
    
SYNTAX
    Get-IwcToolDocumentation []
    
    
DESCRIPTION
    This cmdlet generates an HTML documentation file of all cmdlets of the iwcp.Platform.API.SDK.PowerShell The HTML document will be created in the folder you run the cmdlet.
    

PARAMETERS
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Object
        An HTML file named iwcp.Platform.API.SDK.PowerShell-.html
    
    
NOTES
    
    
        
    
    -------------- Create the HTML documentation file --------------
    
    Get-IwcToolDocumentation
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Get-IwcToolDocumentation https://api.interworks.cloud/powershell/#Get-IwcToolDocumentation



Get-IwcVersion


NAME
    Get-IwcVersion
    
SYNOPSIS
    Retrieves the module's version
    
    
SYNTAX
    Get-IwcVersion []
    
    
DESCRIPTION
    Retrieves the module's version.
    

PARAMETERS
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Object
        
    
    
NOTES
    
    
        
    
    --------------------- Get current version ---------------------
    
    Get-IwcVersion
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Get-IwcVersion https://api.interworks.cloud/powershell/#Get-IwcVersion



New-IwcAccount


NAME
    New-IwcAccount
    
SYNOPSIS
    Creates an account
    
    
SYNTAX
    New-IwcAccount [-Name]  [-EnableOrdering] {True | true | False | false} [-SeparateInvoicesEnabled] {True | true | False | false} [-IsTaxable] {True | true | False | false} [-CreditLimit]  [-AutoInvoiceNotificationEnabled] {True | true | False | false} [-NoteType]  [-EnableReselling] {True | true | False | false} [-IsBilling] {True | true | False | false} [-Address1 ] [-Address2 ] [-AddressName ] [-BusinessActivity ] [-City ] [-Code ] [-CountryCode ] [-Currency ] [-CustomFields ] [-Email ] [-Fax ] [-FolderId ] [-Industry ] [-IsAffiliate {True | true | False | false}] [-PartialChargesInvoicing {OnOrderDay | OnBillingDay}] [-PaymentMethod ] [-Phone ] [-PostCode ] [-ProrateBillingDate {Disabled | FirstDayOfTheMonth | Day2 | Day3 | Day4 | Day5 | Day6 | Day7 | Day8 | Day9 | Day10 | Day11 | Day12 | Day13 | Day14 | Day15 | Day16 | Day17 | Day18 | Day19 | Day20 | Day21 | Day22 | Day23 | Day24 | Day25 | Day26 | Day27 | Day28 | Day29 | Day30 | LastDayOfTheMonth | FirstOrderDay}] [-ProrateBillingEnabled {True | true | False | false}] [-RegistrationNumber ] [-Source ] [-StateCode ] [-TaxAuthority ] [-TradingName ] [-TransactionCurrency ] [-Type ] [-WebSite ] [-BillToAccount ] []
    
    New-IwcAccount [-Body]  []
    
    
DESCRIPTION
    Creates an account and returns the account ID.
    

PARAMETERS
    -Address1 
        Address.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Address2 
        Address2.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -AddressName 
        AddressName.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -AutoInvoiceNotificationEnabled 
        AutoInvoiceNotificationEnabled.
        
        Required?                    true
        Position?                    5
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Body 
        This request contains all the fields needed to create an account.
        
        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -BusinessActivity 
        BusinessActivity.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -City 
        City.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Code 
        Code.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -CountryCode 
        Supports 'CountryId' alias.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -CreditLimit 
        CreditLimit.
        
        Required?                    true
        Position?                    4
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Currency 
        Currency.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -CustomFields 
        Supports string array.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Email 
        Email.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -EnableOrdering 
        EnableOrdering.
        
        Required?                    true
        Position?                    1
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -EnableReselling 
        EnableReselling.
        
        Required?                    true
        Position?                    7
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Fax 
        Fax.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -FolderId 
        FolderId.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Industry 
        Industry.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -IsAffiliate 
        IsAffiliate.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -IsBilling 
        Supports 'IsBillingFrequency' alias.
        
        Required?                    true
        Position?                    8
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -IsTaxable 
        Supports 'Taxable' alias.
        
        Required?                    true
        Position?                    3
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Name 
        Name.
        
        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -NoteType 
        NoteType.
        
        Required?                    true
        Position?                    6
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -PartialChargesInvoicing 
        Supports 'ProrateBillingPartialCharges' alias.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -PaymentMethod 
        PaymentMethod.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Phone 
        Phone.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -PostCode 
        PostCode.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -ProrateBillingDate 
        ProrateBillingDate.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -ProrateBillingEnabled 
        ProrateBillingEnabled.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -RegistrationNumber 
        RegistrationNumber.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -SeparateInvoicesEnabled 
        SeparateInvoicesEnabled.
        
        Required?                    true
        Position?                    2
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Source 
        Supports 'LeadSource' alias.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -StateCode 
        Supports 'StateId' alias.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -TaxAuthority 
        TaxAuthority.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -TradingName 
        TradingName.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -TransactionCurrency 
        TransactionCurrency.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Type 
        Type.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -WebSite 
        Website.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -BillToAccount 
        {{ Fill BillToAccount Description }}
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Int32
        The account ID.
    
    
NOTES
    
    
        
    
    ------------- Create new account using parameters -------------
    
    $accountId = New-IwcAccount -Name CmdletAccount -EnableOrdering False -SeparateInvoices false -IsTaxable True -CreditLimit 100 -AutoInvoiceNotificationEnabled true -NoteType 1 -EnableReselling False -IsBilling false
    
    
    ------------- Create new account using json input -------------
    
    $account = '{
         "name": "John",
         "code": "Jdoe",
         "phone": "12345679",
         "fax": "123456789",
         "website": "www.google.com",
         "email": "joeDoe@gmail.com",
         "folderId": null,
         "orderingEnabled": false,
         "billToAccountId": null,
         "separateInvoices": true,
         "currency": "EUR",
         "transactionCurrency": "EUR",
         "taxable": true,
         "creditLimit": 5000.00,
         "prorateBilling": {
    		"day": "FirstOrderDay",
             "partialCharges": "OnOrderDay"
         },
         "paymentMethodId": null,
         "registrationNumber": null,
         "autoInvoiceNotification": true,
         "tradingName": "My Company",
         "businessActivity": "Holdings CC",
         "taxAuthorityId": null,
         "noteType": "Receipt",
         "resellingEnabled": true,
         "typeId": null,
         "industryId": null,
         "leadSourceId": null,
         "billingAddress": {
             "name": "Main address",
             "address": "street no",
             "address2": "58",
             "city": "Thessaloniki",
             "postCode": "65400",
             "countryId": "88",
             "stateId": null
         },
         "isAffiliate": true
     }'
     
     New-IwcAccount -Body $account
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#New-IwcAccount https://api.interworks.cloud/powershell/#New-IwcAccount



Set-IwcProfile


NAME
    Set-IwcProfile
    
SYNOPSIS
    Creates a configuration file to use for making the API calls.
    
    
SYNTAX
    Set-IwcProfile [-Name]  [-Username]  [-ClientKey]  [-BaseURL]  [-Path ] []
    
    
DESCRIPTION
    Creates a configuration file to use for making the API calls.
    

PARAMETERS
    -BaseURL 
        BSS platform base URL (e.g. http://local.bss.com)
        
        Required?                    true
        Position?                    5
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -ClientKey 
        Client key under API Credentials
        
        Required?                    true
        Position?                    3
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Name 
        File name.
        
        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Path 
        Path for the configuration file. Default: Current working directory.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Username 
        Application user's username under API credentials
        
        Required?                    true
        Position?                    1
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Object
        
    
    
NOTES
    
    
        After creation, the 'Use-IwcProfile' command needs to be executed for the configuration to be used.
    
    ---- Create configuration file in current working directory ----
    
    Set-IwcProfile -Name IwcProfile -Username apiuser -ClientKey c85f6f7c-1b27-4140-bb83-bebd573a10e5 -BaseURL http://local.bss.com
    
    
    ------- Create configuration file in the specified path -------
    
    Set-IwcProfile -Name IwcProfile -Path "C:\Program Files\PowerShell\7\Modules\iwcp.Platform.API.SDK.PowerShell\" -Username apiuser -ClientKey c85f6f7c-1b27-4140-bb83-bebd573a10e5 -BaseURL http://local.bss.com
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Set-IwcProfile https://api.interworks.cloud/powershell/#Set-IwcProfile



Use-IwcProfile


NAME
    Use-IwcProfile
    
SYNOPSIS
    Specifies a configuration file to use for making the API calls.
    
    
SYNTAX
    Use-IwcProfile [-Name]  [-Path ] []
    
    
DESCRIPTION
    Specifies a configuration file to use for making the API calls.
    

PARAMETERS
    -Name 
        File name.
        
        Required?                    true
        Position?                    0
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    -Path 
        Path to the configuration file. Default: Current working directory.
        
        Required?                    false
        Position?                    named
        Default value                None
        Accept pipeline input?       False
        Accept wildcard characters?  false
        
    
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). 
    
INPUTS
    None
        
    
    
OUTPUTS
    System.Object
        
    
    
NOTES
    
    
        Requires a configuration file created by the 'Set-IwcProfile' command.
    
    ------- Load profile IwcProfile.json from specific path -------
    
    Use-IwcProfile -Name IwcProfile -Path "C:\Program Files\PowerShell\7\Modules\iwcp.Platform.API.SDK.PowerShell\"
    
    
    -------- Load profile IwcProfile.json from current path --------
    
    Use-IwcProfile -Name IwcProfile
    
    
    
RELATED LINKS
    https://api.interworks.cloud/powershell/#Use-IwcProfile https://api.interworks.cloud/powershell/#Use-IwcProfile