unleashed-api v1.1.0
/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:
- Content-Type - This must be either application/xml or application/json.
- Accept - This must be either application/xml or application/json.
- api-auth-id - You must send your API id in this header.
- 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/
/sales order endpoint/ SalesOrders /SalesOrders/E6E8163F-6911-40e9-B740-90E5A0A3A996 - Returns details of a particular sales order.
signature is generated by taking the query string, and creating a HMAC-SHA256 signature using our API key as the secret key.