Skip to content

This ia an example of how to call Netsuite's RESTlet or REST API Using OAuth1.0 with C#

License

Notifications You must be signed in to change notification settings

Edin-Hodzic-bzn/netsuite-rest-csharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netsuite REST C#

This is a budding Netsuite Rest Api SDK

Prerequisites

You'll need your Netsuite REST API credentials handy:

  • CONSUMER KEY
  • CONSUMER SECRET
  • TOKEN
  • TOKEN SECRET
  • REALM

At the moment you'll also need to know what endpoints and actions you'll want to reach. Some knowledge of he Netsuite REST API will be needed.

How to use

See the unit test for example.

NetsuiteRequest netsuiteRequest = new NetsuiteRequest(consumerKey, consumerSecret, token, tokenSecret, realm);
string urlString = $"/customer/{testId}";
HttpMethod httpMethod = HttpMethod.Get;

JsonDocument result = await netsuiteRequest.Request(urlString, httpMethod);

SuiteQL Example

JsonObject body = new();
body.Add("q", $"SELECT * FROM customer where email = '{testEmail}'");
var result = await netsuiteRequest.SuiteQlRequest(body, 1);

The hope is by returning a JsonDocument it provides a flexible format that the caller can then box however they need.

History

This is nominally a fork of alejandrofierro/netsuite-rest-csharp though I'm not sure any original code remains.

About

This ia an example of how to call Netsuite's RESTlet or REST API Using OAuth1.0 with C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%