Scenario – Add customer and location in a single request.
Operation – addList
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>
<addList xsi:type='platformMsgs:AddListRequest'>
<record xsi:type='listRel:Customer'>
<entityId xsi:type='xsd:string'>002Test Customer</entityId>
<isPerson xsi:type='xsd:boolean'>true</isPerson>
<firstName xsi:type='xsd:string'>Test</firstName>
<lastName xsi:type='xsd:string'>Customer 2</lastName>
<phone xsi:type='xsd:string'>0471235689</phone>
<email xsi:type='xsd:string'>test123@gmail.com</email>
</record>
<record xsi:type='listAcct:Location'>
<name xsi:type='xsd:string'>Test Location 2</name>
</record>
</addList>
</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:Header>
<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_TSTDRV2779698_0721202320065929371215466971_fa05e</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<addListResponse xmlns="">
<platformMsgs:writeResponseList xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com"/>
<platformMsgs:writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
<platformCore:statusDetail>
<platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
</platformCore:statusDetail>
</platformCore:status>
<platformMsgs:baseRef internalId="124" type="customer" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com"/>
</platformMsgs:writeResponse>
<platformMsgs:writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
<platformCore:statusDetail>
<platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
</platformCore:statusDetail>
</platformCore:status>
<platformMsgs:baseRef internalId="103" type="location" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com"/>
</platformMsgs:writeResponse>
</platformMsgs:writeResponseList>
</addListResponse>
</soapenv:Body>
</soapenv:Envelope>
