1.0.8 • Published 4 years ago

unleashed-node-sdk v1.0.8

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

Unleashed introduction

Unleashed is a powerful, integrated platform that allows businesses real-time visibility of accurate inventory information. Providing precise tracking data on each and every item of stock helps businesses of all sizes reduce their costs and increase profits.

Authentication

For Authentication Each request to the API must include these four values sent as HTTP headers:

  1. Content-Type - This must be either application/xml or application/json.
  2. Accept - This must be either application/xml or application/json.
  3. api-auth-id - You must send your API id in this header.
  4. api-auth-signature - You must send the method signature in this header.

The method signature must be generated by taking the query string, and creating a HMAC-SHA256 signature using your API key as the secret key. Only the query parameters portion of the URL is used in calculating the signature, e.g. for the request / Customers?customerCode=ACME use the string customerCode=ACME when generating the signature. Do not include the endpoint name in the method signature. Do not include the query indicator ? in the method signature. If you generate the signature incorrectly you will not be able to access the API, instead you will only receive a “403 Forbidden” response.

Note: The query string can also be empty.

Pagination

Requesting a page

Pages are requested by putting the page number into the URL: https://api.unleashedsoftware.com/{endpoint}/{pagenumber}, where {endpoint} and {pagenumber} are placeholders.

For example, if you wanted to retrieve the 1st page of 200 records from the Customer endpoint we would write https://api.unleashedsoftware.com/Customers/1.
To get the second page you would use https://api.unleashedsoftware.com/Customers/2 .

Page size
The default page size is 200 records, but is configurable by adding the desired page size in the URL querystring:
https://api.unleashedsoftware.com/{endpoint}/{pagenumber}?pageSize={pagesize}.

If you want to retrieve the 3rd page of 500 SalesOrders records (ie. 1001st to 1500th record) then you would use this URL:

https://api.unleashedsoftware.com/SalesOrders/3?pageSize=500.

Htpp request

for http request we are using unirest client libraries.Unirest is a set of lightweight HTTP libraries available in multiple languages.

Base Url

https://api.unleashedsoftware.com/

end points to get salesorder

for get all sales order use given below endpoint 
/SalesOrders

get single salesorder based on their GUID (a GUID formatted as XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) 
/SalesOrders/E6E8163F-6911-40e9-B740-90E5A0A3A996

end points to create sales order

/SalesOrders/b599e7f5-7738-4ea1-a318-6b5298766018

end points to get avilable stock

return a list of all StockOnHand
/StockOnHand

returns details of a particular product based on guid
/StockOnHand/E6E8163F-6911-40e9-B740-90E5A0A3A996

end points to get customer

return all customer list 
/Customers

return details of a particular Customers based on guid
/Customers/59f21e05-07fe-4d9d-b460-a09db4c3ca19

filter for customer
/Customers?customerCode=R8813
if you are using filter you need to pass the param (code atfer ?)in below function 1 parameter as shown in example
CryptoJS.HmacSHA256(customerCode=R8813,auth_key);

end points to get product

return all product list 
/Products

return details of a particular product based on guid
/Products/59f21e05-07fe-4d9d-b460-a09db4c3ca19

filter for product
/Products?productCode=R8813
if you are using filter you need to pass the param (code atfer ?)in below function 1 parameter as shown in example
CryptoJS.HmacSHA256(productCode=R8813,auth_key);

end points to get product

return all product product pricing list based on customer 
/ProductPrices


filter for product
ProductPrices?productCode=PACK5lbCREMA&CustomerCode=00012
if you are using filter you need to pass the param (code atfer ?)in below function 1 parameter as shown in example
CryptoJS.HmacSHA256(productCode=PACK5lbCREMA&CustomerCode=00012,auth_key);

functions

get_salesorder(url,authid,signature, callback) # to get sales order create_salesorder(url,authid,signature,body,callback) # to create sales order get_inventory(url,authid,signature, callback) # to get stock available create_customer(url,authid,signature,body,callback) # to create customer get_customer(url,authid,signature, callback) # to get customer get_product(url,authid,signature, callback) # to get product get_product_customer_pricing(url,authid,signature, callback) # to get product

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.0

4 years ago