Skip to content

Instantly share code, notes, and snippets.

#We will declare Variable that will change often up at the top
#This is a common practice for scripts.
#Later we will convert this to a function, and these will become parameters
$AcumaticaUser = "Admin"
$AcumaticaPassword = "123"
$AcumaticaTenant = "Company"
$AcumaticaEndPoint = "http://localhost/APS20_104_0012"
$ReferenceNbr = "AR008403"
$WebSession = New-Object Microsoft.PowerShell.Commands.WebRequestSession
#This WebSession object was not generated by Postman but you will need it to
#Share the Session state across each of the ReST calls. These calls will not
#Work without it
$WebSession = New-Object Microsoft.PowerShell.Commands.WebRequestSession
#We need this header data that Postman generated for us
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")