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 28 August 2019
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.
That's really exciting, thanks for the update! They have a really responsive, talented team of develpoers there who are a pleasure to work with so I'm keeping my fingers crossed that things work out. Have a great weekend.
We would like to inform you that we are working on REST Connector for ApparelMagic. This could take 1-2 weeks to complete it.
We will contact you by email as soon as all the information is ready.