Netsuite API Raw XML Request

Recently someone asked me if I could send them a copy of the XML that gets sent back and forth when you make a Netsuite API call. This could be useful if you want to implement the Netsuite API in a language that they don’t provide libraries for. Anyway, here is the xml:

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns:SOAP-ENV="" xmlns:ns1="" xmlns:xsi="" xmlns:ns2="">
        <passport actor="">
            <role internalId="23" xsi:type="RecordRef"/>
            <baseRef internalId="706" type="inventoryItem" xsi:type="RecordRef"/>

And here is the response (a lot of the content has been removed to keep it short):

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
        <platformMsgs:documentInfo xmlns:platformMsgs="">
            <platformMsgs:nsId>[Content removed]</platformMsgs:nsId>
        <getResponse xmlns="">
                <platformCore:status isSuccess="true" xmlns:platformCore=""/>
                <record internalId="706" externalId="ITEM706" xsi:type="listAcct:InventoryItem" xmlns:listAcct="">
                    <!--Lots more stuff here-->

This xml was generated using the PHP_Toolkit and a modification of this test script.

If you want to see the xml from your own requests generated using the PHP Toolkit, just create a folder called “nslog” in the root directory of the toolkit. Then all requests and responses will be logged to that folder. Be careful though, it will fill up fast.

This entry was posted in Beginning with the PHPToolkit, Netsuite PHPToolkit and tagged , , , , , . Bookmark the permalink.

One Response to Netsuite API Raw XML Request

  1. Tarang Lute says:

    In Netsuite,we have scenario where
    1. User will login via desktop application.
    2. On successfull login we need to redirect user to netsuite webapplication.
    3. We want to continue user desktop session in netsuite web application also.

    **Note : Login will only be done via desktop application.**

    Currenlty we are using Netsuite webservice with passport authentication.Also is it possible to login netsuite without providing account number.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>