SOAP Operation – asyncSearch

Request

<soapenv:Envelope
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:platformCore='urn:core_2021_2.platform.webservices.netsuite.com'
    xmlns:listRel='urn:relationships_2021_2.lists.webservices.netsuite.com'
    xmlns:listAcct='urn:accounting_2021_2.lists.webservices.netsuite.com'
    xmlns:platformMsgs='urn:messages_2021_2.platform.webservices.netsuite.com'>
    <soapenv:Header>
        <tokenPassport xsi:type='platformCore:TokenPassport'>
            <account xsi:type='xsd:string'>{{accountId}}</account>
            <consumerKey xsi:type='xsd:string'>{{consumerKey}}</consumerKey>
            <token xsi:type='xsd:string'>{{tokenId}}</token>
            <nonce xsi:type='xsd:string'>{{nonce}}</nonce>
            <timestamp xsi:type='xsd:long'>{{timestamp}}</timestamp>
            <signature algorithm='HMAC_SHA256' xsi:type='platformCore:TokenPassportSignature'>{{signature}}</signature>
        </tokenPassport>
    </soapenv:Header>
           <soapenv:Body>
        <asyncSearch xsi:type='platformMsgs:AsyncSearchRequest'>
            <searchRecord xsi:type='listEmp:EmployeeSearch'>
                <basic xsi:type='platformCommon:EmployeeSearchBasic'>
                    <internalId operator='anyOf' xsi:type='platformCore:SearchMultiSelectField'>
                        <searchValue xsi:type='platformCore:RecordRef' internalId='26' type='entityCustomField'></searchValue>
                    </internalId>
                </basic>
            </searchRecord>
        </asyncSearch>
    </soapenv:Body>
</soapenv:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <asyncSearchResponse
            xmlns="">
            <platformCore:asyncStatusResult
                xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
                <platformCore:jobId>ASYNCWEBSERVICES_TSTDRV2782962_080620238284800031154308947_f</platformCore:jobId>
                <platformCore:status>pending</platformCore:status>
                <platformCore:percentCompleted>0.0</platformCore:percentCompleted>
                <platformCore:estRemainingDuration>0.0</platformCore:estRemainingDuration>
            </platformCore:asyncStatusResult>
        </asyncSearchResponse>
    </soapenv:Body>
</soapenv:Envelope>

getAsyncResult

Request

<soapenv:Envelope
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:platformCore='urn:core_2021_2.platform.webservices.netsuite.com'
    xmlns:listRel='urn:relationships_2021_2.lists.webservices.netsuite.com'
    xmlns:listAcct='urn:accounting_2021_2.lists.webservices.netsuite.com'
    xmlns:platformMsgs='urn:messages_2021_2.platform.webservices.netsuite.com'>
    <soapenv:Header>
        <tokenPassport xsi:type='platformCore:TokenPassport'>
            <account xsi:type='xsd:string'>{{accountId}}</account>
            <consumerKey xsi:type='xsd:string'>{{consumerKey}}</consumerKey>
            <token xsi:type='xsd:string'>{{tokenId}}</token>
            <nonce xsi:type='xsd:string'>{{nonce}}</nonce>
            <timestamp xsi:type='xsd:long'>{{timestamp}}</timestamp>
            <signature algorithm='HMAC_SHA256' xsi:type='platformCore:TokenPassportSignature'>{{signature}}</signature>
        </tokenPassport>
    </soapenv:Header>
            <soapenv:Body>
        <getAsyncResult xsi:type='platformMsgs:GetAsyncResultRequest'>
            <jobId xsi:type='xsd:string'>ASYNCWEBSERVICES_TSTDRV2782962_080620238284800031154308947_f</jobId>
            <pageIndex xsi:type='xsd:int'>1</pageIndex>
        </getAsyncResult>
    </soapenv:Body>
</soapenv:Envelope>

Reponse

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <platformMsgs:documentInfo
            xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
            <platformMsgs:nsId>ASYNCWEBSERVICES_TSTDRV2782962_080620238284800031154308947_f</platformMsgs:nsId>
        </platformMsgs:documentInfo>
    </soapenv:Header>
    <soapenv:Body>
        <getAsyncResultResponse
            xmlns="">
            <platformMsgs:asyncResult xsi:type="AsyncSearchResult"
                xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
                <platformCore:searchResult
                    xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
                    <platformCore:status isSuccess="true"/>
                    <platformCore:totalRecords>1</platformCore:totalRecords>
                    <platformCore:pageSize>1000</platformCore:pageSize>
                    <platformCore:totalPages>1</platformCore:totalPages>
                    <platformCore:pageIndex>1</platformCore:pageIndex>
                    <platformCore:searchId>ASYNCWEBSERVICES_TSTDRV2782962_080620238284800031154308947_f</platformCore:searchId>
                    <platformCore:recordList>
                        <platformCore:record internalId="26" externalId="1234566" xsi:type="listEmp:Employee"
                            xmlns:listEmp="urn:employees_2021_2.lists.webservices.netsuite.com">
                            <listEmp:entityId>1 Sophia Yougin</listEmp:entityId>
                            <listEmp:firstName>Sophia</listEmp:firstName>
                            <listEmp:lastName>Yougin</listEmp:lastName>
                            <listEmp:email>sophia.yougin@jobinandjismi.com</listEmp:email>
                            <listEmp:isInactive>false</listEmp:isInactive>
                            <listEmp:lastModifiedDate>2023-07-31T21:10:33.000-07:00</listEmp:lastModifiedDate>
                            <listEmp:dateCreated>2023-07-31T01:42:12.000-07:00</listEmp:dateCreated>
                            <listEmp:initials>SY</listEmp:initials>
                            <listEmp:mobilePhone>8921576269</listEmp:mobilePhone>
                            <listEmp:subsidiary internalId="1">
                                <platformCore:name>Parent Company</platformCore:name>
                            </listEmp:subsidiary>
                            <listEmp:currency internalId="1">
                                <platformCore:name>USA</platformCore:name>
                            </listEmp:currency>
                            <listEmp:isSalesRep>false</listEmp:isSalesRep>
                            <listEmp:isJobResource>false</listEmp:isJobResource>
                            <listEmp:hireDate>2023-07-31T00:00:00.000-07:00</listEmp:hireDate>
                            <listEmp:gender>_omitted</listEmp:gender>
                            <listEmp:workCalendar internalId="1">
                                <platformCore:name>Default Work Calendar</platformCore:name>
                            </listEmp:workCalendar>
                            <listEmp:giveAccess>true</listEmp:giveAccess>
                            <listEmp:defaultExpenseReportCurrency internalId="1">
                                <platformCore:name>USA</platformCore:name>
                            </listEmp:defaultExpenseReportCurrency>
                            <listEmp:eligibleForCommission>false</listEmp:eligibleForCommission>
                            <listEmp:isJobManager>false</listEmp:isJobManager>
                            <listEmp:targetUtilization>100.0</listEmp:targetUtilization>
                        </platformCore:record>
                    </platformCore:recordList>
                </platformCore:searchResult>
            </platformMsgs:asyncResult>
        </getAsyncResultResponse>
    </soapenv:Body>
</soapenv:Envelope>

Leave a comment

Your email address will not be published. Required fields are marked *