Explore and test the APIs provided by Viglietti Sergio. These APIs allow clients to log in, view price lists, order products, and perform other shop functions through the API system.
To access the API, you need to authenticate using a Bearer Token . Follow these steps:
Authorization: Bearer <your-token-here>
Example using cURL:
curl -X GET "https://www.viglietti.com/webservice/me" -H "Authorization: Bearer <your-token-here>"
Replace <your-token-here> with the Bearer Token you received upon logging in. Ensure your token is kept secure and not exposed publicly.
To place an order, send a POST request to /webservice/orders with the order details.
The system will automatically retrieve the price based on the product alias and create
the order.
The required field represents the number of items to order, and the system will
multiply this value by the minimum purchasable quantity (deal) .
For example, required: 5 will result in an order of (5 * deal), and the price will
be calculated accordingly.
Example using cURL:
curl -X POST "https://www.viglietti.com/webservice/orders" -H "Authorization: Bearer <your-token-here>" -H "Content-Type: application/json" -d '{ "order": { "notes": "Some notes about the order", "shipping": "2023-07-21", "items": [{ "alias": "BLASF40", "required": 5 }] } }'
To get the flower price list, send a GET request to /webservice/flowers.
The response will include the price list based on the authenticated user's token, with prices and
discounts automatically calculated. You can use the offset and limit parameters to
paginate the results, with prices and discounts automatically calculated.
curl -X GET "https://www.viglietti.com/webservice/flowers?offset=0&limit=10" -H "Authorization: Bearer <your-token-here>"
Replace <your-token-here>
with the Bearer Token you received upon logging in.
Adjust the offset
and limit
parameters as needed to paginate through the
flower price list.
To search for flowers, send a GET request to /webservice/flowers?search=<query>.
The search can be performed using the article code (alias), description, or category . The
response will include the results based on the authenticated user's token prices lists.
curl -X GET "https://www.viglietti.com/webservice/flowers?search=rose&offset=0&limit=10" -H "Authorization: Bearer <your-token-here>"
Replace <your-token-here> with the Bearer Token you received upon logging in. Adjust the offset and limit parameters as needed to paginate through the search results.
Please be aware of the following system limitations: