Skip to content

leadstoloyals/node-clang-rest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##node-clang-rest

Node based JSON/HTTP proxy to the Clang's SOAP webservice API.

This is a restful webservice that proxies HTTP requests to Clang's SOAP API, passing along any parameters in the query string. All requests are proxied to Clang using HTTPS. Returns SOAP responses as JSON.

##Token

Authentication to the Clang Webservice API is done using a token (uuid). Contact the Support Desk of your Clang reseller to obtain a token. Contact Leads to Loyals if you'd like to learn more about using Clang and this API.

Add the token value as a _uuid query parameter. It will be kept in your session which is maintained using a cookie. The supplied token will be proxied to Clang with each request.

If you have a token, you can use the demo here https://node.leadstoloyals.com

##Resources

###customers

Example operations

  • GET /clang/customers
  • GET /clang/customers/39515
  • PUT /clang/customers/39515?firstname=Christiaan
  • POST /clang/customers?firstname=test&emailAddress=[email protected]
  • DELETE /clang/customers/39515

HTTP verb can be overriden using _method query parameter

  • GET /clang/customers/39515?_method=PUT&firstname=Christiaan
  • GET /clang/customers?_method=POST&firstname=test&emailAddress=[email protected]
  • GET /clang/customers/39515_method=DELETE

(read more about RESTful conventions)

###emails

  • GET /clang/emails/26597
  • POST /clang/emails/26597/sendToCustomer?customerId=328191

The last example is a custom action on a single resource. That is only allowed using POST.

###Representation

Expect an array of objects when 200/201 or an object with a message property when an error occurred.

HTTP statusses as you would expect from a RESTful webservice remain intact.

About

RESTifies the Clang SOAP API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%