SOAP WSDL Versions

SOAP web services use a single WSDL file that describes all supported operations and messages. You can access that file at the following link: https://webservices.netsuite.com/wsdl/v2021_2_0/netsuite.wsdl

In this link, v2021_2_0 reflects the WSDL version.

NetSuite defines WSDL versioning, the location of schemas, namespaces, and the endpoint.

The WSDL is composed of numerous NetSuite-specific types that are defined in related XSDs. Each XSD URL has an alias that can be used as a reference to the corresponding XSD file. 

If we need to use token-based authentication, then we need to use the WSDL version 2015.2 WSDL or later.

Following is an example of a SOAP request for fetching the fetching the particular vendor based on the internal id.

<soapenv:Envelope
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:urn="urn:messages_2021_2.platform.webservices.netsuite.com"
	xmlns:urn1="urn:core_2021_2.platform.webservices.netsuite.com"
    xmlns:listRel="urn:relationships_2021_2.lists.webservices.netsuite.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <urn:preferences></urn:preferences>
        <urn:partnerInfo></urn:partnerInfo>
        <urn:tokenPassport>
            <urn1:account>{{ACCOUNT_ID}}</urn1:account>
            <urn1:consumerKey>{{CONSUMER_KEY}}</urn1:consumerKey>
            <urn1:token>{{TOKEN_ID}}</urn1:token>
            <urn1:nonce>{{nonce}}</urn1:nonce>
            <urn1:timestamp>{{timestamp}}</urn1:timestamp>
            <urn1:signature algorithm="HMAC-SHA256">{{signature}}</urn1:signature>
        </urn:tokenPassport>
    </soapenv:Header>
    <soapenv:Body>
        <get xmlns="urn:messages_2021_2.platform.webservices.netsuite.com">
            <baseRef internalId="8" type="vendor" xsi:type="ns7:RecordRef" xmlns:ns7="urn:core_2021_2.platform.webservices.netsuite.com"/>
        </get>
    </soapenv:Body>
</soapenv:Envelope>

Leave a comment

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