We have a REST API that we need to connect to and pull inventory from as a source. The authentication for the API is token based however it also requires a unix format timestamp. Given that the timestamp needs to be generated on the fly, is it possible to pass through along with the token or is this requirement out of scope? Thank you.
Passing unix time stamp to REST service
- Last Post yesterday
Am I correct to understand that the requirement is to pass a unix format timestamp along with the token during authentication process?
Also, it would be great of you tell us what exactly data source you want to use, specify links to its REST API docs.
Thank you and looking forward to your reply.
Yes, your understanding is correct. The data source would be a fashion industry specific ERP system called ApparelMagic, https://apparelmagic.com. Here is the blurb from their API documentation regarding the timestamp and token:
// the unix time $time = time(); // the token $token = '2d3ce34592174e6848e1ec40178ca727'; // construct the array with the time, token, and any other values necessary // for the request you are making (making sure all values are type casted to strings) $request_array = array('time' => (string) $time, 'token' => (string) $token);
The endpoint URL would look something like this in my case: https://lolaandsophie.app.apparelmagic.com/api/xml/inventory or https://lolaandsophie.app.apparelmagic.com/api/json/inventory based on if we wanted a JSON or XML response.
Here is the link to their official API documentation: https://apparelmagic.com/wp-content/uploads/API.pdf
I can provide my company specific token through an email or private message if it would be useful. Thank you!
Sorry for the delay.
We requested ApparelMagic to provide us with a Sandbox instance and yesterday we received a positive response. We are going to investigate its API and perform tests within this Sandbox instance next week. As soon as we have any results, we will notify you.