In previous chapters you learned a little about using Postman, and in one of those examples you learned how to create new reviews in the FarmStall API by executing a POST operation with a request body. Creating reviews is a critical part of this API—what good is a review-centric API without the ability to create reviews!
In this chapter we’ll describe how to create new reviews using POST /reviews. In addition to that, we’ll take a look at GET /reviews/{reviewId}. This GET operation interests us for two reasons: first, we’ll want to confirm that we did indeed create a new review by fetching the same review back again, and, second, we will see how a path parameter works (see figure 6.1). Part of the charm of this approach is using the API itself to verify our work.
Like response bodies, request bodies are described using OpenAPI’s JSON Schema variant and they require a media type to indicate the type of data being sent (application/json).