- Clone project
git clone https://github.com/Seb33300/Gogoprint-PHP-Developer-Test.git
- Install PHP dependencies
composer install
- Launch web server
php bin/console server:start
A ready-to-use SQLite database is included in the project.
(only the first product configuration options have been set => with id 1
)
Use the REST client of your choice to make requests. Using a web browser may not works!
Get Form Options
GET http://127.0.0.1:8000/api/product/options
Get Price Table
GET http://127.0.0.1:8000/api/product/prices?paper_format_id=1&pages_id=1&paper_type_id=1
Add To Cart
POST http://127.0.0.1:8000/api/product/cart
{
"paper_format_id": "1",
"pages_id": "1",
"paper_type_id": "1",
"quantity": "100",
"date": "2019-02-26"
}