netsuitenetsuite-rest-apisuiteql

How to get associated images from item in Netsuite


Not able to get images from item using Netsuite Rest API or Suiteql quey.

How we get the Netsuite Item associted images through REST API/ SuiteQL query? I tried to get from API like this

API : https://xxxxxx.suitetalk.api.netsuite.com/services/rest/record/v1/inventoryitem/7383/?fields=itemimages

SuiteQL Query: { "q": "SELECT item.itemImages FROM item WHERE item.id = '7383';" } Response :

{ "type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1", "title": "Bad Request", "status": 400, "o:errorDetails": [ { "detail": "Invalid search query. Detailed unprocessed description follows. Search error occurred: Field 'itemImages' for record 'item' was not found. Reason: NOT_EXPOSED - Not available for channel SEARCH\n.", "o:errorQueryParam": "q", "o:errorCode": "INVALID_PARAMETER" } ] }


Solution

  • Take a look at Tim Dietrich's post where he talks about this with SuiteQL queries you can try.

    https://timdietrich.me/blog/netsuite-suiteql-item-images-sca/