The StockTrim API is based on REST principles. The base address is https://api.stocktrim.com/api
followed by the appropriate endpoint.
Before you use the API you’ll need a StockTrim account. If you don’t have one, create a 14 day free
trial – https://go.stocktrim.com
Basic Workflow
Step 1: Import data
We require at least two data sets: Products and Sale Orders.
If you assemble or manufacture items we also need a third data set: Bill of Materials
Optional data sets also include: Suppliers, and Locations.
Step 2: Run forecast calculations
Once your data has been uploaded, kick off the forecast calculations by hitting the
https://go.stocktrim.com/api/runforecastcalculations endpoint.
The system will then process through all your uploaded products, calculating the forecasts and
required order quantities for each, based on the sales history (and BOM if included). This may take a
few minutes.
Step 3: Read order plan
Log in to StockTrim. Once the forecast calculations have been completed, the order plan will then be
available.
Authentication
The StockTrim API uses basic authentication. Each request must include the headers “api-auth-id”
and “api-auth-signature”.
These are specific to your StockTrim account and can be found in the ‘Help’ section within
StockTrim.
FAQ
1. I’ve imported my Products and sales orders but there is still no data in my StockTrim
account – how do I see it?
You’ll still need to run the forecast calculations so that the system can create your forecasts and
order plan. Hit the /runforecastcalculations endpoint.
2. Can I create a free developer account that won’t require a payment after the 14 day free
trial is over?
Yes. Just email us at support@stocktrim.com with your account name and we’ll sort this for you.
3. I keep getting error messages related to Invalid Authorization Headers, or invalid auth Id
or signature. How do I fix it?
Ensure that the headers “api-auth-id” and “api-auth-signature” are present in your request, and
that they exactly match the values in your account – https://go.stocktrim.com/help
4. I get the error message 400 bad request. What’s gone wrong here?
Firstly, double check the security protocol. We recommend using at least Transport Layer Security
(TLS) 1.2.
Also double check that all fields in your request body match the required formats.
You can identify whether any errors are in your request vs your code by trying the request in the API
sandbox (swagger UI) – api.stocktrim.com/index.html
Comments
0 comments
Please sign in to leave a comment.