The create endpoint adds a new product to the in-memory store. You must supply aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ricpalomino/spring-boot/llms.txt
Use this file to discover all available pages before exploring further.
name and a price in the JSON request body. On success, the API returns HTTP 201 with the created product, including its auto-assigned numeric ID. If the request body fails validation, the API returns HTTP 400 without creating anything.
Product IDs are assigned automatically, starting at 1 and incrementing by 1 for each new product. You cannot set or predict the ID in advance — always read the
id from the response after creation.Request body
The product name. Must be between 3 and 100 characters and cannot be blank.
The product price. Must be greater than 0 (minimum value: 1).
Request
Response fields
HTTP status code as a string (e.g.,
"201", "400").Human-readable message describing the result.
The newly created product object, or
null on validation failure.Created response — 201
Validation error response — 400
Returned whenname is blank or too short/long, or when price is less than 1. The data field contains a map of failing field names to their constraint violation messages.