July 13, 2020
The problem with the G2G marketplace is that if you are sleeping or doing something else and get and order you can't deliver it and buyer keeps waiting or even worse the buyer cancels the order. And there aren't any public API's or features built in that could help with this issue. So I decided to reverse engineer the G2G marketplace API that the website uses. And make a program that will automatically deliver your orders with the specified details for you.
After tinkering around a bit I found out that the website was made using php so that means it server side rendered so there isn't REST endpoint that returns me all of the new orders. That means I needed to parse through the html and reconstruct it into easy to read json array.
When a requesting the orders page there must be an authentication token provided in the Http-Only cookies. In this case there were multiple required tokens and multiple redirects.
The accepting and the confirming of order was really easy because i just needed just to send a single POST request with the specified query params.