Skip to main content

Invoke a My API virtual export

Comments

2 comments

  • Jorge Iriarte

    Hi Stephen,
    Would it be possible to clarify the NSObject in the Script? It is referencing also a restlet object which contains a search id reference. Does this mean that you are running a restelet within Netsuite or a Saved Seach. It would be great if you can mention any setup that is needed on the NetSuite side.
    I also created the script and it generates an error with the <amount>  statement.
    Any further clarification would be greatly appreciated as I am very interested to create a MyAPI to return a reponse from a Restlet in NetSuite or from an Export by passing a parameter.

    0
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Jorge Iriarte for this to work in your environment, you need to change the _connectionId to your the connection id of your NetSuite connection within IO. To find this, you need to open that connection in Celigo, then look in the url and copy the id at the end. You also need to change the searchId to be your own search id which you can find in your NetSuite instance. As for <amount>, this is a field being sent to the myAPI in the request body. I think the <> are there just to call it out, but you should remove that.

    The easiest way to build the NSObject JSON is to make an export within the UI, then get the id of the export, then call our apis to GET that resource and just copy the full JSON. Here are the docs for getting export data: https://docs.celigo.com/hc/en-us/articles/7707693269275-Export-API-endpoints.

    0

Please sign in to leave a comment.