PwsGetCompanyList

Overview


This web service retrieves a list of companines (PwsCompanySummary), based on specified search criteria. You can specify which company or companies to retrieve either by specifying a set of search criteria, or by specifying a specific company (PwsCompanyRef). 

Request Format


PwsGetCompanyList Request

Request Elements



Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

ATtU220EvBSE2+GCN9U58g==

CompanyIdentity

PwsCompanyRef

No


For this service, the caller may specify a company identity to retrieve a specific company summary. If the identity is not specified, all companies fitting the other specified criteria will be returned. Click here for more information.


MaxRowsToReturn

Int32

No


The maximum number of records to be returned. This value is disregarded if a company is specified in CompanyIdentity.


QueryString

String (255)

No


A search string to narrow down the results. A company will be included in the results if the search string matches the company name or number. This value is disregarded if a company is specified in CompanyIdentity.


Request Usage Example(s)


Example 01 - no company identity
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetCompanyList>
         <pws:serviceRequest>
            <req:SessionTicket>ATtU220EvBSE2+GCN9U58g==</req:SessionTicket>
            <req:MaxRowsToReturn>2</req:MaxRowsToReturn>
            <req:QueryString>Revo</req:QueryString>
         </pws:serviceRequest>
      </pws:PwsGetCompanyList>
   </soapenv:Body>
</soapenv:Envelope>
Example 02 - use company identity
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetCompanyList>
         <pws:serviceRequest>
            <req:SessionTicket>ATtU220EvBSE2+GCN9U58g==</req:SessionTicket>
            <req:CompanyIdentity>
               <com:CompanyNumber>003</com:CompanyNumber>
            </req:CompanyIdentity>
         </pws:serviceRequest>
      </pws:PwsGetCompanyList>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsGetCompanyList Response


Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.


ResponseId

Int32

Click here for more information.

0

StatusRequestStatusClick here for more information
Ok

ServerTimestampUtc

DateTime

Click here for more information.

2018-03-12T19:05:15.1551043Z

Companies

PwsCompanySummary[]

The company summary records retrieved by the service. Click here for more information.


Response Usage Example(s)


Example 01 - no company identity
 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetCompanyListResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetCompanyListResult xmlns:a="http://projectorpsa.com/DataContracts/Requests/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsMessage>
                  <b:AdditionalErrorText>Warning 104: {oldestSurvivingTimeCardWorkDateString}</b:AdditionalErrorText>
                  <b:ErrorCode>RowCountExceeded</b:ErrorCode>
                  <b:ErrorNumber>104</b:ErrorNumber>
                  <b:ErrorText>Not all data rows were returned by this request because the specified row count was smaller than the total number of rows available.</b:ErrorText>
                  <b:Type>Warning</b:Type>
               </b:PwsMessage>
            </Messages>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-12T19:05:15.1551043Z</ServerTimestampUtc>
            <a:Companies xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsCompanySummary>
                  <b:CompanyId i:nil="true"/>
                  <b:CompanyName>Revolutionary Solutions Corporation  US</b:CompanyName>
                  <b:CompanyUid>1152921504606852296</b:CompanyUid>
                  <b:CompanyNumber>001</b:CompanyNumber>
                  <b:Currency>
                     <b:CurrencyCode>USD</b:CurrencyCode>
                     <b:CurrencyId i:nil="true"/>
                     <b:CurrencyUid>1152921504606849879</b:CurrencyUid>
                  </b:Currency>
                  <b:TaxType1 i:nil="true"/>
                  <b:TaxType2 i:nil="true"/>
                  <b:TaxType3 i:nil="true"/>
               </b:PwsCompanySummary>
               <b:PwsCompanySummary>
                  <b:CompanyId i:nil="true"/>
                  <b:CompanyName>Revolutionary Solutions Corporation CA</b:CompanyName>
                  <b:CompanyUid>1152921504606852299</b:CompanyUid>
                  <b:CompanyNumber>002</b:CompanyNumber>
                  <b:Currency>
                     <b:CurrencyCode>CAD</b:CurrencyCode>
                     <b:CurrencyId i:nil="true"/>
                     <b:CurrencyUid>1152921504606849881</b:CurrencyUid>
                  </b:Currency>
                  <b:TaxType1>
                     <b:TaxTypeCode>GSTCA</b:TaxTypeCode>
                     <b:TaxTypeId i:nil="true"/>
                     <b:TaxTypeUid>1152921504606859965</b:TaxTypeUid>
                     <b:AppliesToCostFlag>true</b:AppliesToCostFlag>
                     <b:AppliesToMilestonesFlag>true</b:AppliesToMilestonesFlag>
                     <b:AppliesToTimeFlag>true</b:AppliesToTimeFlag>
                     <b:InactiveFlag>false</b:InactiveFlag>
                     <b:TaxTypeName>Canada Goods &amp; Services Tax</b:TaxTypeName>
                  </b:TaxType1>
                  <b:TaxType2>
                     <b:TaxTypeCode>HSTCA</b:TaxTypeCode>
                     <b:TaxTypeId i:nil="true"/>
                     <b:TaxTypeUid>1152921504606859966</b:TaxTypeUid>
                     <b:AppliesToCostFlag>true</b:AppliesToCostFlag>
                     <b:AppliesToMilestonesFlag>true</b:AppliesToMilestonesFlag>
                     <b:AppliesToTimeFlag>true</b:AppliesToTimeFlag>
                     <b:InactiveFlag>false</b:InactiveFlag>
                     <b:TaxTypeName>Canada Harmonized Sales Tax</b:TaxTypeName>
                  </b:TaxType2>
                  <b:TaxType3>
                     <b:TaxTypeCode>PSTQU</b:TaxTypeCode>
                     <b:TaxTypeId i:nil="true"/>
                     <b:TaxTypeUid>1152921504606859971</b:TaxTypeUid>
                     <b:AppliesToCostFlag>true</b:AppliesToCostFlag>
                     <b:AppliesToMilestonesFlag>true</b:AppliesToMilestonesFlag>
                     <b:AppliesToTimeFlag>true</b:AppliesToTimeFlag>
                     <b:InactiveFlag>false</b:InactiveFlag>
                     <b:TaxTypeName>Quebec Provincial Sales Tax</b:TaxTypeName>
                  </b:TaxType3>
               </b:PwsCompanySummary>
            </a:Companies>
         </PwsGetCompanyListResult>
      </PwsGetCompanyListResponse>
   </s:Body>
</s:Envelope>
Example 02 - use company identity
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetCompanyListResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetCompanyListResult xmlns:a="http://projectorpsa.com/DataContracts/Requests/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-12T19:19:47.5775428Z</ServerTimestampUtc>
            <a:Companies xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsCompanySummary>
                  <b:CompanyId i:nil="true"/>
                  <b:CompanyName>Revolutionary Solutions Corporation China</b:CompanyName>
                  <b:CompanyUid>1152921504606852297</b:CompanyUid>
                  <b:CompanyNumber>003</b:CompanyNumber>
                  <b:Currency>
                     <b:CurrencyCode>CNY</b:CurrencyCode>
                     <b:CurrencyId i:nil="true"/>
                     <b:CurrencyUid>1152921504606849973</b:CurrencyUid>
                  </b:Currency>
                  <b:TaxType1 i:nil="true"/>
                  <b:TaxType2 i:nil="true"/>
                  <b:TaxType3 i:nil="true"/>
               </b:PwsCompanySummary>
            </a:Companies>
         </PwsGetCompanyListResult>
      </PwsGetCompanyListResponse>
   </s:Body>
</s:Envelope>

PwsGetCompanyList - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
57339CompanyNotFoundThe specified company was not found.