Search code examples
netsuitesandboxsuitescript

What are the Netsuite EU sandbox URLs?


We used to access Netsuite restlets on rest.sandbox.netsuite.com. I have recently come back to a project and these no longer work. Login into the sandbox has also been updated so EU users now switch to a sandbox role instead, this updates the URL to include eu1.

According to: https://netsuite.custhelp.com/app/answers/detail/a_id/65712/kw/sandbox%20restlet

I believe that requests should be made against rest.eu1.netsuite.com/ for sandbox/preview data. However updates to Restlets in the sandbox account do not appear to be reflected in the request responses.

What am I missing? I've been scouring the Netsuite docs but have come up blank.


Solution

  • Found the answer. You need to append _SB1 SB2 etc onto the account id in the request auth header. I'm not sure how this would work for oAuth but I guess I'll cross that bridge later...

    https://system.eu2.netsuite.com/app/help/helpcenter.nl?fid=section_4609939018.html

    Account ID Numbering Conventions for EU Sandbox

    In NA sandboxes, there is a primary sandbox and there might be a secondary sandbox, or secondary sandboxes. The account ID for the primary sandbox is the same as the account ID of the production account. Secondary sandboxes might, or might not, have the same account ID as the production account, appended with _SB2, _SB3, and so on. (For more information, see Primary Sandbox and Secondary Sandboxes.)

    In EU sandboxes, there is no concept of a primary sandbox; all EU sandboxes are secondary sandboxes. The account ID is always the same as the account ID for your production account, appended with _SB1, _SB2, _SB3, and so on.

    For example:

    Production account ID: 123456 EU sandbox account ID: 123456_SB1 EU sandbox account ID: 123456_SB2 EU sandbox account ID: 123456_SB3