getList

In SOAP web services, the getList operation is used to retrieve a list of one or more records by providing the unique ids that identify those records.

If there are multiple ids provided, they can either belong to the same record type or different record types. For example, it is possible to retrieve a customer and a contact within a single request using this operation.

SOAP Request

In the following example, two records are retrieved — one customer record and one employee record. Note that you must provide the internal ID of the specify instance of the record and the record type for the getList.

            <soap:Body>
<platformMsgs:getList>
   <platformMsgs:baseRef internalId="983" type="customer" xsi:type="platformCore:RecordRef"/>
   <platformMsgs:baseRef internalId="-5" type="employee" xsi:type="platformCore:RecordRef"/>
</platformMsgs:getList>
</soap:Body> 

          

SOAP Response

The following example shows the response to the previous SOAP request.

            <soapenv:Body>
<getListResponse xmlns="urn:messages_2025_1.platform.webservices.netsuite.com">
<readResponseList xmlns="urn:messages_2025_1.platform.webservices.netsuite.com">
   <readResponse>
      <ns1:status isSuccess="true" xmlns:ns1="urn:core_2025_1.platform.webservices.netsuite.com"/>
      <record internalId="983" xsi:type="ns2:Customer"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns2="urn:relationships_2025_1.lists.webservices.netsuite.com">
         <ns2:entityId>Shutter Fly</ns2:entityId>
         <ns2:isInactive>false</ns2:isInactive>
         <ns2:companyName>Shutter Fly, Inc</ns2:companyName>
         .
         ...[more fields]
         .
         <ns2:customFieldList>
            <ns6:customField internalId="265" scriptId="custentity_map"
            xsi:type="ns6:StringCustomFieldRef"
            xmlns:ns6="urn:core_2025_1.platform.webservices.netsuite.com">
                  <ns6:value>http://maps.google.com</ns6:value>
            </ns6:customField>
         </ns2:customFieldList>
      </record>
   </readResponse>
   <readResponse>
      <ns8:status isSuccess="true" xmlns:ns8="urn:core_2025_1.platform.webservices.netsuite.com"/>
      <record internalId="-5" xsi:type="ns9:Employee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns9="urn:employees_2025_1.lists.webservices.netsuite.com">
         <ns9:entityId>A Wolfe</ns9:entityId>
         <ns9:isInactive>false</ns9:isInactive>
         .
         ...[more fields]
         .
      </record>
   </readResponse>
</readResponseList>
</getListResponse>
 </soapenv:Body> 

          

REST Request

In REST web services, you can obtain the list of all records of a record type by sending an HTTP GET request as in the following example.

            GET https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer 

          

REST Response

The following is a shortened example of a response.

            {
    "links": [
        {
            "rel": "self",
            "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer?limit=1000&offset=0"
        }
    ],
    "items": [
        {
            "links": [
                {
                    "rel": "self",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer/107"
                }
            ],
            "id": "107"
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer/41"
                }
            ],
            "id": "41"
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer/90"
                }
            ],
            "id": "90"
        }
    ],
    "totalResults": 3
} 

          

Related Topics

General Notices