Coding Challenge!



Sample Client Request

A client wants to query the company API and show the email, item #, item title, quantity and price for each receipt entered in a given time period.

In this simplified example, the vendor is boisandbox and there is no date range that needs to be passed in to the query string to get the list of receipts. Instead I built a very straightforward endpoint that will return a small set of data in the AWS cloud.

The endpoint for the API is www.jakelake.io/api/ and it takes either a vendor query string parameter (boisandbox) or a receipt query string parameter (available from prior request). In essence, the vendor or receipt are the API keys passed into the query string for this scenario.

Please write a webpage with:
1) a simple UI that accepts a vendor nickname string and a submit button that returns the receipts associated with that nickname. Please also provide:
2) an input field with a different button that will iteratively query ALL the receipts associated with that nickname and show the emails, item #s, item titles, quantities and prices of the items based on the JSON objects that return from the above api.
Bonus points for displaying an error if the data response is null, which occurs if a different vendor or non-matching receipt ID is submitted to the API.

CORS is not supported, PHP or other server side languages are recommended to process APIs so that API keys are not stored in plaintext in a .js file on a webserver.

If you have any clarification questions, please email Deanna. We are happy to jump in and explain anything that is unclear or that needs additional information.

Email your solution in a zip file to Deanna whenever you're satisfied with it.

Cheers,
Jake